diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index 103b4a91c..125af1b16 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -3666,7 +3666,12 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height) drmmode->fb_id = 0; if (!drmmode_create_bo(drmmode, &drmmode->front_bo, - width, height, drmmode->kbpp, 0)) + width, height, drmmode->kbpp, +#ifdef HAVE_GBM_BO_USE_FRONT_RENDERING + GBM_BO_USE_FRONT_RENDERING)) +#else + 0)) +#endif goto fail; pitch = drmmode_bo_get_pitch(&drmmode->front_bo); @@ -4439,7 +4444,12 @@ drmmode_create_initial_bos(ScrnInfoPtr pScrn, drmmode_ptr drmmode) width = pScrn->virtualX; height = pScrn->virtualY; - if (!drmmode_create_bo(drmmode, &drmmode->front_bo, width, height, bpp, 0)) + if (!drmmode_create_bo(drmmode, &drmmode->front_bo, width, height, bpp, +#ifdef HAVE_GBM_BO_USE_FRONT_RENDERING + GBM_BO_USE_FRONT_RENDERING)) +#else + 0)) +#endif return FALSE; pScrn->displayWidth = drmmode_bo_get_pitch(&drmmode->front_bo) / cpp; diff --git a/include/meson.build b/include/meson.build index 6d39bf603..fb066043e 100644 --- a/include/meson.build +++ b/include/meson.build @@ -116,6 +116,8 @@ 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('HAVE_GBM_BO_USE_FRONT_RENDERING', + build_glamor and gbm_dep.found() and gbm_dep.version().version_compare('>= 22.3') ? '1' : false) conf_data.set_quoted('SERVER_MISC_CONFIG_PATH', serverconfigdir) conf_data.set_quoted('PROJECTROOT', get_option('prefix'))