Skip to content

Commit

Permalink
drm/amdgpu/display: move debugfs init into core amdgpu debugfs (v2)
Browse files Browse the repository at this point in the history
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 display.

v2: add config guard for DC

Tested-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Harry Wentland <harry.wentland@amd.com> (v1)
Acked-by: Christian König <christian.koenig@amd.com> (v1)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Alex Deucher committed Feb 26, 2020
1 parent 4074892 commit d090e7d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 8 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

#include "amdgpu.h"
#include "amdgpu_pm.h"
#include "amdgpu_dm_debugfs.h"

/**
* amdgpu_debugfs_add_files - Add simple debugfs entries
Expand Down Expand Up @@ -1316,6 +1317,13 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev)
if (r)
DRM_ERROR("registering firmware debugfs failed (%d).\n", r);

#if defined(CONFIG_DRM_AMD_DC)
if (amdgpu_device_has_dc_support(adev)) {
if (dtn_debugfs_init(adev))
DRM_ERROR("amdgpu: failed initialize dtn debugfs support.\n");
}
#endif

for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
struct amdgpu_ring *ring = adev->rings[i];

Expand Down
5 changes: 0 additions & 5 deletions drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1008,11 +1008,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
goto error;
}

#if defined(CONFIG_DEBUG_FS)
if (dtn_debugfs_init(adev))
DRM_ERROR("amdgpu: failed initialize dtn debugfs support.\n");
#endif

DRM_DEBUG_DRIVER("KMS initialized.\n");

return 0;
Expand Down

0 comments on commit d090e7d

Please sign in to comment.