summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/xfree86/modes/xf86RandR12.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 1e9cbd33c..b13612371 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -1310,9 +1310,17 @@ xf86RandR12CrtcSetGamma(ScreenPtr pScreen, RRCrtcPtr randr_crtc)
if (randrp->palette_size) {
xf86RandR12CrtcComputeGamma(pScreen, randr_crtc);
- xf86RandR12CrtcReloadGamma(randr_crtc);
+ } else {
+ memcpy(crtc->gamma_red, randr_crtc->gammaRed,
+ crtc->gamma_size * sizeof(crtc->gamma_red[0]));
+ memcpy(crtc->gamma_green, randr_crtc->gammaGreen,
+ crtc->gamma_size * sizeof(crtc->gamma_green[0]));
+ memcpy(crtc->gamma_blue, randr_crtc->gammaBlue,
+ crtc->gamma_size * sizeof(crtc->gamma_blue[0]));
}
+ xf86RandR12CrtcReloadGamma(randr_crtc);
+
return TRUE;
}