summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2009-08-20 18:44:38 +0200
committerMaarten Maathuis <madman2003@gmail.com>2009-08-20 18:49:30 +0200
commit569a17a98d03d965f9500c37c0cb14e0fb462311 (patch)
tree40ae7d338b9d9ed85ecdf775e37ba7b0c1582377
parent32fc8a9a3104b38fe89427ffa60d21dad1572c15 (diff)
kms: No need to upload gamma on set_mode_major in older X servers.
Fixes build for CRTC ABI < 3. Signed-off-by: Francisco Jerez <currojerez@riseup.net>
-rw-r--r--src/drmmode_display.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 74251fc..9231d93 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -320,12 +320,14 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
drmmode_output_dpms(output, DPMSModeOn);
}
+#if XF86_CRTC_VERSION >= 3
/* 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;
+#endif
done:
if (!ret) {