On Thu, May 28, 2015 at 12:02 PM, Jammy Zhou <[email protected]> wrote: > Signed-off-by: Jammy Zhou <[email protected]>
Reviewed-by: Alex Deucher <[email protected]> > --- > configure.ac | 11 +++++++++++ > src/amdgpu_bo_helper.c | 2 +- > src/amdgpu_kms.c | 2 +- > 3 files changed, 13 insertions(+), 2 deletions(-) > > diff --git a/configure.ac b/configure.ac > index c2411d9..e39654e 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -158,6 +158,17 @@ if test "x$have_list_h" = xyes; then > #include "list.h"]) > fi > > +AC_CHECK_HEADERS([gbm.h], > + [have_gbm_h="yes"], [have_gbm_h="no"], > + [#include <stdlib.h>]) > + > +if test "x$have_gbm_h" = xyes; then > + 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>]) > +fi > + > 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); > -- > 1.9.1 > > _______________________________________________ > xorg-driver-ati mailing list > [email protected] > http://lists.x.org/mailman/listinfo/xorg-driver-ati _______________________________________________ xorg-driver-ati mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-driver-ati
