Re: [PATCH v6 3/7] drm/display: Add soft depend for aux-hpd-typec-dp-bridge module

[email protected] Tue, 04 Aug 2026 07:19:02 +0000
Newsgroups org.freedesktop.lists.dri-devel,org.infradead.lists.linux-phy
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 2 potential issue(=
s) to consider:
- [High] The `MODULE_SOFTDEP` approach fails to load the `aux-hpd-typec-dp-=
bridge` module if `CONFIG_DRM_DISPLAY_HELPER` is built into the kernel (`=
=3Dy`) and `CONFIG_DRM_AUX_HPD_TYPEC_BRIDGE` is built as a module (`=3Dm`).
- [Medium] Adding a soft dependency on `aux-hpd-typec-dp-bridge` to a core =
DRM helper unconditionally forces the loading of the USB Type-C subsystem o=
n almost any system with a display, causing significant module bloat.
--

--- Patch [3]: [PATCH v6 3/7] drm/display: Add soft depend for aux-hpd-type=
c-dp-bridge module ---
commit f6b97c0e7a5ceab0d443dbadd5246c5cc93f2ec7
Author: Chaoyi Chen <[email protected]>

drm/display: Add soft depend for aux-hpd-typec-dp-bridge module

This patch adds a soft dependency on the aux-hpd-typec-dp-bridge module to
the core drm_display_helper module. It attempts to ensure the bridge module
is auto-loaded before the display helper.

> diff --git a/drivers/gpu/drm/display/drm_display_helper_mod.c b/drivers/g=
pu/drm/display/drm_display_helper_mod.c
> index d8a6e62287736..f0152d6b0b2d7 100644
> --- a/drivers/gpu/drm/display/drm_display_helper_mod.c
> +++ b/drivers/gpu/drm/display/drm_display_helper_mod.c
[ ... ]
> @@ -18,5 +18,6 @@ static void __exit drm_display_helper_module_exit(void)
>  	drm_dp_aux_dev_exit();
>  }
> =20
> +MODULE_SOFTDEP("pre: aux-hpd-typec-dp-bridge");

[Severity: Medium]
Does this soft dependency unconditionally pull the entire USB Type-C subsys=
tem
into memory on almost every system that loads a standard DRM driver?

Since aux-hpd-typec-dp-bridge depends on typec.ko, it seems this will cause
unnecessary memory bloat on systems without Type-C displays, simply because
their DRM driver (like amdgpu, i915, or nouveau) uses drm_display_helper.

[Severity: High]
Will this approach fail to auto-load the bridge if CONFIG_DRM_DISPLAY_HELPER
is built into the kernel (=3Dy) and CONFIG_DRM_AUX_HPD_TYPEC_BRIDGE is built
as a module (=3Dm)?

If drm_display_helper is built-in, modprobe is never invoked for it during
boot, which means the MODULE_SOFTDEP directive is ignored. Because the
aux-hpd-typec-dp-bridge lacks a MODULE_DEVICE_TABLE or udev loading
mechanism, wouldn't it fail to load entirely in this configuration, silently
breaking Type-C DisplayPort hotplug detection?

>  module_init(drm_display_helper_module_init);
>  module_exit(drm_display_helper_module_exit);

--=20
Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260804070730.68-1=
[email protected]?part=3D3