[PATCH xf86-video-amdgpu 01/13] Require at least xserver 1.8
Michel Dänzer
michel at daenzer.net
Tue Jun 2 02:21:19 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.
(Cherry picked from radeon commit 7388d0b6c54b9d536fdb161e3aa61b326627b939)
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
configure.ac | 19 ++++++-------------
src/amdgpu_dri2.c | 16 ----------------
2 files changed, 6 insertions(+), 29 deletions(-)
diff --git a/configure.ac b/configure.ac
index b26eebb..ff0979e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -76,7 +76,7 @@ PKG_CHECK_MODULES(LIBDRM_AMDGPU, [libdrm_amdgpu])
PKG_CHECK_MODULES(GBM, [gbm])
# 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")
@@ -145,18 +145,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"])
AC_CHECK_DECL(GBM_BO_USE_LINEAR,
[AC_DEFINE(HAVE_GBM_BO_USE_LINEAR, 1, [Have GBM_BO_USE_LINEAR])], [],
diff --git a/src/amdgpu_dri2.c b/src/amdgpu_dri2.c
index 15bb497..32f6171 100644
--- a/src/amdgpu_dri2.c
+++ b/src/amdgpu_dri2.c
@@ -47,7 +47,6 @@
#include "amdgpu_version.h"
-#if HAVE_LIST_H
#include "list.h"
#if !HAVE_XORG_LIST
#define xorg_list list
@@ -56,11 +55,6 @@
#define xorg_list_del list_del
#define xorg_list_for_each_entry list_for_each_entry
#endif
-#endif
-
-#if DRI2INFOREC_VERSION >= 4 && HAVE_LIST_H
-#define USE_DRI2_SCHEDULING
-#endif
#if DRI2INFOREC_VERSION >= 9
#define USE_DRI2_PRIME
@@ -373,8 +367,6 @@ amdgpu_dri2_copy_region(DrawablePtr pDraw, RegionPtr pRegion,
pDstBuffer, pSrcBuffer);
}
-#ifdef USE_DRI2_SCHEDULING
-
enum DRI2FrameEventType {
DRI2_SWAP,
DRI2_FLIP,
@@ -1446,17 +1438,13 @@ blit_fallback:
return TRUE;
}
-#endif /* USE_DRI2_SCHEDULING */
-
Bool amdgpu_dri2_screen_init(ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
AMDGPUInfoPtr info = AMDGPUPTR(pScrn);
DRI2InfoRec dri2_info = { 0 };
-#ifdef USE_DRI2_SCHEDULING
const char *driverNames[2];
Bool scheduling_works = TRUE;
-#endif
if (!info->dri2.available)
return FALSE;
@@ -1471,7 +1459,6 @@ Bool amdgpu_dri2_screen_init(ScreenPtr pScreen)
dri2_info.DestroyBuffer = amdgpu_dri2_destroy_buffer;
dri2_info.CopyRegion = amdgpu_dri2_copy_region;
-#ifdef USE_DRI2_SCHEDULING
if (info->drmmode.mode_res->count_crtcs > 2) {
#ifdef DRM_CAP_VBLANK_HIGH_CRTC
uint64_t cap_value;
@@ -1532,7 +1519,6 @@ Bool amdgpu_dri2_screen_init(ScreenPtr pScreen)
DRI2InfoCnt++;
}
-#endif
#if DRI2INFOREC_VERSION >= 9
dri2_info.version = 9;
@@ -1550,11 +1536,9 @@ void amdgpu_dri2_close_screen(ScreenPtr pScreen)
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
AMDGPUInfoPtr info = AMDGPUPTR(pScrn);
-#ifdef USE_DRI2_SCHEDULING
if (--DRI2InfoCnt == 0)
DeleteCallback(&ClientStateCallback,
amdgpu_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