From 3353962c381056391f6ea9845e24518331c60c87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Mon, 19 Aug 2024 18:57:52 +0200 Subject: [PATCH] kms/impl-device: Move up ensure_deadline_timer_armed definition Preparation for next commit, no functional change intended. Part-of: --- src/backends/native/meta-kms-impl-device.c | 48 +++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/backends/native/meta-kms-impl-device.c b/src/backends/native/meta-kms-impl-device.c index 6c5786251..9257c5c14 100644 --- a/src/backends/native/meta-kms-impl-device.c +++ b/src/backends/native/meta-kms-impl-device.c @@ -1359,6 +1359,30 @@ arm_crtc_frame_deadline_timer (CrtcFrame *crtc_frame, crtc_frame->deadline.armed = TRUE; } +static gboolean +ensure_deadline_timer_armed (MetaKmsImplDevice *impl_device, + CrtcFrame *crtc_frame, + GError **error) +{ + int64_t next_deadline_us; + int64_t next_presentation_us; + + if (crtc_frame->deadline.armed) + return TRUE; + + if (!meta_kms_crtc_determine_deadline (crtc_frame->crtc, + &next_deadline_us, + &next_presentation_us, + error)) + return FALSE; + + arm_crtc_frame_deadline_timer (crtc_frame, + next_deadline_us, + next_presentation_us); + + return TRUE; +} + static void notify_crtc_frame_ready (CrtcFrame *crtc_frame) { @@ -1975,30 +1999,6 @@ meta_kms_impl_device_await_flush (MetaKmsImplDevice *impl_device, disarm_crtc_frame_deadline_timer (crtc_frame); } -static gboolean -ensure_deadline_timer_armed (MetaKmsImplDevice *impl_device, - CrtcFrame *crtc_frame, - GError **error) -{ - int64_t next_deadline_us; - int64_t next_presentation_us; - - if (crtc_frame->deadline.armed) - return TRUE; - - if (!meta_kms_crtc_determine_deadline (crtc_frame->crtc, - &next_deadline_us, - &next_presentation_us, - error)) - return FALSE; - - arm_crtc_frame_deadline_timer (crtc_frame, - next_deadline_us, - next_presentation_us); - - return TRUE; -} - void meta_kms_impl_device_schedule_process (MetaKmsImplDevice *impl_device, MetaKmsCrtc *crtc)