drm/amdgpu/fence: move debugfs init into core amdgpu debugfs
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 4 Feb 2020 17:59:02 +0000 (12:59 -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 fence handling.

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_fence.c

index 24bd99fedf335ba2ccc9aad8b289ccc2631c4974..de5682901780f1f4484e8e542381eb2b503dbc37 100644 (file)
@@ -1301,6 +1301,9 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev)
                dev_err(adev->dev, "failed to register debugfs file for SA\n");
        }
 
+       if (amdgpu_debugfs_fence_init(adev))
+               dev_err(adev->dev, "fence debugfs file creation failed\n");
+
        return amdgpu_debugfs_add_files(adev, amdgpu_debugfs_list,
                                        ARRAY_SIZE(amdgpu_debugfs_list));
 }
index 3c01252b1e0ea3ba4ce81159333c54a82922bc59..7531527067dfb164b71468379fc79647d6b552de 100644 (file)
@@ -503,9 +503,6 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
  */
 int amdgpu_fence_driver_init(struct amdgpu_device *adev)
 {
-       if (amdgpu_debugfs_fence_init(adev))
-               dev_err(adev->dev, "fence debugfs file creation failed\n");
-
        return 0;
 }