summaryrefslogtreecommitdiff
blob: 778156c8dcde97b2c21927080950b3e4cf582dd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From f858cbe246c5d3a788ae25551b49142c5cc91f1a Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Fri, 9 Oct 2009 14:16:06 +1000
Subject: [PATCH 1/3] 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>
(cherry picked from commit 8a77877f9c2c6a8a1308bc1a3be9e7ad88bc7f49)
---
 src/drmmode_display.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index e8a6c01..7845fc5 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -363,6 +363,11 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
 		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);
 
 
-- 
1.6.5.1