Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [High] YUV range correction is not disabled for full-range YCbCr formats when 
a color pipeline is active on an SDR plane.
--

--- Patch [6]: [v5 06/14] drm/i915/display: Program input CSC on SDR planes ---
commit 8a9ffb3a71cf84165b43a62eef15fa69e1d8e5a0
Author: Chaitanya Kumar Borah <[email protected]>

drm/i915/display: Program input CSC on SDR planes

When a color pipeline is active, program the SDR plane fixed-function
CSC. Keep the legacy color_encoding/color_range properties mutually
exclusive with color pipeline uapi.

> diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c 
> b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> index da2df5be9848d..9893b061da5fa 100644
> --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
> +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
[ ... ]
> @@ -1240,33 +1240,62 @@ static u32 glk_plane_color_ctl_crtc(const struct 
> intel_crtc_state *crtc_state)
[ ... ]
>  static u32 glk_plane_color_ctl_input_csc(const struct intel_plane_state 
> *plane_state)
>  {
[ ... ]
> +             if (plane_state->hw.color_range == DRM_COLOR_YCBCR_FULL_RANGE)
> +                     ctl |= PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE;
> +     } else if (!icl_is_hdr_plane(display, plane->id)) {
> +             if (plane_state->hw.csc_ff_enable)
> +                     ctl |= 
> intel_csc_ff_type_to_csc_mode(plane_state->hw.csc_ff_type);
> +     }

[Severity: High]
Does this code miss disabling YUV range correction for full-range YCbCr formats
when a color pipeline is active?

Userspace configuring an SDR plane with a color pipeline using one of the
supported DRM_COLOROP_FM_YCBCR*_FULL_RGB fixed matrix operations will map to
PLANE_COLOR_CSC_MODE_YUV* modes, but it doesn't appear to set the
PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE bit here.

Could this lead to the hardware performing an unintended limited-to-full
range correction on full-range YCbCr data?

>  
>       return ctl;
>  }

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=6

Reply via email to