diff options
author | Simon Ser <contact@emersion.fr> | 2020-12-04 17:07:56 +0100 |
---|---|---|
committer | Ilia Bozhinov <ammen99@gmail.com> | 2020-12-30 11:17:43 +0100 |
commit | 7ea0e9f27790a9890e97b3068a681f958197c0e5 (patch) | |
tree | 7abd182aad514fc994cff5b9150d3a8197137d89 /backend | |
parent | caeed70f2859ca6122622b4c768521f2057ed23d (diff) |
backend/drm: force LINEAR for cursor plane formats
If the kernel driver doesn't support modifiers, it still expects cursor
FBs to have a LINEAR layout. See [1] for expectations for framebuffers
attached to the cursor plane.
[1]: https://patchwork.freedesktop.org/patch/408512/
Diffstat (limited to 'backend')
-rw-r--r-- | backend/drm/drm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 06a58d50..771aee24 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -136,6 +136,13 @@ static bool add_plane(struct wlr_drm_backend *drm, } drmModeFreePropertyBlob(blob); + } else if (type == DRM_PLANE_TYPE_CURSOR) { + // Force a LINEAR layout for the cursor if the driver doesn't support + // modifiers + for (size_t i = 0; i < p->formats.len; ++i) { + wlr_drm_format_set_add(&p->formats, p->formats.formats[i]->format, + DRM_FORMAT_MOD_LINEAR); + } } switch (type) { |