Userspace expects that colorop settings of an inactive color pipeline
persist, so that, when the color pipeline is activated again, colorops
previously set preserves their values 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, independent if color pipeline is active or not.

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 51f39edc31ed..ea15e58518fd 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -3752,12 +3752,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