diff options
author | Christian König <christian.koenig@amd.com> | 2017-08-07 05:13:41 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-08-17 15:45:59 -0400 |
commit | 373533f80b89f0f4fb59b65c2942d1b20b91319c (patch) | |
tree | b60b2d74141a405001a006ecc96ce4f5bbfc7f51 /drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | |
parent | aca817181273d9c765ef61ab7674e5c8a4b727ca (diff) |
drm/ttm: make ttm_mem_type_manager_func debug more useful
Provide the drm printer directly instead of just the callback.
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 | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c index 5e6b90c6794f..26818b0a0cc8 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | |||
@@ -253,18 +253,17 @@ static void amdgpu_gtt_mgr_del(struct ttm_mem_type_manager *man, | |||
253 | * amdgpu_gtt_mgr_debug - dump VRAM table | 253 | * amdgpu_gtt_mgr_debug - dump VRAM table |
254 | * | 254 | * |
255 | * @man: TTM memory type manager | 255 | * @man: TTM memory type manager |
256 | * @prefix: text prefix | 256 | * @printer: DRM printer to use |
257 | * | 257 | * |
258 | * Dump the table content using printk. | 258 | * Dump the table content using printk. |
259 | */ | 259 | */ |
260 | static void amdgpu_gtt_mgr_debug(struct ttm_mem_type_manager *man, | 260 | static void amdgpu_gtt_mgr_debug(struct ttm_mem_type_manager *man, |
261 | const char *prefix) | 261 | struct drm_printer *printer) |
262 | { | 262 | { |
263 | struct amdgpu_gtt_mgr *mgr = man->priv; | 263 | struct amdgpu_gtt_mgr *mgr = man->priv; |
264 | struct drm_printer p = drm_debug_printer(prefix); | ||
265 | 264 | ||
266 | spin_lock(&mgr->lock); | 265 | spin_lock(&mgr->lock); |
267 | drm_mm_print(&mgr->mm, &p); | 266 | drm_mm_print(&mgr->mm, printer); |
268 | spin_unlock(&mgr->lock); | 267 | spin_unlock(&mgr->lock); |
269 | } | 268 | } |
270 | 269 | ||