[PATCH 01/14] Require at least xserver 1.8
Michel Dänzer
michel at daenzer.net
Wed Mar 11 23:10:43 PDT 2015
From: Michel Dänzer <michel.daenzer at amd.com>
So we can rely on the list.h header.
xserver 1.8 was released in April 2010.
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
configure.ac | 19 ++++++-------------
src/radeon_dri2.c | 17 -----------------
2 files changed, 6 insertions(+), 30 deletions(-)
diff --git a/configure.ac b/configure.ac
index c471ff5..891da03 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,7 +75,7 @@ PKG_CHECK_MODULES(LIBDRM, [libdrm >= 2.4.58])
PKG_CHECK_MODULES(LIBDRM_RADEON, [libdrm_radeon])
# Obtain compiler/linker options for the driver dependencies
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.7 xproto fontsproto xf86driproto $REQUIRED_MODULES])
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.8 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")
@@ -125,18 +125,11 @@ else
fi
AM_CONDITIONAL(GLAMOR, test x$GLAMOR != xno)
-AC_CHECK_HEADERS([list.h],
- [have_list_h="yes"], [have_list_h="no"],
- [#include <X11/Xdefs.h>
- #include "xorg-server.h"])
-
-if test "x$have_list_h" = xyes; then
- AC_CHECK_DECL(xorg_list_init,
- [AC_DEFINE(HAVE_XORG_LIST, 1, [Have xorg_list API])], [],
- [#include <X11/Xdefs.h>
- #include "xorg-server.h"
- #include "list.h"])
-fi
+AC_CHECK_DECL(xorg_list_init,
+ [AC_DEFINE(HAVE_XORG_LIST, 1, [Have xorg_list API])], [],
+ [#include <X11/Xdefs.h>
+ #include "xorg-server.h"
+ #include "list.h"])
CPPFLAGS="$SAVE_CPPFLAGS"
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index 56beeec..8cc7e56 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -42,7 +42,6 @@
#include "radeon_version.h"
-#if HAVE_LIST_H
#include "list.h"
#if !HAVE_XORG_LIST
#define xorg_list list
@@ -51,15 +50,9 @@
#define xorg_list_del list_del
#define xorg_list_for_each_entry list_for_each_entry
#endif
-#endif
-
#include "radeon_bo_gem.h"
-#if DRI2INFOREC_VERSION >= 4 && HAVE_LIST_H
-#define USE_DRI2_SCHEDULING
-#endif
-
#if DRI2INFOREC_VERSION >= 9
#define USE_DRI2_PRIME
#endif
@@ -490,8 +483,6 @@ radeon_dri2_copy_region(DrawablePtr pDraw, RegionPtr pRegion,
pDstBuffer, pSrcBuffer);
}
-#ifdef USE_DRI2_SCHEDULING
-
enum DRI2FrameEventType {
DRI2_SWAP,
DRI2_FLIP,
@@ -1537,8 +1528,6 @@ blit_fallback:
return TRUE;
}
-#endif /* USE_DRI2_SCHEDULING */
-
Bool
radeon_dri2_screen_init(ScreenPtr pScreen)
@@ -1546,10 +1535,8 @@ radeon_dri2_screen_init(ScreenPtr pScreen)
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
DRI2InfoRec dri2_info = { 0 };
-#ifdef USE_DRI2_SCHEDULING
const char *driverNames[2];
Bool scheduling_works = TRUE;
-#endif
if (!info->dri2.available)
return FALSE;
@@ -1574,7 +1561,6 @@ radeon_dri2_screen_init(ScreenPtr pScreen)
dri2_info.DestroyBuffer = radeon_dri2_destroy_buffer;
dri2_info.CopyRegion = radeon_dri2_copy_region;
-#ifdef USE_DRI2_SCHEDULING
if (info->dri2.pKernelDRMVersion->version_minor < 4) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "You need a newer kernel for "
"sync extension\n");
@@ -1637,7 +1623,6 @@ radeon_dri2_screen_init(ScreenPtr pScreen)
DRI2InfoCnt++;
}
-#endif
#if DRI2INFOREC_VERSION >= 9
dri2_info.version = 9;
@@ -1655,10 +1640,8 @@ void radeon_dri2_close_screen(ScreenPtr pScreen)
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
-#ifdef USE_DRI2_SCHEDULING
if (--DRI2InfoCnt == 0)
DeleteCallback(&ClientStateCallback, radeon_dri2_client_state_changed, 0);
-#endif
DRI2CloseScreen(pScreen);
drmFree(info->dri2.device_name);
--
2.1.4
More information about the xorg-driver-ati
mailing list