[PATCH v4 10/11] drm/bridge: anx7625: fix anx7625_sink_detect() to return correct hpd status
Ayushi Makhija
quic_amakhija at quicinc.com
Wed Apr 23 09:33:02 UTC 2025
On 4/17/2025 4:14 PM, Dmitry Baryshkov wrote:
> On Thu, Apr 17, 2025 at 11:09:08AM +0530, Ayushi Makhija wrote:
>> From: Ayushi Makhija <quic_amakhija at quicinc.com>
>>
>> In the anx7625_sink_detect(), the device is checked to see
>> if it is a panel bridge, and it always sends a "connected"
>> status to the connector. When adding the DP port on port 1 of the
>> anx7625, it incorrectly treats it as a panel bridge and sends an
>> always "connected" status. Instead of checking the status on the
>> panel bridge, it's better to check the hpd_status for connectors
>> that supports hot-plugging. This way, it verifies the hpd_status
>> variable before sending the status to the connector.
>
> Does this work if the Analogix bridge is connected to an eDP panel? In
> such a case it should report 'connected' even before powering up the
> panel (which might mean HPD pin being low).
>
Hi Dmitry,
Thanks for the review.
In case of eDP, anx7625_bridge_detect() will not get called, because this below condition
in anx7625_link_bridge() will not get satisfy. anx7625_sink_detect() is getting called from
anx7625_bridge_detect().
Anx7625_link_bridge()
if (!platform->pdata.panel_bridge || !anx7625_of_panel_on_aux_bus(dev))
platform->bridge.ops |= DRM_BRIDGE_OP_HPD | DRM_BRIDGE_OP_DETECT;
So, during the probe time drm_bridge_connector_detect() will return always connected for eDP
connector. Control will go into the else part and for DRM_MODE_CONNECTOR_eDP it will return
the connector status as connector_status_connected (always connected).
drm_bridge_connector_detect
if (detect) {
status = detect->funcs->detect(detect);
if (hdmi)
drm_atomic_helper_connector_hdmi_hotplug(connector, status);
drm_bridge_connector_hpd_notify(connector, status);
} else {
switch (connector->connector_type) {
case DRM_MODE_CONNECTOR_DPI:
case DRM_MODE_CONNECTOR_LVDS:
case DRM_MODE_CONNECTOR_DSI:
case DRM_MODE_CONNECTOR_eDP:
status = connector_status_connected;
break;
default:
status = connector_status_unknown;
break;
}
}
https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/display/drm_bridge_connector.c#L180
I don't think so, by removing the below lines of code from anx7625_sink_detect(),
will affect the eDP configuration.Let me know, If I am missing anything.
- if (ctx->pdata.panel_bridge)
- return connector_status_connected;
-
Thanks,
Ayushi
>>
>> Signed-off-by: Ayushi Makhija <quic_amakhija at quicinc.com>
>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov at oss.qualcomm.com>
>> ---
>> drivers/gpu/drm/bridge/analogix/anx7625.c | 3 ---
>> 1 file changed, 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
>> index a32ebe1fa0cd..365d1c871028 100644
>> --- a/drivers/gpu/drm/bridge/analogix/anx7625.c
>> +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
>> @@ -1814,9 +1814,6 @@ static enum drm_connector_status anx7625_sink_detect(struct anx7625_data *ctx)
>>
>> DRM_DEV_DEBUG_DRIVER(dev, "sink detect\n");
>>
>> - if (ctx->pdata.panel_bridge)
>> - return connector_status_connected;
>> -
>> return ctx->hpd_status ? connector_status_connected :
>> connector_status_disconnected;
>> }
>> --
>> 2.34.1
>>
>
More information about the dri-devel
mailing list