xf86-video-ati/U_04-Enable-DRI3-by-default-when-building-for-Xorg-1.18.3.patch
Max Staudt 84a4590c79 Accepting request 438260 from home:mstaudt:branches:X11:XOrg
- U_01-* ... U_20-* :
  Include patches that haven't made it into the 7.7.1 release.

  This means almost all commits between xf86-video-ati-7.7.0
  and 12d30eeb9711bd2b1609d6bbb74c4a1760596f72.

  Fixes (bsc#990066).

OBS-URL: https://build.opensuse.org/request/show/438260
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xf86-video-ati?expand=0&rev=51
2016-11-02 10:39:34 +00:00

47 lines
1.4 KiB
Diff

From: Michel Dänzer <michel.daenzer@amd.com>
Date: Tue May 10 19:02:20 2016 +0900
Subject: [PATCH 4/20]Enable DRI3 by default when building for Xorg >= 1.18.3
Patch-mainline: Upstream
Git-repo: git://anongit.freedesktop.org/xorg/driver/xf86-video-ati
Git-commit: 1181b9c582f10b6c523e4b2988e2ce87ecf3d367
References: bsc#990066
Signed-off-by: Max Staudt <mstaudt@suse.de>
Seems to work well enough in general now.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
---
man/radeon.man | 2 ++
src/radeon_kms.c | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/man/radeon.man b/man/radeon.man
index 1acdc63..cacafb5 100644
--- a/man/radeon.man
+++ b/man/radeon.man
@@ -270,6 +270,8 @@ Sea Islands.
.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/radeon_kms.c b/src/radeon_kms.c
index f9abc09..0ced370 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -1725,7 +1725,11 @@ Bool RADEONScreenInit_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->r600_shadow_fb) {