diff options
| author | Melissa Wen <mwen@igalia.com> | 2026-03-18 13:27:11 -0300 |
|---|---|---|
| committer | Melissa Wen <melissa.srw@gmail.com> | 2026-04-16 11:49:09 -0300 |
| commit | 6bf7969a145e13a3390143038fe82c52025aeb93 (patch) | |
| tree | eb8102a464635a75e9cf1ed64352bdd3ba9d0a69 /include | |
| parent | 6597ff1d8de3f583be169587efeafd8af134e138 (diff) | |
drm/drm_atomic: duplicate colorop states if plane color pipeline in use
For suspend/resume to work correctly, do for colorop state the same we
do for plane/crtc/connector states: duplicate the state of colorops in a
color pipeline if it's in use by a given plane when suspending and
restore cached colorop states when resuming. While at it, prevent
unused-variable warning when using for_each_new_colorop_in_stage here.
Fixes: 2afc3184f3b3 ("drm/plane: Add COLOR PIPELINE property")
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Signed-off-by: Melissa Wen <mwen@igalia.com>
Link: https://patch.msgid.link/20260318163629.300627-1-mwen@igalia.com
Signed-off-by: Melissa Wen <melissa.srw@gmail.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/drm/drm_atomic.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h index 178f8f62c80f..b0926f1531df 100644 --- a/include/drm/drm_atomic.h +++ b/include/drm/drm_atomic.h @@ -1089,7 +1089,8 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); for_each_if ((__state)->colorops[__i].ptr && \ ((colorop) = (__state)->colorops[__i].ptr, \ (void)(colorop) /* Only to avoid unused-but-set-variable warning */, \ - (new_colorop_state) = (__state)->colorops[__i].new_state, 1)) + (new_colorop_state) = (__state)->colorops[__i].new_state,\ + (void)(new_colorop_state) /* Only to avoid unused-but-set-variable warning */, 1)) /** * for_each_oldnew_plane_in_state - iterate over all planes in an atomic update |
