drm/amdgpu: change reserved vram info print
authorjsg <jsg@openbsd.org>
Tue, 20 Jun 2023 02:38:42 +0000 (02:38 +0000)
committerjsg <jsg@openbsd.org>
Tue, 20 Jun 2023 02:38:42 +0000 (02:38 +0000)
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

index c860724..e351ec9 100644 (file)
@@ -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);
 }