From 2e481ce47acbb80c671b2101527e61dfcf96d106 Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 20 Jun 2023 02:38:42 +0000 Subject: [PATCH] drm/amdgpu: change reserved vram info print From YiPeng Chai 8e143bae25cdbab69ea3e2e7bb6faf7711ce7583 in linux-6.1.y/6.1.34 dac652220ba0e5a2ef2da2a47a60b60aea333fdb in mainline linux --- sys/dev/pci/drm/amd/amdgpu/amdgpu_vram_mgr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_vram_mgr.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_vram_mgr.c index c8607247e1f..e351ec986fd 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_vram_mgr.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_vram_mgr.c @@ -806,7 +806,7 @@ static void amdgpu_vram_mgr_debug(struct ttm_resource_manager *man, { struct amdgpu_vram_mgr *mgr = to_vram_mgr(man); struct drm_buddy *mm = &mgr->mm; - struct drm_buddy_block *block; + struct amdgpu_vram_reservation *rsv; drm_printf(printer, " vis usage:%llu\n", amdgpu_vram_mgr_vis_usage(mgr)); @@ -818,8 +818,9 @@ static void amdgpu_vram_mgr_debug(struct ttm_resource_manager *man, drm_buddy_print(mm, printer); drm_printf(printer, "reserved:\n"); - list_for_each_entry(block, &mgr->reserved_pages, link) - drm_buddy_block_print(mm, block, printer); + list_for_each_entry(rsv, &mgr->reserved_pages, blocks) + drm_printf(printer, "%#018llx-%#018llx: %llu\n", + rsv->start, rsv->start + rsv->size, rsv->size); mutex_unlock(&mgr->lock); } -- 2.20.1