[PATCH xf86-video-ati 5/5] Require xserver 1.9 or newer

Michel Dänzer michel at daenzer.net
Wed Mar 23 09:52:10 UTC 2016


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

1.9.0 was released in August 2010.

We were already unintentionally relying on things not available in 1.8
for at least a year, and nobody has complained.

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 configure.ac        |  2 +-
 src/radeon.h        |  8 --------
 src/radeon_dri2.c   | 14 --------------
 src/radeon_glamor.c |  8 --------
 src/radeon_video.c  |  2 --
 5 files changed, 1 insertion(+), 33 deletions(-)

diff --git a/configure.ac b/configure.ac
index eb97a6b..a4963c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,7 +75,7 @@ PKG_CHECK_MODULES(LIBDRM, [libdrm >= 2.4.60])
 PKG_CHECK_MODULES(LIBDRM_RADEON, [libdrm_radeon])
 
 # Obtain compiler/linker options for the driver dependencies
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.8 xproto fontsproto xf86driproto $REQUIRED_MODULES])
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.9 xproto fontsproto xf86driproto $REQUIRED_MODULES])
 PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
                   HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]),
                   HAVE_XEXTPROTO_71="no")
diff --git a/src/radeon.h b/src/radeon.h
index b9afd8e..37d5fb6 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -272,19 +272,11 @@ struct radeon_pixmap {
 	uint32_t handle;
 };
 
-#if HAS_DEVPRIVATEKEYREC
 extern DevPrivateKeyRec glamor_pixmap_index;
-#else
-extern int glamor_pixmap_index;
-#endif
 
 static inline struct radeon_pixmap *radeon_get_pixmap_private(PixmapPtr pixmap)
 {
-#if HAS_DEVPRIVATEKEYREC
 	return dixGetPrivate(&pixmap->devPrivates, &glamor_pixmap_index);
-#else
-	return dixLookupPrivate(&pixmap->devPrivates, &glamor_pixmap_index);
-#endif
 }
 
 static inline void radeon_set_pixmap_private(PixmapPtr pixmap, struct radeon_pixmap *priv)
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index 474611a..73e09d0 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -70,18 +70,9 @@ struct dri2_window_priv {
     int vblank_delta;
 };
 
-#if HAS_DEVPRIVATEKEYREC
-
 static DevPrivateKeyRec dri2_window_private_key_rec;
 #define dri2_window_private_key (&dri2_window_private_key_rec)
 
-#else
-
-static int dri2_window_private_key_index;
-DevPrivateKey dri2_window_private_key = &dri2_window_private_key_index;
-
-#endif /* HAS_DEVPRIVATEKEYREC */
-
 #define get_dri2_window_priv(window) \
     ((struct dri2_window_priv*) \
      dixLookupPrivate(&(window)->devPrivates, dri2_window_private_key))
@@ -1588,14 +1579,9 @@ radeon_dri2_screen_init(ScreenPtr pScreen)
             driverNames[1] = NULL; /* no VDPAU support */
 
 	if (DRI2InfoCnt == 0) {
-#if HAS_DIXREGISTERPRIVATEKEY
 	    if (!dixRegisterPrivateKey(dri2_window_private_key,
 				       PRIVATE_WINDOW,
 				       sizeof(struct dri2_window_priv))) {
-#else
-	    if (!dixRequestPrivate(dri2_window_private_key,
-				   sizeof(struct dri2_window_priv))) {
-#endif
 		xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
 			   "Failed to get DRI2 window private\n");
 		return FALSE;
diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c
index cc2b1f2..f94e0fd 100644
--- a/src/radeon_glamor.c
+++ b/src/radeon_glamor.c
@@ -34,11 +34,7 @@
 #include "radeon_bo_helper.h"
 #include "radeon_glamor.h"
 
-#if HAS_DEVPRIVATEKEYREC
 DevPrivateKeyRec glamor_pixmap_index;
-#else
-int glamor_pixmap_index;
-#endif
 
 void
 radeon_glamor_exchange_buffers(PixmapPtr src,
@@ -370,11 +366,7 @@ radeon_glamor_init(ScreenPtr screen)
 		return FALSE;
 	}
 
-#if HAS_DIXREGISTERPRIVATEKEY
 	if (!dixRegisterPrivateKey(&glamor_pixmap_index, PRIVATE_PIXMAP, 0))
-#else
-	if (!dixRequestPrivate(&glamor_pixmap_index, 0))
-#endif
 		return FALSE;
 
 	if (info->shadow_primary)
diff --git a/src/radeon_video.c b/src/radeon_video.c
index 48b06e2..e08d8e0 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -94,9 +94,7 @@ radeon_pick_best_crtc(ScrnInfoPtr pScrn, Bool consider_disabled,
     best_coverage = 0;
 
     /* Prefer the CRTC of the primary output */
-#ifdef HAS_DIXREGISTERPRIVATEKEY
     if (dixPrivateKeyRegistered(rrPrivKey))
-#endif
     {
 	primary_output = RRFirstOutput(pScrn->pScreen);
     }
-- 
2.8.0.rc3



More information about the xorg-driver-ati mailing list