From 99553750db20e014a8b2322307eeb25cf2fdb83e Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Mon, 28 Jan 2019 15:40:55 +1300 Subject: [PATCH] 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 --- libweston/compositor-drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index 9ded5265..90e9fb5c 100644 --- a/libweston/compositor-drm.c +++ b/libweston/compositor-drm.c @@ -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;