Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/msm/dp: msm_dp_display_mode_valid() ignores info for
  dp->connector
--

commit 9b5a2b4fd3cc486b889af124992a49541fad1c12
Author: Yongxing Mou <[email protected]>

drm/msm/dp: move link capabilities to dp_link

This commit moves link_info (renamed to link_caps) and vsc_sdp_supported
from struct msm_dp_panel to struct msm_dp_link so that SST and MST panels
share the physical link capabilities.

> diff --git a/drivers/gpu/drm/msm/dp/dp_display.c 
> b/drivers/gpu/drm/msm/dp/dp_display.c
> index fb72b77e9c95e..a77a286a24629 100644
> --- a/drivers/gpu/drm/msm/dp/dp_display.c
> +++ b/drivers/gpu/drm/msm/dp/dp_display.c
[ ... ]
> @@ -813,7 +813,7 @@ enum drm_mode_status msm_dp_display_mode_valid(struct 
> msm_dp *dp,
>       }
>  
>       msm_dp_display = container_of(dp, struct msm_dp_display_private, 
> msm_dp_display);
> -     link_info = &msm_dp_display->panel->link_info;
> +     link_info = &msm_dp_display->link->link_caps;
>  
>       is_yuv_420 = drm_mode_is_420_only(&dp->connector->display_info, mode);
>  
> @@ -821,7 +821,7 @@ enum drm_mode_status msm_dp_display_mode_valid(struct 
> msm_dp *dp,
>        * YUV 420 is carried over DP by signalling the colorimetry through a
>        * VSC SDP, so a 420-only mode cannot be driven without VSC SDP support.
>        */
> -     if (is_yuv_420 && !msm_dp_display->panel->vsc_sdp_supported)
> +     if (is_yuv_420 && !msm_dp_display->link->vsc_sdp_supported)
>               return MODE_NO_420;
>  
>       link_pclk_khz = is_yuv_420 ? mode_pclk_khz / 2 : mode_pclk_khz;

[Severity: Medium]
Should msm_dp_display_mode_valid() use its info parameter instead of
dp->connector->display_info when checking drm_mode_is_420_only() and
reading info->bpc?

In MST mode, msm_dp_mst_connector_mode_valid() passes the per-port MST
connector's display_info as info, whereas dp->connector is the root SST
connector whose EDID is not read for MST sinks.  Using
dp->connector->display_info causes YUV 4:2:0-only modes on MST sinks to
go undetected (skipping the vsc_sdp_supported check and failing to halve
the pixel clock, which can reject valid 4:2:0 modes with MODE_CLOCK_HIGH
or MODE_BAD) and computes mode_bpp from the wrong connector.

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

Reply via email to