aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
diff options
context:
space:
mode:
authorNirmoy Das <[email protected]>2021-10-06 09:06:33 +0000
committerAlex Deucher <[email protected]>2021-10-06 19:53:14 +0000
commit5b9581df9f17b3e356d67735a07da97ba8e1fdd0 (patch)
treeaa78c693055de0415e4a952aab10844ce7a67718 /drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
parentdrm/amd/display: USB4 bring up set correct address (diff)
downloadkernel-5b9581df9f17b3e356d67735a07da97ba8e1fdd0.tar.gz
kernel-5b9581df9f17b3e356d67735a07da97ba8e1fdd0.zip
drm/amdgpu: return early if debugfs is not initialized
Check first if debugfs is initialized before creating amdgpu debugfs files. References: https://gitlab.freedesktop.org/drm/amd/-/issues/1686 Signed-off-by: Nirmoy Das <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
index 6611b3c7c149..5497e2d31d1a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
@@ -1617,6 +1617,9 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev)
struct dentry *ent;
int r, i;
+ if (!debugfs_initialized())
+ return 0;
+
ent = debugfs_create_file("amdgpu_preempt_ib", 0600, root, adev,
&fops_ib_preempt);
if (IS_ERR(ent)) {