]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amdgpu/regs: move debugfs init into core amdgpu debugfs
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 4 Feb 2020 18:07:31 +0000 (13:07 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 26 Feb 2020 19:21:12 +0000 (14:21 -0500)
In order to remove the load and unload drm callbacks,
we need to reorder the init sequence to move all the drm
debugfs file handling.  Do this for register access files.

Tested-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 585d1a7f6cf1388b39bc106433f83ddb38606cf0..444a07287f9807cd63a243bbb9538976d93413e4 100644 (file)
@@ -1308,6 +1308,10 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev)
        if (r)
                DRM_ERROR("registering gem debugfs failed (%d).\n", r);
 
+       r = amdgpu_debugfs_regs_init(adev);
+       if (r)
+               DRM_ERROR("registering register debugfs failed (%d).\n", r);
+
        return amdgpu_debugfs_add_files(adev, amdgpu_debugfs_list,
                                        ARRAY_SIZE(amdgpu_debugfs_list));
 }
index 44822509c809b511622f65b96fee7486d9e9820f..d74ad2a2a3968e215faed53430e0a098f47d6a3c 100644 (file)
@@ -3120,10 +3120,6 @@ fence_driver_init:
        } else
                adev->ucode_sysfs_en = true;
 
-       r = amdgpu_debugfs_regs_init(adev);
-       if (r)
-               DRM_ERROR("registering register debugfs failed (%d).\n", r);
-
        r = amdgpu_debugfs_firmware_init(adev);
        if (r)
                DRM_ERROR("registering firmware debugfs failed (%d).\n", r);