Re: [PATCH v7 4/5] drm/debugfs: Move HDMI debugfs registration to state helper

From: Dmitry Baryshkov

Date: Wed Jul 22 2026 - 03:50:24 EST


On Tue, Jul 21, 2026 at 10:59:00AM +0200, Nicolas Frattaroli wrote:
> The HDMI debugfs files are only useful for connectors that already make
> use of the HDMI state helpers. In addition, relying on HDMI-specific
> functions in drm_debugfs.c can lead to circular linking problems later
> down the line.
>
> Move hdmi_debugfs_add() and friends to a new helper in
> drm_hdmi_state_helper.c, and make all current users (vc4, sun4i, bridge)
> either use it as a debugfs_init func, or call it directly in its
> debugfs_init func.
>
> Suggested-by: Maxime Ripard <mripard@xxxxxxxxxx>
> Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@xxxxxxxxxxxxx>
> ---
> drivers/gpu/drm/display/drm_bridge_connector.c | 3 +
> drivers/gpu/drm/display/drm_hdmi_state_helper.c | 154 +++++++++++++++++++++++
> drivers/gpu/drm/drm_debugfs.c | 157 ------------------------
> drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 1 +
> drivers/gpu/drm/vc4/vc4_hdmi.c | 1 +
> include/drm/display/drm_hdmi_state_helper.h | 3 +
> 6 files changed, 162 insertions(+), 157 deletions(-)
>

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>


--
With best wishes
Dmitry