From 23238b175a69d99c4a3c13496ccb75b5745b597c Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Tue, 12 Sep 2023 13:41:49 +0200 Subject: [PATCH] backends/drm: fix the hardware cursor with atomic modesetting + no modifier support Unless we have explicit information of the opposite, buffers for the cursor need to be linear --- src/backends/drm/drm_plane.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backends/drm/drm_plane.cpp b/src/backends/drm/drm_plane.cpp index 99da63b40c..4e211a8562 100644 --- a/src/backends/drm/drm_plane.cpp +++ b/src/backends/drm/drm_plane.cpp @@ -95,7 +95,8 @@ bool DrmPlane::updateProperties() m_supportedFormats[iterator.fmt].push_back(iterator.mod); } } else { - const QVector modifiers = {DRM_FORMAT_MOD_INVALID}; + // if we don't have modifier support, assume the cursor needs a linear buffer + const QVector modifiers = {type.enumValue() == TypeIndex::Cursor ? DRM_FORMAT_MOD_LINEAR : DRM_FORMAT_MOD_INVALID}; for (uint32_t i = 0; i < p->count_formats; i++) { m_supportedFormats.insert(p->formats[i], modifiers); }