Hi Heikki,
On 10/23/2025 4:45 PM, Heikki Krogerus wrote:
On Thu, Oct 23, 2025 at 11:30:02AM +0800, Chaoyi Chen wrote:
From: Chaoyi Chen <[email protected]>
Several USB-C controller drivers have already implemented the DP HPD
bridge function provided by aux-hpd-bridge.c, but there are still
some USB-C controller driver that have not yet implemented it.
This patch implements a generic DP HPD bridge based on aux-hpd-bridge.c,
so that other USB-C controller drivers don't need to implement it again.
Signed-off-by: Chaoyi Chen <[email protected]>
---
drivers/gpu/drm/bridge/Kconfig | 11 ++++
drivers/gpu/drm/bridge/Makefile | 1 +
.../gpu/drm/bridge/aux-hpd-typec-dp-bridge.c | 51 +++++++++++++++++++
3 files changed, 63 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 b9e0ca85226a..9f31540d3ad8 100644
--- a/drivers/gpu/drm/bridge/Kconfig
+++ b/drivers/gpu/drm/bridge/Kconfig
@@ -33,6 +33,17 @@ config DRM_AUX_HPD_BRIDGE
menu "Display Interface Bridges"
depends on DRM && DRM_BRIDGE
+config DRM_AUX_TYPEC_DP_HPD_BRIDGE
+ tristate "TypeC DP HPD bridge"
+ depends on DRM_BRIDGE && OF && TYPEC
+ select DRM_AUX_HPD_BRIDGE
+ help
+ Simple USB Type-C DP bridge that terminates the bridge chain and
+ provides HPD support.
+
+ If the USB-C controller driver has not implemented this and you need
+ the DP HPD support, say "Y" or "m" here.
You don't need to depend on DRM_BRIDGE separately, but do you really
need a separate module for this in the first place?
config DRM_CHIPONE_ICN6211
tristate "Chipone ICN6211 MIPI-DSI/RGB Converter bridge"
depends on OF
diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile
index 245e8a27e3fc..e91736829167 100644
--- a/drivers/gpu/drm/bridge/Makefile
+++ b/drivers/gpu/drm/bridge/Makefile
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_DRM_AUX_BRIDGE) += aux-bridge.o
obj-$(CONFIG_DRM_AUX_HPD_BRIDGE) += aux-hpd-bridge.o
+obj-$(CONFIG_DRM_AUX_TYPEC_DP_HPD_BRIDGE) += aux-hpd-typec-dp-bridge.o
Instead, why not just make that a part of aux-hpd-bridge
conditionally:
ifneq ($(CONFIG_TYPEC),)
aux-hpd-bridge-y += aux-hpd-typec-dp-bridge.o
endif
Oh, I did consider that! But I noticed that aux-hpd-bridge.c contains the
following statement module_auxiliary_driver(drm_aux_hpd_bridge_drv), which
already includes a module_init. In the newly added file, in order to call the
register function, another module_init was also added. If the two files are
each made into a module separately, would there be a problem?
thanks,
--
Best,
Chaoyi