On Wed, Mar 04, 2026 at 05:41:44PM +0800, Chaoyi Chen wrote: > From: Chaoyi Chen <[email protected]> > > The HPD function of Type-C DP is implemented through > drm_connector_oob_hotplug_event(). For embedded DP, it is required > that the DRM connector fwnode corresponds to the Type-C port fwnode. > > To describe the relationship between the DP controller and the Type-C > port device, we usually using drm_bridge to build a bridge chain. > > Now several USB-C controller drivers have already implemented the DP > HPD bridge function provided by aux-hpd-bridge.c, it will build a DP > HPD bridge on USB-C connector port device. > > But this requires the USB-C controller driver to manually register the > HPD bridge. If the driver does not implement this feature, the bridge > will not be create. > > So this patch implements a generic DP HPD bridge based on > aux-hpd-bridge.c. It will monitor Type-C bus events, and when a > Type-C port device containing the DP svid is registered, it will > create an HPD bridge for it without the need for the USB-C controller > driver to implement it. > > Signed-off-by: Chaoyi Chen <[email protected]> > Reviewed-by: Heikki Krogerus <[email protected]> > --- > > (no changes since v14) > > Changes in v13: > - Only register drm dp hpd bridge for typec port altmode device. > > (no changes since v12) > > Changes in v11: > - Switch to using typec bus notifiers. > > (no changes since v10) > > Changes in v9: > - Remove the exposed DRM_AUX_HPD_BRIDGE option, and select > DRM_AUX_HPD_TYPEC_BRIDGE when it is available. > - Add more commit comment about problem background. > > Changes in v8: > - Merge generic DP HPD bridge into one module. > --- > > drivers/gpu/drm/bridge/Kconfig | 10 ++++ > drivers/gpu/drm/bridge/Makefile | 1 + > .../gpu/drm/bridge/aux-hpd-typec-dp-bridge.c | 49 +++++++++++++++++++ > 3 files changed, 60 insertions(+) > create mode 100644 drivers/gpu/drm/bridge/aux-hpd-typec-dp-bridge.c > > diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig > index a250afd8d662..559487aa09a9 100644 > --- a/drivers/gpu/drm/bridge/Kconfig > +++ b/drivers/gpu/drm/bridge/Kconfig > @@ -30,6 +30,16 @@ config DRM_AUX_HPD_BRIDGE > Simple bridge that terminates the bridge chain and provides HPD > support. > > +if DRM_AUX_HPD_BRIDGE > +config DRM_AUX_HPD_TYPEC_BRIDGE > + tristate > + depends on TYPEC || !TYPEC > + default TYPEC > + help > + Simple bridge that terminates the bridge chain and provides HPD > + support. It build bridge on each USB-C connector device node. > +endif > +
Should CONFIG_TYPEC_DP_ALTMODE select this one? Otherwise, we need to do it manually. $ grep -nr --include=Kconfig "select DRM_AUX_HPD_BRIDGE" . ./drivers/soc/qcom/Kconfig:118: select DRM_AUX_HPD_BRIDGE ./drivers/usb/typec/ucsi/Kconfig:88: select DRM_AUX_HPD_BRIDGE if DRM_BRIDGE && OF ./drivers/usb/typec/ucsi/Kconfig:99: select DRM_AUX_HPD_BRIDGE if DRM_BRIDGE && OF ./drivers/usb/typec/tcpm/Kconfig:62: select DRM_AUX_HPD_BRIDGE if DRM_BRIDGE && OF ./drivers/usb/typec/tcpm/Kconfig:85: select DRM_AUX_HPD_BRIDGE if DRM_BRIDGE && OF Thanks, Xu Yang
