From 04d89a8bc5c5b0db0ae24ca3e2b35f5632ed6d23 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sun, 17 Jan 2021 22:25:18 +0100 Subject: backend/drm: fix modifiers for cursor plane buffers In 93cd3a79b26c ("backend/drm: stop using GBM flags"), we stopped using the GBM_BO_USE_LINEAR flag in favor of a modifier list set to { DRM_FORMAT_MOD_LINEAR }. However, the last argument of drm_plane_init_surface disables modifiers -- so the buffer will just get allocated with an implicit modifier, without necessarily being LINEAR. To fix this, allow modifiers when allocating the cursor buffers. wlr_drm_plane.formats should already have the necessary LINEAR restrictions. Fixes: 93cd3a79b26c ("backend/drm: stop using GBM flags") --- backend/drm/drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backend/drm/drm.c') diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 99520143..32fbb35b 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -891,7 +891,7 @@ static bool drm_connector_set_cursor(struct wlr_output *output, h = ret ? 64 : h; if (!drm_plane_init_surface(plane, drm, w, h, - DRM_FORMAT_ARGB8888, false)) { + DRM_FORMAT_ARGB8888, true)) { wlr_drm_conn_log(conn, WLR_ERROR, "Cannot allocate cursor resources"); return false; } -- cgit v1.2.3