The __set_dm_plane_colorop_csc() function was unconditionally programming the CSC (color space conversion) even when the bypass property was set. This meant that even when userspace set BYPASS=1, the hardware would still use the CSC.
Add a check for colorop_state->bypass and reset dc_plane_state->color_space to COLOR_SPACE_UNKNOWN when CSC is bypassed, properly indicating that no YUV->RGB conversion should be performed by the hardware. This matches the behavior of other colorops in the pipeline which respect the bypass property. Co-developed by Claude Sonnet 4.5. Signed-off-by: Harry Wentland <[email protected]> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c index 0d58eb45552d..79ca7e891244 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c @@ -1931,6 +1931,12 @@ __set_dm_plane_colorop_csc(struct drm_plane_state *plane_state, if (IS_ERR(colorop_state)) return PTR_ERR(colorop_state); + /* If CSC is in bypass, reset color_space to unknown (no conversion) */ + if (colorop_state->bypass) { + dc_plane_state->color_space = COLOR_SPACE_UNKNOWN; + return 0; + } + encoding = colorop_state->color_encoding; range = colorop_state->color_range; full_range = (range == DRM_COLOR_YCBCR_FULL_RANGE); -- 2.53.0
