diff --git a/hw/xfree86/drivers/video/modesetting/driver.c b/hw/xfree86/drivers/video/modesetting/driver.c index 5332fab1ad..a2c0642cd5 100644 --- a/hw/xfree86/drivers/video/modesetting/driver.c +++ b/hw/xfree86/drivers/video/modesetting/driver.c @@ -312,7 +312,7 @@ check_outputs(int fd, int *count) *count = res->count_connectors; ret = res->count_connectors > 0; -#if defined(GLAMOR) && defined(GBM_BO_USE_LINEAR) +#if defined(GLAMOR) && defined(GBM_HAVE_BO_USE_LINEAR) if (ret == FALSE) { uint64_t value = 0; if (drmGetCap(fd, DRM_CAP_PRIME, &value) == 0 && @@ -1379,7 +1379,7 @@ PreInit(ScrnInfoPtr pScrn, int flags) if (ms->drmmode.glamor) pScrn->capabilities |= RR_Capability_SinkOffload; } -#if defined(GLAMOR) && defined(GBM_BO_USE_LINEAR) +#if defined(GLAMOR) && defined(GBM_HAVE_BO_USE_LINEAR) if (value & DRM_PRIME_CAP_EXPORT && ms->drmmode.glamor) pScrn->capabilities |= RR_Capability_SourceOutput | RR_Capability_SourceOffload; #endif diff --git a/hw/xfree86/drivers/video/modesetting/drmmode_bo.c b/hw/xfree86/drivers/video/modesetting/drmmode_bo.c index 65114b0b76..9abae118a6 100644 --- a/hw/xfree86/drivers/video/modesetting/drmmode_bo.c +++ b/hw/xfree86/drivers/video/modesetting/drmmode_bo.c @@ -27,11 +27,11 @@ typedef struct { Bool used_modifiers; } bo_priv_t; -#ifndef GBM_BO_USE_LINEAR +#ifndef GBM_HAVE_BO_USE_LINEAR #define GBM_BO_USE_LINEAR 0 #endif -#ifndef GBM_BO_USE_FRONT_RENDERING +#ifndef GBM_HAVE_BO_USE_FRONT_RENDERING #define GBM_BO_USE_FRONT_RENDERING 0 #endif diff --git a/include/meson.build b/include/meson.build index 1f74b8e459..3e22a38fa0 100644 --- a/include/meson.build +++ b/include/meson.build @@ -112,6 +112,10 @@ conf_data.set('GBM_BO_FD_FOR_PLANE', build_glamor and gbm_dep.found() and gbm_dep.version().version_compare('>= 21.1') ? '1' : false) conf_data.set('GBM_BO_WITH_MODIFIERS2', build_glamor and gbm_dep.found() and gbm_dep.version().version_compare('>= 21.3') ? '1' : false) +conf_data.set('GBM_HAVE_BO_USE_LINEAR', + build_glamor and gbm_dep.found() and cc.has_header_symbol('gbm.h', 'GBM_BO_USE_LINEAR', dependencies : gbm_dep ) ? '1' : false) +conf_data.set('GBM_HAVE_BO_USE_FRONT_RENDERING', + build_glamor and gbm_dep.found() and cc.has_header_symbol('gbm.h','GBM_BO_USE_FRONT_RENDERING', dependencies: gbm_dep ) ? '1' : false) conf_data.set_quoted('SERVER_MISC_CONFIG_PATH', serverconfigdir) conf_data.set_quoted('PROJECTROOT', get_option('prefix'))