1
0
Fork 0

kms/impl-device: Merge in submitted update in process_mode_set_update

This has to be done for all CRTCs of the device, not only those with a
modeset, which requires merging in the pending updates for all CRTCs as
well.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3999>
This commit is contained in:
Michel Dänzer 2024-09-02 16:53:52 +02:00 committed by Marge Bot
parent b2761819e4
commit 42290730e8

View file

@ -2057,25 +2057,28 @@ process_mode_set_update (MetaKmsImplDevice *impl_device,
MetaThreadImpl *thread_impl = META_THREAD_IMPL (kms_impl);
MetaThread *thread = meta_thread_impl_get_thread (thread_impl);
MetaKmsFeedback *feedback;
GHashTableIter iter;
CrtcFrame *crtc_frame;
GList *l;
for (l = meta_kms_update_get_mode_sets (update); l; l = l->next)
g_hash_table_iter_init (&iter, priv->crtc_frames);
while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &crtc_frame))
{
MetaKmsModeSet *mode_set = l->data;
MetaKmsCrtc *crtc = mode_set->crtc;
crtc_frame = get_crtc_frame (impl_device, crtc);
if (!crtc_frame)
continue;
if (!crtc_frame->pending_update)
continue;
if (crtc_frame->submitted_update.kms_update)
{
meta_kms_update_merge_from (crtc_frame->submitted_update.kms_update,
update);
meta_kms_update_free (update);
update = g_steal_pointer (&crtc_frame->submitted_update.kms_update);
g_clear_pointer (&crtc_frame->submitted_update.source, g_source_destroy);
}
if (crtc_frame->pending_update)
{
meta_kms_update_merge_from (crtc_frame->pending_update, update);
meta_kms_update_free (update);
update = g_steal_pointer (&crtc_frame->pending_update);
}
}
disarm_all_deadline_timers (impl_device);