Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/dp: drm_dp_downstream_max_tmds_clock() uses sink EDID for
  DFP limit
--

commit 3f7cc9438aa51a2bb27f49e36ae50fec8c07ea94
Author: Petter Skjelsbæk <[email protected]>

drm/dp: allow dual-link clock for 30-inch Apple Cinema HD

This commit returns a 300 MHz maximum downstream TMDS clock in
drm_dp_downstream_max_tmds_clock() when an Apple Cinema HD Display
(APP 0x9221) is attached to a DVI downstream port without detailed
capability information.

> diff --git a/drivers/gpu/drm/display/drm_dp_helper.c 
> b/drivers/gpu/drm/display/drm_dp_helper.c
> index a2959db1d956e..09e82a6d7f6ab 100644
> --- a/drivers/gpu/drm/display/drm_dp_helper.c
> +++ b/drivers/gpu/drm/display/drm_dp_helper.c
> @@ -1388,8 +1388,15 @@ int drm_dp_downstream_max_tmds_clock(const u8 
> dpcd[DP_RECEIVER_CAP_SIZE],
>                       return 300000;
>               return port_cap[1] * 2500;
>       case DP_DS_PORT_TYPE_DVI:
> -             if ((dpcd[DP_DOWNSTREAMPORT_PRESENT] & 
> DP_DETAILED_CAP_INFO_AVAILABLE) == 0)
> +             if ((dpcd[DP_DOWNSTREAMPORT_PRESENT] &
> +                  DP_DETAILED_CAP_INFO_AVAILABLE) == 0) {
> +                     if (drm_edid &&
> +                         drm_edid_get_panel_id(drm_edid) ==
> +                         drm_edid_encode_panel_id('A', 'P', 'P', 0x9221))
> +                             return 300000;
>                       return 165000;
> +             }

[Severity: Medium]
Should drm_dp_downstream_max_tmds_clock() derive the branch device's
downstream port limit from the attached sink's EDID panel ID?

drm_dp_downstream_max_tmds_clock() reports the capability of the DP-to-DVI
branch adapter (stored in intel_dp->dfp.max_tmds_clock by
intel_dp_update_dfp()), not the monitor.  If the APP 0x9221 display is
connected through a single-link DP-to-DVI adapter that lacks
DP_DETAILED_CAP_INFO_AVAILABLE, this returns 300 MHz and exposes the
268 MHz 2560x1600 native mode that the single-link adapter cannot drive,
while any other dual-link DVI monitor on the Apple dual-link adapter
remains capped at 165 MHz.

Could the quirk instead identify the branch adapter itself via its DPCD
branch descriptor (DP_BRANCH_OUI / DP_BRANCH_ID)?

-- 
Sashiko AI review · 
https://sashiko.dev/#/patchset/[email protected]?part=1

Reply via email to