drm: move drm based debugfs funcs to drm_debugfs.c
authorSunil Khatri <sunil.khatri@amd.com>
Fri, 4 Jul 2025 07:55:45 +0000 (13:25 +0530)
committerChristian König <christian.koenig@amd.com>
Fri, 4 Jul 2025 13:58:22 +0000 (15:58 +0200)
commit348fe34a6186a53acda44a3501d4e5a4f1f5958e
treee154ef2d8ab21360b26a5236989d485b6efdc28d
parent9cbc40521bc4ab49ee6af44eb2757eb114300473
drm: move drm based debugfs funcs to drm_debugfs.c

Requirement is to create per client-id based directories to
hold key debugging information and for that access to
root debugfs dentry is need which is not in one place
and that information cannot be stored in drm_device.

Move the debugfs functionality from drm_drv.c and drm_accel.c
to drm_debugfs.c This enables debugfs root node reference
directly drm_debugfs.c and hence enable to create per client-id
directory.

v8: Create drm_accel dentry only if it's config is enabled (Jeff, Hugo)
v8: Merge drm_drv and drm_accel debugfs patches (Koenig, Christian)

v10: Since we moved drm_debugfs_root, hence to handle drm bridge
debugfs add a new function which call drm_bridge_debugfs_params where
drm_debugfs_root is accessible.

Suggested-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Link: https://lore.kernel.org/r/20250704075548.1549849-2-sunil.khatri@amd.com
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
drivers/accel/drm_accel.c
drivers/gpu/drm/drm_debugfs.c
drivers/gpu/drm/drm_drv.c
drivers/gpu/drm/drm_internal.h
include/drm/drm_accel.h
include/drm/drm_drv.h