From e2d189ba524b957f64981e256cdf0bcdbe91b11e Mon Sep 17 00:00:00 2001 From: dar1k-ness Date: Sat, 14 Nov 2026 20:58:41 +0300 Subject: [PATCH] drm: skip modifiers already in the plane format list Since 7.3 amdgpu exposes IN_FORMATS on the cursor plane for older cards too (hit this on an RX 580), so LINEAR ends up in the list twice. The gbm fallback only handles the list being exactly LINEAR, so with the dup the cursor bo gets allocated with DRM_FORMAT_MOD_INVALID, which can't go on the cursor plane and the cursor is just gone. --- src/backend/drm/DRM.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/drm/DRM.cpp b/src/backend/drm/DRM.cpp index e2e9b7c0..14bb8549 100644 --- a/src/backend/drm/DRM.cpp +++ b/src/backend/drm/DRM.cpp @@ -1698,7 +1698,7 @@ bool Aquamarine::SDRMPlane::init(drmModePlane* plane) { if (it == formats.end()) formats.emplace_back(SDRMFormat{.drmFormat = iter.fmt, .modifiers = {iter.mod}}); - else + else if (std::ranges::find(it->modifiers, iter.mod) == it->modifiers.end()) it->modifiers.emplace_back(iter.mod); }