summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2009-02-17 13:48:04 -0500
committerKristian Høgsberg <krh@redhat.com>2009-02-17 13:48:04 -0500
commit723b6065093adb56a2d7204bd990ceae41bfafc9 (patch)
tree67a25e0a12e6cce49831aa1e2339bab6aed6ceaf
parent506bbb8341c052499057834a669b82787454b426 (diff)
KMS: Hook up crtc::gamma_set.
-rw-r--r--src/drmmode_display.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 0d0e130e..66d60142 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -357,6 +357,17 @@ drmmode_crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *dat
#endif
}
+static void
+drmmode_crtc_gamma_set(xf86CrtcPtr crtc,
+ CARD16 *red, CARD16 *green, CARD16 *blue, int size)
+{
+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+ drmmode_ptr drmmode = drmmode_crtc->drmmode;
+
+ drmModeCrtcSetGamma(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
+ size, red, green, blue);
+}
+
static const xf86CrtcFuncsRec drmmode_crtc_funcs = {
.dpms = drmmode_crtc_dpms,
.set_mode_major = drmmode_set_mode_major,
@@ -369,8 +380,8 @@ static const xf86CrtcFuncsRec drmmode_crtc_funcs = {
.shadow_create = drmmode_crtc_shadow_create,
.shadow_allocate = drmmode_crtc_shadow_allocate,
.shadow_destroy = drmmode_crtc_shadow_destroy,
+ .gamma_set = drmmode_crtc_gamma_set,
#if 0
- .gamma_set = i830_crtc_gamma_set,
.shadow_create = i830_crtc_shadow_create,
.shadow_allocate = i830_crtc_shadow_allocate,
.shadow_destroy = i830_crtc_shadow_destroy,