Userspace expects that colorop settings of an inactive color pipeline
persist, so that, when the color pipeline is activated again, preserves
the values they had when it was deactivated. Colorop setup is expected
to persist even during a suspend/resume. To snapshot colorop settings
correctly, duplicate state of all colorops in a given plane, regardless
of whether color pipeline is active. Depends on skipping
drm_atomic_colorop_check() for duplicated state done in previous commit.

Reviewed-by: Harry Wentland <[email protected]>
Signed-off-by: Melissa Wen <[email protected]>
---
 drivers/gpu/drm/drm_atomic_helper.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic_helper.c 
b/drivers/gpu/drm/drm_atomic_helper.c
index ccfe3840d505..60e69061faa9 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -3758,12 +3758,9 @@ drm_atomic_helper_duplicate_state(struct drm_device *dev,
                        goto free;
                }
 
-               if (plane_state->color_pipeline) {
-                       err = drm_atomic_add_affected_colorops(state, plane);
-                       if (err)
-                               goto free;
-               }
-
+               err = drm_atomic_add_affected_colorops(state, plane);
+               if (err)
+                       goto free;
        }
 
        drm_connector_list_iter_begin(dev, &conn_iter);
-- 
2.53.0

Reply via email to