summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2010-11-15 11:25:14 +1000
committerJulien Cristau <jcristau@debian.org>2010-12-01 23:48:26 +0100
commitf86265529b1506a3946d6e3d6fed77a6702108b1 (patch)
tree1bccab1d45c484e53aa08b277f0adffa32123850
parent333a6355917c552132e1dd3a2aa066c5b7e70566 (diff)
xfree86: store the screen's gamma information on init.
This fixes a gamma issue on vt switch observed with KDM. VT switching away and back would result in a black screen. Avoid this by storing the current gamma information on init. https://bugzilla.redhat.com/show_bug.cgi?id=533217 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 566d09a5cd6452ee2e05e23d2205e7c3aa31f0da)
-rw-r--r--hw/xfree86/modes/xf86RandR12.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 07482ec6b..52eba24f6 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -1800,6 +1800,7 @@ xf86RandR12Init12 (ScreenPtr pScreen)
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
rrScrPrivPtr rp = rrGetScrPriv(pScreen);
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+ int i;
rp->rrGetInfo = xf86RandR12GetInfo12;
rp->rrScreenSetSize = xf86RandR12ScreenSetSize;
@@ -1829,6 +1830,9 @@ xf86RandR12Init12 (ScreenPtr pScreen)
*/
if (!xf86RandR12SetInfo12 (pScreen))
return FALSE;
+ for (i = 0; i < rp->numCrtcs; i++) {
+ xf86RandR12CrtcGetGamma(pScreen, rp->crtcs[i]);
+ }
return TRUE;
}