kms/impl/simple: Make sure cursor buffers have fb ids

'kms/impl-device/simple: Get the buffer handle from MetaDrmBuffer'
changed how fb ids are generated, but it only made it fully work with
atomic mode setting. For legacy/simple mode setting, it only handled the
primary plane buffer, not the hardware cursor.

Fix this by making sure the fb id is generated also in the legacy mode
setting case.

Fixes: ea39142da2
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2250
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2397>
This commit is contained in:
Jonas Ådahl 2022-05-02 12:42:20 +02:00 committed by Marge Bot
parent 03929ca01f
commit 5404eb34f8

View File

@ -1209,9 +1209,16 @@ process_cursor_plane_assignment (MetaKmsImplDevice *impl_device,
height = plane_assignment->dst_rect.height; height = plane_assignment->dst_rect.height;
if (plane_assignment->buffer) if (plane_assignment->buffer)
handle_u32 = meta_drm_buffer_get_handle (plane_assignment->buffer); {
if (!meta_drm_buffer_ensure_fb_id (plane_assignment->buffer, error))
return FALSE;
handle_u32 = meta_drm_buffer_get_handle (plane_assignment->buffer);
}
else else
handle_u32 = 0; {
handle_u32 = 0;
}
meta_topic (META_DEBUG_KMS, meta_topic (META_DEBUG_KMS,
"[simple] Setting HW cursor of CRTC %u (%s) to %u " "[simple] Setting HW cursor of CRTC %u (%s) to %u "