diff options
author | Christian König <christian.koenig@amd.com> | 2017-08-07 15:47:51 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-08-17 15:46:01 -0400 |
commit | 97cbb28451c21212cc20f2a5e6c074ba33150c3d (patch) | |
tree | 755660b357958975e12eae60658e8494899405db /drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | |
parent | 12d4ac584465845af3c7fba090a82c8ee84180d1 (diff) | |
download | linux-97cbb28451c21212cc20f2a5e6c074ba33150c3d.tar.bz2 |
drm/amdgpu: move debug print into the MM managers
Instead of the separate switch/case in the calling function.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c index 26818b0a0cc8..97c63ee1e20a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c @@ -153,15 +153,6 @@ int amdgpu_gtt_mgr_alloc(struct ttm_mem_type_manager *man, return r; } -void amdgpu_gtt_mgr_print(struct seq_file *m, struct ttm_mem_type_manager *man) -{ - struct amdgpu_device *adev = amdgpu_ttm_adev(man->bdev); - struct amdgpu_gtt_mgr *mgr = man->priv; - - seq_printf(m, "man size:%llu pages, gtt available:%llu pages, usage:%lluMB\n", - man->size, mgr->available, (u64)atomic64_read(&adev->gtt_usage) >> 20); - -} /** * amdgpu_gtt_mgr_new - allocate a new node * @@ -260,11 +251,16 @@ static void amdgpu_gtt_mgr_del(struct ttm_mem_type_manager *man, static void amdgpu_gtt_mgr_debug(struct ttm_mem_type_manager *man, struct drm_printer *printer) { + struct amdgpu_device *adev = amdgpu_ttm_adev(man->bdev); struct amdgpu_gtt_mgr *mgr = man->priv; spin_lock(&mgr->lock); drm_mm_print(&mgr->mm, printer); spin_unlock(&mgr->lock); + + drm_printf(printer, "man size:%llu pages, gtt available:%llu pages, usage:%lluMB\n", + man->size, mgr->available, + (u64)atomic64_read(&adev->gtt_usage) >> 20); } const struct ttm_mem_type_manager_func amdgpu_gtt_mgr_func = { |