compositor-drm: Don't set linear modifier when not supported

This will cause gbm_surface_create_with_modifiers to fail on drivers
where modifiers are not yet supported (e.g. amdgpu). We need to make
sure we only end up using gbm_surface_create in this case.

This fixes the remoting plugin on these drivers.

Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
This commit is contained in:
Scott Anderson 2019-01-28 15:40:55 +13:00
parent be57857af6
commit 99553750db
1 changed files with 1 additions and 1 deletions

View File

@ -4555,7 +4555,7 @@ drm_virtual_plane_create(struct drm_backend *b, struct drm_output *output)
plane->state_cur->complete = true;
plane->formats[0].format = output->gbm_format;
plane->count_formats = 1;
if (output->gbm_bo_flags & GBM_BO_USE_LINEAR) {
if ((output->gbm_bo_flags & GBM_BO_USE_LINEAR) && b->fb_modifiers) {
uint64_t *modifiers = zalloc(sizeof *modifiers);
if (modifiers) {
*modifiers = DRM_FORMAT_MOD_LINEAR;