mirror of
https://github.com/X11Libre/xf86-video-amdgpu.git
synced 2026-03-24 01:24:31 +00:00
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:
committed by
Michel Dänzer
parent
e75e9f39c9
commit
7363156b7c
@@ -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])
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user