Re: [PATCH v6 2/2] drm: bridge: cdns-mhdp8546: Add no-hpd property
Tomi Valkeinen <tomi.valkeinen-ryLnwIuWjnjg/[email protected]>
| Newsgroups | gmane.linux.drivers.devicetree,gmane.comp.video.dri.devel,gmane.linux.kernel |
|---|---|
| Message-ID | <[email protected]> |
Hi, On 02/08/2026 18:38, Yashas D wrote: > From: Rahul T R <[email protected]> > > Add a 'no-hpd' boolean property to support boards where the HPD line > cannot be used for hotplug detection due to hardware limitations. > > On TI J721S2 EVMs, the DP0 HPD resistor is not populated from factory > (DNI), so the HPD signal is not physically connected to SoC pin AA24 > by default which makes HPD unavailable but AA24 must be in DP0_HPD > mux mode for the MHDP firmware to operate. > > When this property is set, the driver uses auxiliary channel (AUX) DPCD > reads to detect monitor presence instead of hardware HPD signals. The > DRM framework polls the connection status via the .detect() callback, > providing hotplug detection without requiring the HPD pin. > > Valid use cases: > - HPD pin not routed to connector on PCB > - HPD signal muxed with another function on SoC > - Hardware designs where HPD cannot reliably detect monitor presence > > Signed-off-by: Rahul T R <[email protected]> > Signed-off-by: Jayesh Choudhary <[email protected]> > Signed-off-by: Harikrishna Shenoy <[email protected]> > Signed-off-by: Yashas D <[email protected]> > --- > .../drm/bridge/cadence/cdns-mhdp8546-core.c | 79 +++++++++++++++++-- > .../drm/bridge/cadence/cdns-mhdp8546-core.h | 1 + > 2 files changed, 72 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c > index 504a3186ebb3..ae9bbec855f3 100644 > --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c > +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c > @@ -53,6 +53,8 @@ > #include "cdns-mhdp8546-hdcp.h" > #include "cdns-mhdp8546-j721e.h" > > +static int cdns_mhdp_update_link_status(struct cdns_mhdp_device *mhdp); > + > static void cdns_mhdp_bridge_hpd_enable(struct drm_bridge *bridge) > { > struct cdns_mhdp_device *mhdp = bridge_to_mhdp(bridge); > @@ -698,7 +700,9 @@ static int cdns_mhdp_fw_activate(const struct firmware *fw, > * MHDP_HW_STOPPED happens only due to driver removal when > * bridge should already be detached. > */ > - cdns_mhdp_bridge_hpd_enable(&mhdp->bridge); > + > + if (!mhdp->no_hpd) > + cdns_mhdp_bridge_hpd_enable(&mhdp->bridge); > > spin_unlock(&mhdp->start_lock); > > @@ -739,7 +743,13 @@ static void cdns_mhdp_fw_cb(const struct firmware *fw, void *context) > spin_lock(&mhdp->start_lock); > bridge_attached = mhdp->bridge_attached; > spin_unlock(&mhdp->start_lock); > - if (bridge_attached) > + > + if (!bridge_attached) > + return; > + > + if (mhdp->no_hpd) > + cdns_mhdp_update_link_status(mhdp); > + else > drm_bridge_hpd_notify(&mhdp->bridge, cdns_mhdp_detect(mhdp)); > } > > @@ -788,9 +798,14 @@ static ssize_t cdns_mhdp_transfer(struct drm_dp_aux *aux, > ret = cdns_mhdp_dpcd_read(mhdp, msg->address, > msg->buffer, msg->size); > if (ret) { > - dev_dbg(mhdp->dev, > - "Failed to read DPCD addr %u\n", > - msg->address); > + if (mhdp->no_hpd) > + dev_dbg(mhdp->dev, > + "Failed to read DPCD addr %u\n", > + msg->address); > + else > + dev_err(mhdp->dev, > + "Failed to read DPCD addr %u\n", > + msg->address); Is this intentional? Earlier dev_dbg was used. Now the "normal" case is dev_err. I think we can keep it as dev_dbg. Tomi