[PATCH 12/13] drm/debugfs: Remove the debugfs late register function

Maíra Canal mcanal at igalia.com
Wed Jan 11 17:37:47 UTC 2023


With the new debugfs infrastructure for kms objects, there is no need to
have a late register helper for debugfs, as the late register debugfs
function was only created because drm_debugfs_init() is not able to
create debugfs files for modeset components, as they are registered after
the primary and the render drm_minor are registered.

Now that each kms object has its own debugfs init function, remove the
debugfs late register function.

Signed-off-by: Maíra Canal <mcanal at igalia.com>
---
 drivers/gpu/drm/drm_debugfs.c     | 11 -----------
 drivers/gpu/drm/drm_internal.h    |  5 -----
 drivers/gpu/drm/drm_mode_config.c |  2 --
 3 files changed, 18 deletions(-)

diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
index e1f71a03a581..fe470a896527 100644
--- a/drivers/gpu/drm/drm_debugfs.c
+++ b/drivers/gpu/drm/drm_debugfs.c
@@ -294,17 +294,6 @@ void drm_debugfs_encoder_init(struct drm_encoder *encoder)
 	drm_create_file_from_list(encoder);
 }
 
-void drm_debugfs_late_register(struct drm_device *dev)
-{
-	struct drm_minor *minor = dev->primary;
-	struct drm_debugfs_entry *entry, *tmp;
-
-	if (!minor)
-		return;
-
-	drm_create_file_from_list(dev);
-}
-
 int drm_debugfs_remove_files(const struct drm_info_list *files, int count,
 			     struct drm_minor *minor)
 {
diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h
index 9be697f7f8f9..eb6a0545249a 100644
--- a/drivers/gpu/drm/drm_internal.h
+++ b/drivers/gpu/drm/drm_internal.h
@@ -189,7 +189,6 @@ void drm_debugfs_crtc_init(struct drm_crtc *crtc);
 void drm_debugfs_connector_init(struct drm_connector *connector);
 void drm_debugfs_encoder_init(struct drm_encoder *encoder);
 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);
@@ -218,10 +217,6 @@ 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)
 {
 }
diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c
index 87eb591fe9b5..8525ef851540 100644
--- a/drivers/gpu/drm/drm_mode_config.c
+++ b/drivers/gpu/drm/drm_mode_config.c
@@ -54,8 +54,6 @@ int drm_modeset_register_all(struct drm_device *dev)
 	if (ret)
 		goto err_connector;
 
-	drm_debugfs_late_register(dev);
-
 	return 0;
 
 err_connector:
-- 
2.39.0



More information about the dri-devel mailing list