drm: debugfs: Remove all files automatically on cleanup part 2
Subsystems (4)
cover drm: debugfs: Remove all files automatically on cleanup part 2
This is a follow up that removes the drm_driver.debugfs_cleanup callback.
Tegra is the only remaining user of drm_debugfs_remove_files().
Note:
Patches are only compile tested.
Noralf.
Noralf Trønnes (3):
drm/msm: Remove msm_debugfs_cleanup() drm/debugfs: Remove the drm_driver.debugfs_cleanup callback drm/qxl: Remove qxl_debugfs_remove_files()
drivers/gpu/drm/drm_debugfs.c | 5 ----- drivers/gpu/drm/msm/msm_debugfs.c | 15 --------------- drivers/gpu/drm/msm/msm_debugfs.h | 1 - drivers/gpu/drm/msm/msm_drv.c | 4 +++- drivers/gpu/drm/msm/msm_drv.h | 4 ++-- drivers/gpu/drm/msm/msm_kms.h | 1 - drivers/gpu/drm/msm/msm_perf.c | 5 ++--- drivers/gpu/drm/msm/msm_rd.c | 5 ++--- drivers/gpu/drm/qxl/qxl_debugfs.c | 13 ------------- drivers/gpu/drm/qxl/qxl_drv.h | 1 - drivers/gpu/drm/qxl/qxl_kms.c | 1 - include/drm/drm_drv.h | 1 - 12 files changed, 9 insertions(+), 47 deletions(-)
--
2.10.2
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/3 drm/msm: Remove msm_debugfs_cleanup()
Move the contents of msm_debugfs_cleanup() to msm_drm_uninit() to free up the drm_driver->debugfs_cleanup callback. Also remove the mdp_kms_funcs->debugfs_cleanup callback which has no users.
--- drivers/gpu/drm/msm/msm_debugfs.c | 15 --------------- drivers/gpu/drm/msm/msm_debugfs.h | 1 - drivers/gpu/drm/msm/msm_drv.c | 4 +++- drivers/gpu/drm/msm/msm_drv.h | 4 ++-- drivers/gpu/drm/msm/msm_kms.h | 1 - drivers/gpu/drm/msm/msm_perf.c | 5 ++--- drivers/gpu/drm/msm/msm_rd.c | 5 ++--- 7 files changed, 9 insertions(+), 26 deletions(-)
drivers/gpu/drm/msm/msm_debugfs.c +0 -15
@@ -166,20 +166,5 @@ int msm_debugfs_init(struct drm_minor *minor) return ret; } - -void msm_debugfs_cleanup (struct drm_minor *minor) -{ -struct drm_device *dev = minor->dev; -struct msm_drm_private *priv = dev->dev_private; - -if (!priv) -return ; - -if (priv->kms->funcs->debugfs_cleanup) - priv->kms->funcs->debugfs_cleanup (priv->kms, minor); - -msm_rd_debugfs_cleanup (minor); -msm_perf_debugfs_cleanup (minor); -}#endif
drivers/gpu/drm/msm/msm_debugfs.h +0 -1
@@ -20,7 +20,6 @@#ifdef CONFIG_DEBUG_FS int msm_debugfs_init (struct drm_minor *minor); -void msm_debugfs_cleanup (struct drm_minor *minor);#endif #endif /* __MSM_DEBUGFS_H__ */
drivers/gpu/drm/msm/msm_drv.c +3 -1
@@ -241,6 +241,9 @@ static int msm_drm_uninit(struct device *dev)drm_dev_unregister (ddev); +msm_perf_debugfs_cleanup (priv); +msm_rd_debugfs_cleanup (priv); +#ifdef CONFIG_DRM_FBDEV_EMULATION if (fbdev && priv->fbdev)msm_fbdev_free (ddev);
@@ -838,7 +841,6 @@ static struct drm_driver msm_driver = { .gem_prime_mmap = msm_gem_prime_mmap, #ifdef CONFIG_DEBUG_FS .debugfs_init = msm_debugfs_init, - .debugfs_cleanup = msm_debugfs_cleanup, #endif .ioctls = msm_ioctls, .num_ioctls = DRM_MSM_NUM_IOCTLS,
drivers/gpu/drm/msm/msm_drv.h +2 -2
@@ -304,10 +304,10 @@ void msm_gem_describe_objects(struct list_head *list, struct seq_file *m);void msm_framebuffer_describe (struct drm_framebuffer *fb,struct seq_file *m);int msm_debugfs_late_init (struct drm_device *dev);int msm_rd_debugfs_init (struct drm_minor *minor); -void msm_rd_debugfs_cleanup (struct drm_minor *minor); +void msm_rd_debugfs_cleanup (struct msm_drm_private *priv);void msm_rd_dump_submit (struct msm_gem_submit *submit);int msm_perf_debugfs_init (struct drm_minor *minor); -void msm_perf_debugfs_cleanup (struct drm_minor *minor); +void msm_perf_debugfs_cleanup (struct msm_drm_private *priv);#else static inline int msm_debugfs_late_init (struct drm_device *dev) {return 0 ; }static inline void msm_rd_dump_submit (struct msm_gem_submit *submit) {}
drivers/gpu/drm/msm/msm_kms.h +0 -1
@@ -64,7 +64,6 @@ struct msm_kms_funcs {#ifdef CONFIG_DEBUG_FS /* debugfs: */ int (*debugfs_init)(struct msm_kms *kms,struct drm_minor *minor); -void (*debugfs_cleanup)(struct msm_kms *kms,struct drm_minor *minor);#endif };
drivers/gpu/drm/msm/msm_perf.c +2 -3
@@ -231,13 +231,12 @@ int msm_perf_debugfs_init(struct drm_minor *minor)return 0 ; fail: -msm_perf_debugfs_cleanup (minor); +msm_perf_debugfs_cleanup (priv);return -1 ; } -void msm_perf_debugfs_cleanup (struct drm_minor *minor) +void msm_perf_debugfs_cleanup (struct msm_drm_private *priv) { -struct msm_drm_private *priv = minor->dev->dev_private;struct msm_perf_state *perf = priv->perf;if (!perf)
drivers/gpu/drm/msm/msm_rd.c +2 -3
@@ -245,13 +245,12 @@ int msm_rd_debugfs_init(struct drm_minor *minor)return 0 ; fail: -msm_rd_debugfs_cleanup (minor); +msm_rd_debugfs_cleanup (priv);return -1 ; } -void msm_rd_debugfs_cleanup (struct drm_minor *minor) +void msm_rd_debugfs_cleanup (struct msm_drm_private *priv) { -struct msm_drm_private *priv = minor->dev->dev_private;struct msm_rd_state *rd = priv->rd;if (!rd)
Signature · 6 lines
2.10.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/3 drm/debugfs: Remove the drm_driver.debugfs_cleanup callback
In reply to Noralf TrønnesRemove the .debugfs_cleanup() callback now that all the users are gone.
--- drivers/gpu/drm/drm_debugfs.c | 5 ----- include/drm/drm_drv.h | 1 - 2 files changed, 6 deletions(-)
drivers/gpu/drm/drm_debugfs.c +0 -5
@@ -242,14 +242,9 @@ static void drm_debugfs_remove_all_files(struct drm_minor *minor)*/ int drm_debugfs_cleanup (struct drm_minor *minor) { -struct drm_device *dev = minor->dev; -if (!minor->debugfs_root)return 0 ; -if (dev->driver->debugfs_cleanup) - dev->driver->debugfs_cleanup (minor); -drm_debugfs_remove_all_files (minor);debugfs_remove_recursive (minor->debugfs_root);
include/drm/drm_drv.h +0 -1
@@ -302,7 +302,6 @@ struct drm_driver {void (*master_drop)(struct drm_device *dev,struct drm_file *file_priv);int (*debugfs_init)(struct drm_minor *minor); -void (*debugfs_cleanup)(struct drm_minor *minor);/** * @gem_free_object: deconstructor for drm_gem_objects
Signature · 6 lines
2.10.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/3] drm/debugfs: Remove the drm_driver.debugfs_cleanup callback
Quoted 3 lines · Noralf Trønnes
Remove the .debugfs_cleanup() callback now that all the users are gone.
Signed-off-by Noralf Trønnes <[email protected]>
First 2 patches merged to drm-misc, with Rob's irc ack on the first one. I'll leave the 3rd for Gerd.
Thanks, Daniel
Quoted 43 lines
--- drivers/gpu/drm/drm_debugfs.c | 5 ----- include/drm/drm_drv.h | 1 - 2 files changed, 6 deletions(-)drivers/gpu/drm/drm_debugfs.c +0
-5@@ -242,14 +242,9 @@ static void drm_debugfs_remove_all_files(struct drm_minor *minor)*/ int drm_debugfs_cleanup (struct drm_minor *minor) { -struct drm_device *dev = minor->dev; -if (!minor->debugfs_root)return 0 ; -if (dev->driver->debugfs_cleanup) - dev->driver->debugfs_cleanup (minor); -drm_debugfs_remove_all_files (minor);debugfs_remove_recursive (minor->debugfs_root);include/drm/drm_drv.h +0
-1@@ -302,7 +302,6 @@ struct drm_driver {void (*master_drop)(struct drm_device *dev,struct drm_file *file_priv);int (*debugfs_init)(struct drm_minor *minor); -void (*debugfs_cleanup)(struct drm_minor *minor);/** * @gem_free_object: deconstructor for drm_gem_objects Signature · 6 lines
2.10.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/3 drm/qxl: Remove qxl_debugfs_remove_files()
In reply to Noralf Trønnesdrm_debugfs_cleanup() now removes all minor->debugfs_list entries automatically, so it's not necessary to call drm_debugfs_remove_files().
--- drivers/gpu/drm/qxl/qxl_debugfs.c | 13 ------------- drivers/gpu/drm/qxl/qxl_drv.h | 1 - drivers/gpu/drm/qxl/qxl_kms.c | 1 - 3 files changed, 15 deletions(-)
drivers/gpu/drm/qxl/qxl_debugfs.c +0 -13
@@ -129,16 +129,3 @@ int qxl_debugfs_add_files(struct qxl_device *qdev,#endif return 0 ; } - -void qxl_debugfs_remove_files (struct qxl_device *qdev) -{ -#if defined(CONFIG_DEBUG_FS ) -unsigned i; - -for (i =0 ; i < qdev->debugfs_count; i++) { -drm_debugfs_remove_files (qdev->debugfs[i].files, - qdev->debugfs[i].num_files, - qdev->ddev.primary); - } -#endif -}
drivers/gpu/drm/qxl/qxl_drv.h +0 -1
@@ -232,7 +232,6 @@ int qxl_debugfs_add_files(struct qxl_device *rdev,struct drm_info_list *files, unsigned nfiles);int qxl_debugfs_fence_init (struct qxl_device *rdev); -void qxl_debugfs_remove_files (struct qxl_device *qdev);struct qxl_device ;
drivers/gpu/drm/qxl/qxl_kms.c +0 -1
@@ -284,5 +284,4 @@ void qxl_device_fini(struct qxl_device *qdev) qdev->rom =NULL ; qdev->mode_info.modes =NULL ; qdev->mode_info.num_modes =0 ; -qxl_debugfs_remove_files (qdev); }
Signature · 6 lines
2.10.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 3/3] drm/qxl: Remove qxl_debugfs_remove_files()
Quoted 7 lines · Noralf Trønnes
drm_debugfs_cleanup()now removes allminor->debugfs_listentries automatically, so it's not necessary to calldrm_debugfs_remove_files().
cheers,
Gerd
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 3/3] drm/qxl: Remove qxl_debugfs_remove_files()
Quoted 10 lines · Gerd Hoffmann
Quoted 7 lines · Noralf Trønnes
drm_debugfs_cleanup()now removes allminor->debugfs_listentries automatically, so it's not necessary to calldrm_debugfs_remove_files().Reviewed-by Gerd Hoffmann <[email protected]>
I assume you'll push to drm-misc yourself since its qxl?
Thanks, Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Gerd Hoffmann
maintainerRe: [PATCH 3/3] drm/qxl: Remove qxl_debugfs_remove_files()
Quoted 6 lines · Daniel Vetter
Quoted 5 lines · Gerd Hoffmann
Quoted 4 lines · Noralf Trønnes
drm_debugfs_cleanup()now removes allminor->debugfs_listentries automatically, so it's not necessary to calldrm_debugfs_remove_files().
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Reviewed-by Gerd Hoffmann <[email protected]>I assume you'll push to drm-misc yourself since its qxl?
Can surely do that.
Question though: This seems to be a cross-driver cleanup series. At least only 3/3 landed in my inbox, did't look @ dri-devel for the other patches. What is the usual policy on those?
From the past I had the impression that in such a case the whole series gets applied by one of the drm-misc maintainers instead of each individual driver maintainer cherry-picking the patches from the series ...
cheers,
Gerd
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 3/3] drm/qxl: Remove qxl_debugfs_remove_files()
Quoted 17 lines · Gerd Hoffmann
Quoted 6 lines · Daniel Vetter
Quoted 5 lines · Gerd Hoffmann
Quoted 4 lines · Noralf Trønnes
drm_debugfs_cleanup()now removes allminor->debugfs_listentries automatically, so it's not necessary to calldrm_debugfs_remove_files().Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Reviewed-by Gerd Hoffmann <[email protected]>I assume you'll push to drm-misc yourself since its qxl?
Can surely do that.
Quoted 8 lines
Question though: This seems to be a cross-driver cleanup series. At least only 3/3 landed in my inbox, did't look @ dri-devel for the other patches. What is the usual policy on those?
From the past I had the impression that in such a case the whole series gets applied by one of the drm-misc maintainers instead of each individual driver maintainer cherry-picking the patches from the series ...
Well mostly because many driver maintainers aren't dutiful with picking up patches, or lose them again, or just take forever. But for this series here there's no such excuse, and there's also no technical reason to order patches a certain way (at least your qxl one is free standing and depends upon nothing else and blocks nothing else).
One of my goals with drm-misc is that I can reduce my efforts spending on catchging other maintainer's fallout, so I'd very much encourage everyone to just push stuff. Especially if you're the maintainer, and you slap an r-b onto a patch with no indication whether you merge it yourself or except someone else to merge it it's confusing and just improves the odds of the patch hitting one of our holes ...
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel