From b516b009fa28d9de49a63b548eb3c54a9e3905f6 Mon Sep 17 00:00:00 2001 From: Daniel van Vugt Date: Tue, 1 Aug 2023 17:40:43 +0800 Subject: [PATCH] kms/impl-device: Treat handling update as flushing Primary plane updates were forgetting to do this in OnscreenNative, but rather than do it for each post there we should simply do it for each post. This fixes cursor stutter in the fallback path (not using deadline timers) where needs_flush_crtcs would remain populated but CRTC_NEEDS_FLUSH would never be emitted, because handle_flush hadn't been called for the last post. This is safe as the current use of scheduled flushing is only for cursor updates, and since cursor updates happen on the same thread as processing, and due to the fact that we always use the most up to date cursor position when flushing, we never risk leaving an old cursor state unflushed. Part-of: --- src/backends/native/meta-kms-impl-device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backends/native/meta-kms-impl-device.c b/src/backends/native/meta-kms-impl-device.c index a66973c8d..b48dc705e 100644 --- a/src/backends/native/meta-kms-impl-device.c +++ b/src/backends/native/meta-kms-impl-device.c @@ -1515,6 +1515,8 @@ meta_kms_impl_device_handle_update (MetaKmsImplDevice *impl_device, disarm_crtc_frame_deadline_timer (crtc_frame); } + meta_kms_device_handle_flush (priv->device, latch_crtc); + feedback = do_process (impl_device, latch_crtc, update, flags); meta_kms_feedback_unref (feedback); return;