summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2016-11-02 12:35:55 +0900
committerMichel Dänzer <michel.daenzer@amd.com>2016-11-02 12:35:55 +0900
commit1352a1d2f78cb0433d421ef86bfce2a5a1646807 (patch)
treeb553ddd857e88fc5955b09d7df0fcc7653d8acec /src
parent5da43c5da8adc139d57d89975a52eef91a5595e1 (diff)
Check Xorg version at runtime instead of build time in two places
This means that all possible paths can be handled as intended, no matter which Xorg version the driver happened to be compiled against. (Ported from radeon commit 350a2645a1b127227ff294c0b62d20000d0fd48a) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src')
-rw-r--r--src/amdgpu_kms.c6
-rw-r--r--src/drmmode_display.c8
2 files changed, 5 insertions, 9 deletions
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index acf3a7d..b21cd37 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -1713,11 +1713,7 @@ Bool AMDGPUScreenInit_KMS(SCREEN_INIT_ARGS_DECL)
}
#endif
-#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,18,3,0,0)
- value = TRUE;
-#else
- value = FALSE;
-#endif
+ value = xorgGetVersion() >= XORG_VERSION_NUMERIC(1,18,3,0,0);
from = X_DEFAULT;
if (info->use_glamor) {
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index f514866..2d36881 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -607,10 +607,10 @@ drmmode_can_use_hw_cursor(xf86CrtcPtr crtc)
return FALSE;
#endif
-#if defined(AMDGPU_PIXMAP_SHARING) && \
- XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(1,18,99,901,0)
- /* HW cursor not supported with RandR 1.4 multihead */
- if (!xorg_list_is_empty(&crtc->scrn->pScreen->pixmap_dirty_list))
+#if defined(AMDGPU_PIXMAP_SHARING)
+ /* HW cursor not supported with RandR 1.4 multihead up to 1.18.99.901 */
+ if (xorgGetVersion() <= XORG_VERSION_NUMERIC(1,18,99,901,0) &&
+ !xorg_list_is_empty(&crtc->scrn->pScreen->pixmap_dirty_list))
return FALSE;
#endif