[PATCH xf86-video-amdgpu] Enable DRI3 by default when building for Xorg >= 1.18.3

Michel Dänzer michel at daenzer.net
Thu May 12 07:43:00 UTC 2016


From: Michel Dänzer <michel.daenzer at amd.com>

Seems to work well enough in general now.

(Ported from radeon commit 1181b9c582f10b6c523e4b2988e2ce87ecf3d367)

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 man/amdgpu.man   | 2 ++
 src/amdgpu_kms.c | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/man/amdgpu.man b/man/amdgpu.man
index 0100400..fd35a9f 100644
--- a/man/amdgpu.man
+++ b/man/amdgpu.man
@@ -64,6 +64,8 @@ will assign xrandr outputs LVDS and VGA-0 to this instance of the driver.
 .BI "Option \*qDRI\*q \*q" integer \*q
 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, otherwise
 .B 2 for DRI2.
 .TP
 .BI "Option \*qEnablePageFlip\*q \*q" boolean \*q
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 125cb77..3c53bc9 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -1230,7 +1230,11 @@ 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
 	from = X_DEFAULT;
 
 	if (info->use_glamor) {
-- 
2.8.1



More information about the xorg-driver-ati mailing list