Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Medium] The logic for identifying a Virtual DPCD downstream port misses the 
required DPCD_Revision check, causing standard legacy converters to be 
incorrectly identified as Virtual DPCDs.
--

commit 659313a54262ef8ae8960a7c3b7925da1958206b
Author: Xiao Lu <[email protected]>

    drm/dp/mst: recognize DP-to-HDMI PCON as virtual DPCD in DP-to-DP topology

This commit updates drm_dp_mst_is_virtual_dpcd() to accept legacy converters
as a valid downstream peer type. This allows the driver to correctly identify
PCON devices that advertise their downstream HDMI sink port using
DP_PEER_DEVICE_DP_LEGACY_CONV.

> diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c 
> b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> index 7ce9e212770ad..5f15d9313a20e 100644
> --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> @@ -6047,7 +6047,8 @@ static bool drm_dp_mst_is_virtual_dpcd(struct 
> drm_dp_mst_port *port)
>           port->mstb &&
>           port->mstb->num_ports == 2) {
>               list_for_each_entry(downstream_port, &port->mstb->ports, next) {
> -                     if (downstream_port->pdt == DP_PEER_DEVICE_SST_SINK &&
> +                     if ((downstream_port->pdt == DP_PEER_DEVICE_SST_SINK ||
> +                          downstream_port->pdt == 
> DP_PEER_DEVICE_DP_LEGACY_CONV) &&
>                           !downstream_port->input) {
>                               mutex_unlock(&port->mgr->lock);
>                               return true;

[Severity: Medium]
Will this incorrectly identify standard legacy converters as Virtual DPCDs?

The commit message notes that Virtual DPCD presence for legacy converters
is indicated by a non-zero DPCD_Revision (VESA SCR Option 2), but the added
logic accepts DP_PEER_DEVICE_DP_LEGACY_CONV without verifying if
downstream_port->dpcd_rev != 0.

Could this cause the driver to improperly set passthrough_aux and attempt
DPCD reads on a standard DP-to-VGA/DVI/HDMI converter (with dpcd_rev == 0)
connected to a 2-port MST branch device, resulting in AUX timeouts or link
training failures?

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

Reply via email to