diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2016-11-01 16:30:42 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2016-11-01 16:30:42 +0900 |
commit | 350a2645a1b127227ff294c0b62d20000d0fd48a (patch) | |
tree | c26819445a65794e9495d278a7433bf06d8ebe38 | |
parent | 5df36de39952c3a26cb2fbc125f298139a9dd5bc (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.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | man/radeon.man | 2 | ||||
-rw-r--r-- | src/drmmode_display.c | 8 | ||||
-rw-r--r-- | src/radeon_kms.c | 9 |
3 files changed, 9 insertions, 10 deletions
diff --git a/man/radeon.man b/man/radeon.man index 44603a5f..1d09fc50 100644 --- a/man/radeon.man +++ b/man/radeon.man @@ -271,7 +271,7 @@ Sea Islands. Define the maximum level of DRI to enable. Valid values are 2 for DRI2 or 3 for DRI3. The default is .B 3 for DRI3 -if the driver was compiled for Xorg >= 1.18.3 and glamor is enabled, otherwise +if the Xorg version is >= 1.18.3 and glamor is enabled, otherwise .B 2 for DRI2. Note: DRI3 may not work correctly in all cases with EXA, enable at your own risk. .TP diff --git a/src/drmmode_display.c b/src/drmmode_display.c index b95e1c99..28b932ee 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -667,10 +667,10 @@ drmmode_can_use_hw_cursor(xf86CrtcPtr crtc) return FALSE; #endif -#if defined(RADEON_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(RADEON_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 diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 872150d5..6927f580 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -2195,11 +2195,10 @@ Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL) } #endif -#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,18,3,0,0) - value = info->use_glamor; -#else - value = FALSE; -#endif + if (xorgGetVersion() >= XORG_VERSION_NUMERIC(1,18,3,0,0)) + value = info->use_glamor; + else + value = FALSE; from = X_DEFAULT; if (!info->r600_shadow_fb) { |