kms/cursor-manager: Create CrtcStateImpls for all active CRTCs

even if they don't have a cursor plane. This way we can just use the
object. Updating the cursor plane then just looks at the cursor_plane
field to skips updates when there is none.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3254
Fixes: cc7bca073 ("crtc/kms: Dynamically assign primary and cursor planes")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3539>
This commit is contained in:
Sebastian Wick 2024-01-22 12:45:37 +01:00 committed by Marge Bot
parent 0eaf4b4f4c
commit af0ca0cdc2
2 changed files with 4 additions and 4 deletions

View File

@ -333,6 +333,10 @@ maybe_update_cursor_plane (MetaKmsCursorManagerImpl *cursor_manager_impl,
crtc_state_impl = find_crtc_state (cursor_manager_impl, crtc);
g_return_val_if_fail (crtc_state_impl, update);
cursor_plane = crtc_state_impl->cursor_plane;
if (!cursor_plane)
return update;
if (!crtc_state_impl->cursor_invalidated)
return update;
@ -368,8 +372,6 @@ maybe_update_cursor_plane (MetaKmsCursorManagerImpl *cursor_manager_impl,
meta_kms_update_realize (update, impl_device);
}
cursor_plane = crtc_state_impl->cursor_plane;
if (should_have_cursor)
{
int width, height;

View File

@ -1128,8 +1128,6 @@ meta_renderer_native_queue_modes_reset (MetaRendererNative *renderer_native)
crtc_kms = META_CRTC_KMS (crtc);
kms_plane = meta_crtc_kms_get_assigned_cursor_plane (crtc_kms);
if (!kms_plane)
continue;
kms_crtc = meta_crtc_kms_get_kms_crtc (crtc_kms);
clutter_stage_view_get_layout (stage_view, &view_layout);