From 1cc249fe18c8c280d8087642e0ac1f0287c53a64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 10 Oct 2019 10:10:38 +0200 Subject: [PATCH] kms: Always predict state after processing update Not only mode sets have state that should be predicted; changing gamma currently happens with its own update, so we missed predicting that. https://gitlab.gnome.org/GNOME/mutter/merge_requests/840 --- src/backends/native/meta-kms-update-private.h | 2 -- src/backends/native/meta-kms-update.c | 6 ------ src/backends/native/meta-kms.c | 3 +-- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/backends/native/meta-kms-update-private.h b/src/backends/native/meta-kms-update-private.h index 88e2590af..df7737c9b 100644 --- a/src/backends/native/meta-kms-update-private.h +++ b/src/backends/native/meta-kms-update-private.h @@ -110,6 +110,4 @@ GList * meta_kms_update_get_connector_properties (MetaKmsUpdate *update); GList * meta_kms_update_get_crtc_gammas (MetaKmsUpdate *update); -gboolean meta_kms_update_has_mode_set (MetaKmsUpdate *update); - #endif /* META_KMS_UPDATE_PRIVATE_H */ diff --git a/src/backends/native/meta-kms-update.c b/src/backends/native/meta-kms-update.c index 2a4a05c3e..c946aa7a2 100644 --- a/src/backends/native/meta-kms-update.c +++ b/src/backends/native/meta-kms-update.c @@ -282,12 +282,6 @@ meta_kms_update_get_crtc_gammas (MetaKmsUpdate *update) return update->crtc_gammas; } -gboolean -meta_kms_update_has_mode_set (MetaKmsUpdate *update) -{ - return !!update->mode_sets; -} - void meta_kms_update_seal (MetaKmsUpdate *update) { diff --git a/src/backends/native/meta-kms.c b/src/backends/native/meta-kms.c index 9485bb4e8..804a1adda 100644 --- a/src/backends/native/meta-kms.c +++ b/src/backends/native/meta-kms.c @@ -211,8 +211,7 @@ meta_kms_update_process_in_impl (MetaKmsImpl *impl, ret = meta_kms_impl_process_update (impl, update, error); - if (meta_kms_update_has_mode_set (update)) - meta_kms_predict_states_in_impl (meta_kms_impl_get_kms (impl), update); + meta_kms_predict_states_in_impl (meta_kms_impl_get_kms (impl), update); return ret; }