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:
parent
b2761819e4
commit
42290730e8
1 changed files with 17 additions and 14 deletions
|
@ -2057,24 +2057,27 @@ 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;
|
||||
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);
|
||||
}
|
||||
|
||||
crtc_frame = get_crtc_frame (impl_device, crtc);
|
||||
if (!crtc_frame)
|
||||
continue;
|
||||
|
||||
if (!crtc_frame->pending_update)
|
||||
continue;
|
||||
|
||||
meta_kms_update_merge_from (crtc_frame->pending_update, update);
|
||||
meta_kms_update_free (update);
|
||||
update = g_steal_pointer (&crtc_frame->pending_update);
|
||||
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue