[mutter/benzea/gamma-fix-master: 1/3] kms: Apply gamma curve after configuring CRTCs




commit 37454c4591532e2cdcc45e7ca3997da0aa5d8bd9
Author: Benjamin Berg <bberg redhat com>
Date:   Thu Aug 27 14:57:36 2020 +0200

    kms: Apply gamma curve after configuring CRTCs
    
    Since commit 2e5b767c0 (gpu/kms: Turn off CRTCs as well for DPMS) we
    turn off the CRTCs. This has the undesired side effect that (at least
    currently) updates the gamma cruves are lost. While this can be
    considered a kernel issue, it has the major side effect of breaking
    Night Light in ugly ways.
    
    To allow fixing this, set the gamma curve after configuring the CRTC.
    This is a prerequisite so that we can re-submit the gamma curve at the
    same time as configuring the CRTC.
    
    See: https://gitlab.gnome.org/GNOME/mutter/-/issues/1392

 src/backends/native/meta-kms-impl-simple.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/backends/native/meta-kms-impl-simple.c b/src/backends/native/meta-kms-impl-simple.c
index 5aa7adc08e..ea41840732 100644
--- a/src/backends/native/meta-kms-impl-simple.c
+++ b/src/backends/native/meta-kms-impl-simple.c
@@ -956,13 +956,6 @@ meta_kms_impl_simple_process_update (MetaKmsImpl   *impl,
                         &error))
     goto err_planes_not_assigned;
 
-  if (!process_entries (impl,
-                        update,
-                        meta_kms_update_get_crtc_gammas (update),
-                        process_crtc_gamma,
-                        &error))
-    goto err_planes_not_assigned;
-
   failed_planes = process_plane_assignments (impl, update);
   if (failed_planes)
     {
@@ -978,6 +971,13 @@ meta_kms_impl_simple_process_update (MetaKmsImpl   *impl,
                         &error))
     goto err_planes_assigned;
 
+  if (!process_entries (impl,
+                        update,
+                        meta_kms_update_get_crtc_gammas (update),
+                        process_crtc_gamma,
+                        &error))
+    goto err_planes_not_assigned;
+
   return meta_kms_feedback_new_passed ();
 
 err_planes_not_assigned:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]