summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Maathuis <madman2003@gmail.com>2009-08-19 22:06:42 +0200
committerMaarten Maathuis <madman2003@gmail.com>2009-08-19 22:06:42 +0200
commitfe2b5e6c6f81f4c4a76f5e4c5816812459872af3 (patch)
tree0a1d20fbdfc2a1995786d86e29e18eb6195298d7
parent9d270f65ee85dedc6bf9cd9cf24e3d8df062f670 (diff)
kms: fix gamma
- crtc->active is needed in order to set the gamma manually - the initial gamma must be set by us
-rw-r--r--src/drmmode_display.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index f2fe0e8..e7c20a8 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -320,6 +320,13 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
drmmode_output_dpms(output, DPMSModeOn);
}
+ /* Only upload when needed, to avoid unneeded delays. */
+ if (!crtc->active)
+ crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green,
+ crtc->gamma_blue, crtc->gamma_size);
+
+ crtc->active = TRUE;
+
done:
if (!ret) {
crtc->x = saved_x;