diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2015-04-24 09:52:04 +0900 |
---|---|---|
committer | Michel Dänzer <michel.daenzer@amd.com> | 2015-04-24 09:52:04 +0900 |
commit | fe4a4b6836252cc8caa642a32fb3910c8590076b (patch) | |
tree | dba649dcc01f1a8d4eae477a3e68dbd36ce9ea23 | |
parent | 84df3e7114fb71b5e10c1a6f7869ab1505fef5b0 (diff) |
Fix build when gbm.h doesn't define GBM_BO_USE_LINEAR
Option "AccelMethod" "none" is ignored in that case.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | src/amdgpu_bo_helper.c | 2 | ||||
-rw-r--r-- | src/amdgpu_kms.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/amdgpu_bo_helper.c b/src/amdgpu_bo_helper.c index 10f5856..fa87783 100644 --- a/src/amdgpu_bo_helper.c +++ b/src/amdgpu_bo_helper.c @@ -81,9 +81,11 @@ struct amdgpu_buffer *amdgpu_alloc_pixmap_bo(ScrnInfoPtr pScrn, int width, } #endif +#ifdef GBM_BO_USE_LINEAR if (usage_hint & AMDGPU_CREATE_PIXMAP_LINEAR) { bo_use |= GBM_BO_USE_LINEAR; } +#endif pixmap_buffer->bo.gbm = gbm_bo_create(info->gbm, width, height, gbm_format, diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c index 798db5c..a9fb997 100644 --- a/src/amdgpu_kms.c +++ b/src/amdgpu_kms.c @@ -332,16 +332,18 @@ static Bool AMDGPUPreInitWeight(ScrnInfoPtr pScrn) static Bool AMDGPUPreInitAccel_KMS(ScrnInfoPtr pScrn) { AMDGPUInfoPtr info = AMDGPUPTR(pScrn); - const char *accel_method; if (!xf86ReturnOptValBool(info->Options, OPTION_NOACCEL, info->ChipFamily == CHIP_FAMILY_HAWAII) && AMDGPUIsAccelWorking(pScrn)) { Bool use_glamor = TRUE; +#ifdef GBM_BO_USE_LINEAR + const char *accel_method; accel_method = xf86GetOptValString(info->Options, OPTION_ACCEL_METHOD); if ((accel_method && !strcmp(accel_method, "none"))) use_glamor = FALSE; +#endif #ifdef DRI2 info->dri2.available = ! !xf86LoadSubModule(pScrn, "dri2"); |