drm/atomic: debugfs atomic state should be removed too
Subsystems (2)
PATCH 1/1 drm/atomic: debugfs atomic state should be removed too
If atomic state file is not removed from debugfs it will prevent atomic driver modules from reloading after unload when debugfs is enabled.
Fixes commit 6559c901cb484 ("drm/atomic: add debugfs file to dump out atomic state")
Signed-off-by Jyri Sarha <[email protected]>
--- drivers/gpu/drm/drm_atomic.c | 6 ++++++ drivers/gpu/drm/drm_debugfs.c | 2 ++ include/drm/drm_atomic.h | 1 + 3 files changed, 9 insertions(+)
drivers/gpu/drm/drm_atomic.c +6 -0
@@ -1686,6 +1686,12 @@ int drm_atomic_debugfs_init(struct drm_minor *minor)ARRAY_SIZE (drm_atomic_debugfs_list), minor->debugfs_root, minor); } + +void drm_atomic_debugfs_fini (struct drm_minor *minor) +{ +drm_debugfs_remove_files (drm_atomic_debugfs_list, +ARRAY_SIZE (drm_atomic_debugfs_list), minor); +}#endif /*
drivers/gpu/drm/drm_debugfs.c +2 -0
@@ -237,6 +237,8 @@ int drm_debugfs_cleanup(struct drm_minor *minor)drm_debugfs_remove_files (drm_debugfs_list,DRM_DEBUGFS_ENTRIES , minor); +drm_atomic_debugfs_fini (minor); +debugfs_remove (minor->debugfs_root); minor->debugfs_root =NULL ;
include/drm/drm_atomic.h +1 -0
@@ -372,6 +372,7 @@ void drm_atomic_set_fence_for_plane(struct drm_plane_state *plane_state,#ifdef CONFIG_DEBUG_FS struct drm_minor ;int drm_atomic_debugfs_init (struct drm_minor *minor); +void drm_atomic_debugfs_fini (struct drm_minor *minor);#endif #define for_each_connector_in_state (__state, connector, connector_state, __i) \
Signature · 6 lines
1.9.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 8 lines · Jyri Sarha
If atomic state file is not removed from debugfs it will prevent atomic driver modules from reloading after unload when debugfs is enabled.
Fixes commit
6559c901cb484("drm/atomic: add debugfs file to dump out atomic state")Signed-off-by Jyri Sarha <[email protected]>
We have one already:
commit 8c0b55e22aff84cb6938a993d86c3ce02006236e
Author: Liviu Dudau <[email protected]> Date: Thu Nov 17 11:41:29 2016 +0000
drm/atomic: cleanup debugfs entries on un-registering the driver.
Cheers, Daniel
Quoted 51 lines
--- drivers/gpu/drm/drm_atomic.c | 6 ++++++ drivers/gpu/drm/drm_debugfs.c | 2 ++ include/drm/drm_atomic.h | 1 + 3 files changed, 9 insertions(+)drivers/gpu/drm/drm_atomic.c +6
-0@@ -1686,6 +1686,12 @@ int drm_atomic_debugfs_init(struct drm_minor *minor)ARRAY_SIZE (drm_atomic_debugfs_list), minor->debugfs_root, minor); } + +void drm_atomic_debugfs_fini (struct drm_minor *minor) +{ +drm_debugfs_remove_files (drm_atomic_debugfs_list, +ARRAY_SIZE (drm_atomic_debugfs_list), minor); +}#endif /* drivers/gpu/drm/drm_debugfs.c +2
-0@@ -237,6 +237,8 @@ int drm_debugfs_cleanup(struct drm_minor *minor)drm_debugfs_remove_files (drm_debugfs_list,DRM_DEBUGFS_ENTRIES , minor); +drm_atomic_debugfs_fini (minor); +debugfs_remove (minor->debugfs_root); minor->debugfs_root =NULL ;include/drm/drm_atomic.h +1
-0@@ -372,6 +372,7 @@ void drm_atomic_set_fence_for_plane(struct drm_plane_state *plane_state,#ifdef CONFIG_DEBUG_FS struct drm_minor ;int drm_atomic_debugfs_init (struct drm_minor *minor); +void drm_atomic_debugfs_fini (struct drm_minor *minor);#endif #define for_each_connector_in_state (__state, connector, connector_state, __i) \Signature · 1 line
1.9.1
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