From dbb23cf57178e1852b53eb544046eb06e3db9b4e Mon Sep 17 00:00:00 2001 From: Maíra Canal Date: Mon, 19 Dec 2022 09:06:17 -0300 Subject: drm/debugfs: create debugfs late register functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Although the device-centered debugfs functions can track requests for the addition of DRM debugfs files at any time and have them added all at once during drm_dev_register(), they are not able to create debugfs files for modeset components, as they are registered after the primary and the render drm_minor are registered. So, create a drm_debugfs_late_register() function, which is responsible for dealing with the creation of all the debugfs files for modeset components at once. Therefore, the functions drm_debugfs_add_file() and drm_debugfs_add_files() can be used in late_register hooks. Signed-off-by: Maíra Canal Reviewed-by: Melissa Wen Acked-by: Daniel Vetter Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20221219120621.15086-4-mcanal@igalia.com --- drivers/gpu/drm/drm_internal.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/gpu/drm/drm_internal.h') diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h index 5ea5e260118c..ed2103ee272c 100644 --- a/drivers/gpu/drm/drm_internal.h +++ b/drivers/gpu/drm/drm_internal.h @@ -186,6 +186,7 @@ int drm_gem_dumb_destroy(struct drm_file *file, struct drm_device *dev, int drm_debugfs_init(struct drm_minor *minor, int minor_id, struct dentry *root); void drm_debugfs_cleanup(struct drm_minor *minor); +void drm_debugfs_late_register(struct drm_device *dev); void drm_debugfs_connector_add(struct drm_connector *connector); void drm_debugfs_connector_remove(struct drm_connector *connector); void drm_debugfs_crtc_add(struct drm_crtc *crtc); @@ -202,6 +203,10 @@ static inline void drm_debugfs_cleanup(struct drm_minor *minor) { } +static inline void drm_debugfs_late_register(struct drm_device *dev) +{ +} + static inline void drm_debugfs_connector_add(struct drm_connector *connector) { } -- cgit v1.2.3