From ef1669d33e15134e09d30c6989d53773629fd9ba Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 24 Nov 2021 12:17:39 +0100 Subject: backend/drm: always add LINEAR to supported modifiers --- backend/drm/drm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'backend') diff --git a/backend/drm/drm.c b/backend/drm/drm.c index e22e0690..d7c53231 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -121,11 +121,12 @@ static bool add_plane(struct wlr_drm_backend *drm, for (size_t i = 0; i < drm_plane->count_formats; ++i) { // Force a LINEAR layout for the cursor if the driver doesn't support // modifiers - uint64_t mod = DRM_FORMAT_MOD_INVALID; - if (type == DRM_PLANE_TYPE_CURSOR) { - mod = DRM_FORMAT_MOD_LINEAR; + wlr_drm_format_set_add(&p->formats, drm_plane->formats[i], + DRM_FORMAT_MOD_LINEAR); + if (type != DRM_PLANE_TYPE_CURSOR) { + wlr_drm_format_set_add(&p->formats, drm_plane->formats[i], + DRM_FORMAT_MOD_INVALID); } - wlr_drm_format_set_add(&p->formats, drm_plane->formats[i], mod); } if (p->props.in_formats && drm->addfb2_modifiers) { -- cgit v1.2.3