drm/amdgpu/gem: move debugfs init into core amdgpu debugfs
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 4 Feb 2020 18:04:05 +0000 (13:04 -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 gem.

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 de5682901780f1f4484e8e542381eb2b503dbc37..585d1a7f6cf1388b39bc106433f83ddb38606cf0 100644 (file)
@@ -1304,6 +1304,10 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev)
        if (amdgpu_debugfs_fence_init(adev))
                dev_err(adev->dev, "fence debugfs file creation failed\n");
 
+       r = amdgpu_debugfs_gem_init(adev);
+       if (r)
+               DRM_ERROR("registering gem debugfs failed (%d).\n", r);
+
        return amdgpu_debugfs_add_files(adev, amdgpu_debugfs_list,
                                        ARRAY_SIZE(amdgpu_debugfs_list));
 }
index f6b6fee3503124c44f2f2be9e381ca9072b05012..44822509c809b511622f65b96fee7486d9e9820f 100644 (file)
@@ -3120,10 +3120,6 @@ fence_driver_init:
        } else
                adev->ucode_sysfs_en = true;
 
-       r = amdgpu_debugfs_gem_init(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);