From 51bc12f7ec8fa52bc5d4607dbf440166cb0c6647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 21 Mar 2025 17:04:24 +0100 Subject: [PATCH] Revert "kms/impl-device: Always catch pending KMS update in _schedule_process" Revert this due to the KMS thread not being supposed to handle multiple updates per cycle. This reverts commit d6005b539ca42905dfaf1c3854540a559332b78e. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3977 Part-of: --- src/backends/native/meta-kms-impl-device.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/backends/native/meta-kms-impl-device.c b/src/backends/native/meta-kms-impl-device.c index 6f29303b8..c265e6e97 100644 --- a/src/backends/native/meta-kms-impl-device.c +++ b/src/backends/native/meta-kms-impl-device.c @@ -2081,8 +2081,17 @@ 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); + } } - else if (crtc_frame->pending_update) + + if (crtc_frame->pending_update) { MetaKmsImplDevicePrivate *priv = meta_kms_impl_device_get_instance_private (impl_device); @@ -2091,14 +2100,6 @@ meta_kms_impl_device_schedule_process (MetaKmsImplDevice *impl_device, crtc_frame->pending_update, priv->deadline_timer_state); } - 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); - } - meta_kms_device_set_needs_flush (meta_kms_crtc_get_device (crtc), crtc); }