Check GBM_BO_USE_LINEAR correctly v2

v2: remove the check for gbm.h

Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> [v1]
This commit is contained in:
Jammy Zhou
2015-05-30 00:31:44 +08:00
committed by Michel Dänzer
parent e75e9f39c9
commit 7363156b7c
3 changed files with 7 additions and 2 deletions

View File

@@ -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 <stdlib.h>
#include <gbm.h>])
CPPFLAGS="$SAVE_CPPFLAGS"
PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])

View File

@@ -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;

View File

@@ -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);