kms/impl-device: Process pending update from _schedule_process

If ensure_deadline_timer_armed fails and crtc_frame->pending_update is
non-NULL, we need to process the pending update, or it may fall through
the cracks, and this stage view may freeze.

v2:
* Don't return immediately after calling
  meta_kms_impl_device_do_process_update. (Sebastian Wick)
v3:
* Call meta_kms_impl_device_do_process_update only if
  is_using_deadline_timer returned true, and log a warning if
  crtc_frame->pending_update is non-NULL otherwise.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4321>
This commit is contained in:
Michel Dänzer 2025-03-06 16:31:47 +01:00 committed by Marge Bot
parent 46dfb4c4d0
commit d5bcce3859

View File

@ -2080,6 +2080,23 @@ meta_kms_impl_device_schedule_process (MetaKmsImplDevice *impl_device,
if (ensure_deadline_timer_armed (impl_device, crtc_frame))
return;
if (crtc_frame->pending_update)
{
meta_kms_impl_device_do_process_update (impl_device, crtc_frame,
crtc_frame->crtc,
crtc_frame->pending_update,
META_KMS_UPDATE_FLAG_NONE);
}
}
if (crtc_frame->pending_update)
{
MetaKmsImplDevicePrivate *priv =
meta_kms_impl_device_get_instance_private (impl_device);
g_warning_once ("crtc_frame->pending_update=%p, deadline_timer_state=%d",
crtc_frame->pending_update, priv->deadline_timer_state);
}
meta_kms_device_set_needs_flush (meta_kms_crtc_get_device (crtc), crtc);