Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] drm/msm/dp: msm_dp_bridge_detect() sets plugged and blocks boot
  MST enable
--

commit 6523f8221c3f008ff483a89b251f28757e2c5462
Author: Abhinav Kumar <[email protected]>

drm/msm/dp: mark the SST bridge disconnected when an MST-capable sink is present

This commit returns connector_status_disconnected from
msm_dp_bridge_detect() when the controller supports multi-stream and the
connected sink reports MST capability.

> diff --git a/drivers/gpu/drm/msm/dp/dp_display.c 
> b/drivers/gpu/drm/msm/dp/dp_display.c
> index eeb0e04949000..8ea3d258a98f3 100644
> --- a/drivers/gpu/drm/msm/dp/dp_display.c
> +++ b/drivers/gpu/drm/msm/dp/dp_display.c
> @@ -1063,6 +1063,11 @@ enum drm_connector_status msm_dp_bridge_detect(struct 
> drm_bridge *bridge,
>                       status = connector_status_disconnected;
>       }
>  
> +     /* Mark SST connector as disconnected in DP boot-up case */
> +     if (msm_dp_ctrl_get_stream_cnt(priv->ctrl) > 1 &&
> +         drm_dp_read_mst_cap(priv->aux, dpcd) == DRM_DP_MST)
> +             status = connector_status_disconnected;

[Severity: High]
Does returning connector_status_disconnected here after setting
priv->plugged = true prevent msm_dp_hpd_plug_handle() from enabling MST on
boot?

When msm_dp_bridge_detect() runs before msm_dp_hpd_plug_handle() at boot,
it sets priv->plugged = true earlier in the function and then overrides
status to connector_status_disconnected without enabling MST.  When the
HPD plug notification subsequently runs, msm_dp_hpd_plug_handle() sees
dp->plugged is already true and returns early:

drivers/gpu/drm/msm/dp/dp_display.c:msm_dp_hpd_plug_handle() {
        ...
        guard(mutex)(&dp->plugged_lock);

        if (dp->plugged)
                return 0;
        ...
        ret = msm_dp_display_process_hpd_high(dp);
        ...
}

As a result, msm_dp_display_process_hpd_high() and
msm_dp_display_mst_enable() are never called, leaving the SST connector
disconnected and the MST topology manager inactive until the cable is
replugged.  In addition, if msm_dp_display_mst_enable() fails during
msm_dp_display_process_hpd_high(), unconditionally returning
connector_status_disconnected here prevents falling back to SST.

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

Reply via email to