drm/amdkfd: disable kfd debugfs node of hang_hws on vf mode
Subsystems (3)
PATCH 1/1 drm/amdkfd: disable kfd debugfs node of hang_hws on vf mode
the kfd debugfs node is rely on kgd2kfd probe success, if not, the kfd_debugfs should not be created, and the node of "hang_hws" should be disabled on vf mode.
1. move kfd_debugfs_init() function into kgd2kfd_probe() function.
2. disable "hang_hws" debugfs node on vf mode.
Signed-off-by Kevin Wang <[email protected]>
--- drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c | 7 ++++--- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 2 ++ drivers/gpu/drm/amd/amdkfd/kfd_module.c | 2 -- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c +4 -3
@@ -88,7 +88,7 @@ static const struct file_operations kfd_debugfs_hang_hws_fops = { .release = single_release, }; -void kfd_debugfs_init (void ) +void kfd_debugfs_init (bool is_vf) { debugfs_root =debugfs_create_dir ("kfd" ,NULL );
@@ -98,8 +98,9 @@ void kfd_debugfs_init(void) kfd_debugfs_hqds_by_device, &kfd_debugfs_fops);debugfs_create_file ("rls" ,S_IFREG |0444 , debugfs_root, kfd_debugfs_rls_by_device, &kfd_debugfs_fops); -debugfs_create_file ("hang_hws" ,S_IFREG |0200 , debugfs_root, - kfd_debugfs_hang_hws_read, &kfd_debugfs_hang_hws_fops); +if (!is_vf) +debugfs_create_file ("hang_hws" ,S_IFREG |0200 , debugfs_root, + kfd_debugfs_hang_hws_read, &kfd_debugfs_hang_hws_fops); }void kfd_debugfs_fini (void )
drivers/gpu/drm/amd/amdkfd/kfd_device.c +2 -0
@@ -649,6 +649,8 @@ struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd,ida_init (&kfd->doorbell_ida); +kfd_debugfs_init (vf); +return kfd; }
drivers/gpu/drm/amd/amdkfd/kfd_module.c +0 -2
@@ -61,8 +61,6 @@ static int kfd_init(void)*/ kfd_procfs_init (); -kfd_debugfs_init (); -return 0 ; err_create_wq:
drivers/gpu/drm/amd/amdkfd/kfd_priv.h +2 -2
@@ -1174,7 +1174,7 @@ static inline int kfd_devcgroup_check_permission(struct kfd_dev *kfd)/* Debugfs */ #if defined(CONFIG_DEBUG_FS ) -void kfd_debugfs_init (void ); +void kfd_debugfs_init (bool is_vf);void kfd_debugfs_fini (void );int kfd_debugfs_mqds_by_process (struct seq_file *m,void *data);int pqm_debugfs_mqds (struct seq_file *m,void *data);
@@ -1189,7 +1189,7 @@ int dqm_debugfs_execute_queues(struct device_queue_manager *dqm);#else -static inline void kfd_debugfs_init (void ) {} +static inline void kfd_debugfs_init (bool is_vf) {}static inline void kfd_debugfs_fini (void ) {}#endif
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx