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 743d14a69ac4db117bcd70993b4890a54c2ba917
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 a multi-stream capable controller detects an MST-capable sink before
MST is activated.

> diff --git a/drivers/gpu/drm/msm/dp/dp_display.c 
> b/drivers/gpu/drm/msm/dp/dp_display.c
> index 7f5247cbae035..6f1f9dd3660d0 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 leaving priv->plugged set to true here prevent
msm_dp_hpd_plug_handle() from enabling MST when an MST-capable sink is
connected at boot?

Earlier in msm_dp_bridge_detect(), priv->plugged is set to true before this
check overrides status to connector_status_disconnected while dp->mst_active
is still false.  When msm_dp_hpd_plug_handle() later runs, it returns early
without calling msm_dp_display_process_hpd_high() or
msm_dp_display_mst_enable():

drivers/gpu/drm/msm/dp/dp_display.c:msm_dp_hpd_plug_handle() {
    ...
        if (dp->plugged)
                return 0;
    ...
        ret = msm_dp_display_process_hpd_high(dp);
    ...
}

As a result, the SST connector reports disconnected while MST topology
discovery is never started, leaving both SST and MST display output
non-functional.  In addition, because dp->mst_active stays false while
priv->plugged is true, each later msm_dp_bridge_detect() call takes a new
runtime PM reference via pm_runtime_resume_and_get() and skips
pm_runtime_put_sync() under if (!priv->plugged), leaking a runtime PM
reference per detect call.

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

Reply via email to