mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-03-31 01:50:35 +02:00
modesetting: use GBM_BO_USE_FRONT_RENDERING for front_bo
This flag is useful for drivers that need to take some action to deal with front buffer rendering. For instance, disabling framebuffer compression. Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
This commit is contained in:
parent
d0214596ae
commit
696e6a046c
2 changed files with 14 additions and 2 deletions
|
|
@ -3677,7 +3677,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);
|
||||
|
|
@ -4458,7 +4463,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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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'))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue