Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/bridge_connector: check detect->type in
  drm_bridge_connector_detect_ctx()
--

commit 04bf0f44e3eb4437286f57eb3ea7a63feed9cedc
Author: Yongxing Mou <[email protected]>

drm/bridge_connector: avoid detect-based HPD notifications for DisplayPort

This commit skips calling drm_bridge_connector_hpd_notify() from
drm_bridge_connector_detect_ctx() for DisplayPort connectors that have an
HPD bridge.

> diff --git a/drivers/gpu/drm/display/drm_bridge_connector.c 
> b/drivers/gpu/drm/display/drm_bridge_connector.c
> index 1d4502126bff3..dbe874d26911b 100644
> --- a/drivers/gpu/drm/display/drm_bridge_connector.c
> +++ b/drivers/gpu/drm/display/drm_bridge_connector.c
> @@ -315,7 +315,10 @@ static int drm_bridge_connector_detect_ctx(struct 
> drm_connector *connector,
>                               return ret;
>               }
>  
> -             drm_bridge_connector_hpd_notify(connector, status, 
> DRM_CONNECTOR_NO_EXTRA_STATUS);
> +             if (connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort 
> ||
> +                 !bridge_connector->bridge_hpd)
> +                     drm_bridge_connector_hpd_notify(connector, status,
> +                                                     
> DRM_CONNECTOR_NO_EXTRA_STATUS);

[Severity: Medium]
Should this check detect->type rather than connector->connector_type?

In drm_bridge_connector_init(), connector->connector_type is taken from the
last bridge in the chain:

drivers/gpu/drm/display/drm_bridge_connector.c:drm_bridge_connector_init() {
        ...
                if (drm_bridge_is_last(bridge))
                        connector_type = bridge->type;
        ...
}

On DisplayPort pipelines where msm_dp is followed by a terminal Type-C HPD
bridge (such as acer-aspire1-ec setting bridge.type to
DRM_MODE_CONNECTOR_USB) or a DP-to-HDMI branch bridge and hdmi-connector
(DRM_MODE_CONNECTOR_HDMIA), detect is the DisplayPort bridge while
connector->connector_type is not DRM_MODE_CONNECTOR_DisplayPort.  When
detect->funcs->detect() returns connector_status_disconnected while the DP
link is active, drm_bridge_connector_detect_ctx() will still send a
disconnected HPD notification that tears down the active DP link and MST
topology.

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

Reply via email to