From 7363156b7c077def2aaf9a4573410817f5e92610 Mon Sep 17 00:00:00 2001 From: Jammy Zhou Date: Sat, 30 May 2015 00:31:44 +0800 Subject: [PATCH] Check GBM_BO_USE_LINEAR correctly v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v2: remove the check for gbm.h Signed-off-by: Jammy Zhou Reviewed-by: Michel Dänzer Reviewed-by: Alex Deucher [v1] --- configure.ac | 5 +++++ src/amdgpu_bo_helper.c | 2 +- src/amdgpu_kms.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index c2411d9..b26eebb 100644 --- a/configure.ac +++ b/configure.ac @@ -158,6 +158,11 @@ if test "x$have_list_h" = xyes; then #include "list.h"]) fi +AC_CHECK_DECL(GBM_BO_USE_LINEAR, + [AC_DEFINE(HAVE_GBM_BO_USE_LINEAR, 1, [Have GBM_BO_USE_LINEAR])], [], + [#include + #include ]) + CPPFLAGS="$SAVE_CPPFLAGS" PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0]) diff --git a/src/amdgpu_bo_helper.c b/src/amdgpu_bo_helper.c index 1de2a0a..0487b46 100644 --- a/src/amdgpu_bo_helper.c +++ b/src/amdgpu_bo_helper.c @@ -75,7 +75,7 @@ struct amdgpu_buffer *amdgpu_alloc_pixmap_bo(ScrnInfoPtr pScrn, int width, if ( bitsPerPixel == pScrn->bitsPerPixel) bo_use |= GBM_BO_USE_SCANOUT; -#ifdef GBM_BO_USE_LINEAR +#ifdef HAVE_GBM_BO_USE_LINEAR #ifdef CREATE_PIXMAP_USAGE_SHARED if (usage_hint == CREATE_PIXMAP_USAGE_SHARED) { bo_use |= GBM_BO_USE_LINEAR; diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c index d66f050..16a7449 100644 --- a/src/amdgpu_kms.c +++ b/src/amdgpu_kms.c @@ -323,7 +323,7 @@ static Bool AMDGPUPreInitAccel_KMS(ScrnInfoPtr pScrn) if (!xf86ReturnOptValBool(info->Options, OPTION_NOACCEL, false)) { Bool use_glamor = TRUE; -#ifdef GBM_BO_USE_LINEAR +#ifdef HAVE_GBM_BO_USE_LINEAR const char *accel_method; accel_method = xf86GetOptValString(info->Options, OPTION_ACCEL_METHOD);