summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-10-09 14:16:06 +1000
committerDave Airlie <airlied@redhat.com>2009-10-13 09:19:31 +1000
commit8a77877f9c2c6a8a1308bc1a3be9e7ad88bc7f49 (patch)
treecbe23e9d08a19f8df1ef0541205dd524bf539343
parentd8c7678ddadce89ca7fc0edd1b4d9ed3d959e687 (diff)
drmmode: with 1.7 server, set mode major doesn't get gamma setup.
Noticed this on Fedora, where 1.7 server does gamma via the randr codepaths however kms doesn't have this call which happens in the non set_mode_major path. probably should be backported to released drivers. Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--src/drmmode_display.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index ba1e7518..c2ef514e 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -360,12 +360,17 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
goto done;
#else
if (!xf86CrtcRotate(crtc))
goto done;
#endif
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,7,0,0,0)
+ crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green,
+ crtc->gamma_blue, crtc->gamma_size);
+#endif
+
drmmode_ConvertToKMode(crtc->scrn, &kmode, mode);
fb_id = drmmode->fb_id;
if (drmmode_crtc->rotate_fb_id) {
fb_id = drmmode_crtc->rotate_fb_id;