Mesa (master): st/xorg: Fix build failure against xserver with XF86_CRTC_VERSION < 3.
Michel Dänzer
daenzer at kemper.freedesktop.org
Mon Jan 24 14:50:22 UTC 2011
Module: Mesa
Branch: master
Commit: be0665b461c776e2c4444330a865134e53f3d121
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=be0665b461c776e2c4444330a865134e53f3d121
Author: Michel Dänzer <daenzer at vmware.com>
Date: Mon Jan 24 15:48:13 2011 +0100
st/xorg: Fix build failure against xserver with XF86_CRTC_VERSION < 3.
Reported by Vinson Lee.
---
src/gallium/state_trackers/xorg/xorg_crtc.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/gallium/state_trackers/xorg/xorg_crtc.c b/src/gallium/state_trackers/xorg/xorg_crtc.c
index 71f7b8c..d751ac1 100644
--- a/src/gallium/state_trackers/xorg/xorg_crtc.c
+++ b/src/gallium/state_trackers/xorg/xorg_crtc.c
@@ -135,14 +135,12 @@ crtc_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
/* Only set gamma when needed, to avoid unneeded delays. */
#if defined(XF86_CRTC_VERSION) && XF86_CRTC_VERSION >= 3
- if (!crtc->active)
-#endif
+ if (!crtc->active && crtc->version >= 3)
crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green,
crtc->gamma_blue, crtc->gamma_size);
-
-#if defined(XF86_CRTC_VERSION) && XF86_CRTC_VERSION >= 3
crtc->active = TRUE;
#endif
+
crtc->x = x;
crtc->y = y;
crtc->mode = *mode;
More information about the mesa-commit
mailing list