drm: Plumb debugfs_init through to panels
authorDouglas Anderson <dianders@chromium.org>
Sat, 5 Feb 2022 00:13:41 +0000 (16:13 -0800)
committerDouglas Anderson <dianders@chromium.org>
Tue, 15 Feb 2022 23:25:18 +0000 (15:25 -0800)
commit2509969a9862b522d2208e8663057fb227556687
treeff52cebcc0aece228591915b6f6840f5cf7ecff9
parente283820cbf8092c87a8d6461260d5bc525da72c9
drm: Plumb debugfs_init through to panels

We'd like panels to be able to add things to debugfs underneath the
connector's directory. Let's plumb it through. A panel will be able to
put things in a "panel" directory under the connector's
directory. Note that debugfs is not ABI and so it's always possible
that the location that the panel gets for its debugfs could change in
the future.

NOTE: this currently only works if you're using a modern
architecture. Specifically the plumbing relies on _both_
drm_bridge_connector and drm_panel_bridge. If you're not using one or
both of these things then things won't be plumbed through.

As a side effect of this change, drm_bridges can also get callbacks to
put stuff underneath the connector's debugfs directory. At the moment
all bridges in the chain have their debugfs_init() called with the
connector's root directory.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220204161245.v2.2.Ib0bd5346135cbb0b63006b69b61d4c8af6484740@changeid
drivers/gpu/drm/bridge/panel.c
drivers/gpu/drm/drm_bridge_connector.c
drivers/gpu/drm/drm_debugfs.c
include/drm/drm_bridge.h
include/drm/drm_connector.h
include/drm/drm_panel.h