Message ID | 20250321085345.136380-1-andyshrk@163.com |
---|---|
Headers | show |
Series | Pass down connector to drm bridge detect hook | expand |
On Fri, Mar 21, 2025 at 04:53:38PM +0800, Andy Yan wrote: > From: Andy Yan <andy.yan@rock-chips.com> > > In some application scenarios, we hope to get the corresponding > connector when the bridge's detect hook is invoked. > > In most cases, we can get the connector by drm_atomic_get_connector_for_encoder > if the encoder attached to the bridge is enabled, however there will > still be some scenarios where the detect hook of the bridge is called > but the corresponding encoder has not been enabled yet. For instance, > this occurs when the device is hot plug in for the first time. > > Since the call to bridge's detect is initiated by the connector, passing > down the corresponding connector directly will make things simpler. > > Signed-off-by: Andy Yan <andy.yan@rock-chips.com> FTR, I'm against it and would have appreciated that you wait for a meaningful closure to the discussion we've had on this. Maxime
From: Andy Yan <andy.yan@rock-chips.com> In some application scenarios, we hope to get the corresponding connector when the bridge's detect hook is invoked. For example, we may want to call drm_dp_read_sink_count_cap(which needs a drm_connector) at the dp deteck hook, intel_dp and nouveau_dp do this at it's connector's detetc_ctx/detect hook. But for a bridge driver, it's detect hook is initiated by the connector, there is no connector passed down. In most cases, we can get the connector by drm_atomic_get_connector_for_encoder if the encoder attached to the bridge is enabled, however there will still be some scenarios where the detect hook of the bridge is called but the corresponding encoder has not been enabled yet. For instance, this occurs when the device is hot plug in for the first time. Since the call to bridge's detect is initiated by the connector, passing down the corresponding connector directly will make things simpler. Before preparing this patch, we have had some discussions on the details here[0]. [0]https://patchwork.freedesktop.org/patch/640712/?series=143573&rev=5 Andy Yan (1): drm/bridge: Pass down connector to drm bridge detect hook drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 3 ++- drivers/gpu/drm/bridge/analogix/anx7625.c | 2 +- drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 3 ++- drivers/gpu/drm/bridge/chrontel-ch7033.c | 2 +- drivers/gpu/drm/bridge/display-connector.c | 11 ++++++++--- drivers/gpu/drm/bridge/ite-it6263.c | 3 ++- drivers/gpu/drm/bridge/ite-it6505.c | 2 +- drivers/gpu/drm/bridge/ite-it66121.c | 3 ++- drivers/gpu/drm/bridge/lontium-lt8912b.c | 6 +++--- drivers/gpu/drm/bridge/lontium-lt9611.c | 3 ++- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 3 ++- .../gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 3 ++- drivers/gpu/drm/bridge/sii902x.c | 3 ++- drivers/gpu/drm/bridge/simple-bridge.c | 2 +- drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c | 2 +- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 3 ++- drivers/gpu/drm/bridge/tc358767.c | 5 +++-- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 3 ++- drivers/gpu/drm/bridge/ti-tfp410.c | 2 +- drivers/gpu/drm/bridge/ti-tpd12s015.c | 8 +++++++- drivers/gpu/drm/display/drm_bridge_connector.c | 2 +- drivers/gpu/drm/drm_bridge.c | 5 +++-- drivers/gpu/drm/mediatek/mtk_dp.c | 3 ++- drivers/gpu/drm/mediatek/mtk_hdmi.c | 3 ++- drivers/gpu/drm/msm/dp/dp_drm.c | 3 ++- drivers/gpu/drm/msm/hdmi/hdmi.h | 2 +- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 2 +- drivers/gpu/drm/msm/hdmi/hdmi_hpd.c | 4 ++-- drivers/gpu/drm/xlnx/zynqmp_dp.c | 3 ++- include/drm/drm_bridge.h | 6 ++++-- 30 files changed, 67 insertions(+), 38 deletions(-)