]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/debugfs: bridges_show: show refcount
authorLuca Ceresoli <luca.ceresoli@bootlin.com>
Tue, 19 Aug 2025 09:42:10 +0000 (11:42 +0200)
committerLuca Ceresoli <luca.ceresoli@bootlin.com>
Tue, 2 Sep 2025 09:18:55 +0000 (11:18 +0200)
Now that bridges are refcounted, exposing the refcount in debugfs can be
useful.

Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250819-drm-bridge-debugfs-removed-v7-1-970702579978@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
drivers/gpu/drm/drm_bridge.c

index dd439d55177a867acb7ab73c02182bada44d93c9..d031447eebc955efcf1e018d39c015b62b969eae 100644 (file)
@@ -1435,6 +1435,9 @@ static void drm_bridge_debugfs_show_bridge(struct drm_printer *p,
                                           unsigned int idx)
 {
        drm_printf(p, "bridge[%u]: %ps\n", idx, bridge->funcs);
+
+       drm_printf(p, "\trefcount: %u\n", kref_read(&bridge->refcount));
+
        drm_printf(p, "\ttype: [%d] %s\n",
                   bridge->type,
                   drm_get_connector_type_name(bridge->type));