From 83b762e0e4dcaee8cf8a6bc5c6810a94a6241014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Tue, 3 Oct 2023 18:24:06 +0200 Subject: [PATCH] kms/impl-device: Reverse update merge order in process_mode_set_update This makes sure the new update takes effect over the pending update for any common properties. It matches the other users of meta_kms_update_merge_from. Fixes: 27ed06976639 ("kms/impl-device: Add deadline based KMS commit scheduling") Part-of: --- src/backends/native/meta-kms-impl-device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/backends/native/meta-kms-impl-device.c b/src/backends/native/meta-kms-impl-device.c index da372383d..8f88219fe 100644 --- a/src/backends/native/meta-kms-impl-device.c +++ b/src/backends/native/meta-kms-impl-device.c @@ -1597,8 +1597,9 @@ process_mode_set_update (MetaKmsImplDevice *impl_device, if (!crtc_frame->pending_update) continue; - meta_kms_update_merge_from (update, crtc_frame->pending_update); - g_clear_pointer (&crtc_frame->pending_update, meta_kms_update_free); + meta_kms_update_merge_from (crtc_frame->pending_update, update); + meta_kms_update_free (update); + update = g_steal_pointer (&crtc_frame->pending_update); } g_hash_table_iter_init (&iter, priv->crtc_frames);