drm/amdgpu: change reserved vram info print
Subsystems (2)
PATCH 1/1 drm/amdgpu: change reserved vram info print
The link object of mgr->reserved_pages is the blocks variable in struct amdgpu_vram_reservation, not the link variable in struct drm_buddy_block.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +4 -3
@@ -839,7 +839,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));
@@ -851,8 +851,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); }
Signature · 1 line
2.34.1
[AMD Official Use Only - General]
Ping ....
-----------------
Best Regards,
Thomas
-----Original Message-----
From: Chai, Thomas <[email protected]>
Sent: Thursday, May 25, 2023 4:50 PM
To: [email protected]
Cc: Chai, Thomas <[email protected]>; Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Li, Candice <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>
Subject: [PATCH] drm/amdgpu: change reserved vram info print
The link object of mgr->reserved_pages is the blocks variable in struct amdgpu_vram_reservation, not the link variable in struct drm_buddy_block.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +4 -3
@@ -839,7 +839,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));
@@ -851,8 +851,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.34.1
On 5/25/2023 2:20 PM, YiPeng Chai wrote
Quoted 34 lines
The link object of
mgr->reserved_pagesis the blocks variable in structamdgpu_vram_reservation, not the link variable in structdrm_buddy_block.Signed-off-by YiPeng Chai<[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +4
-3@@ -839,7 +839,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));@@ -851,8 +851,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); }
If you haven't already pushed it Reviewed-by: Christian König <[email protected]> as well.
You might want to add a CC: stable... tag so that it gets backported.
Regards,
Christian.
Am 01.06.23 um 08:13 schrieb Arunpravin Paneer Selvam:
Quoted 40 lines
Reviewed-by Arunpravin Paneer Selvam <[email protected]>On 5/25/2023 2:20 PM, YiPeng Chai wrote
Quoted 34 lines
The link object of
mgr->reserved_pagesis the blocks variable in structamdgpu_vram_reservation, not the link variable in structdrm_buddy_block.Signed-off-by YiPeng Chai<[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +4
-3@@ -839,7 +839,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));@@ -851,8 +851,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); }
Chai, Thomas
Reviewed-by Arunpravin Paneer Selvam[AMD Official Use Only - General]
OK, thanks!
-----------------
Best Regards,
Thomas
From: Christian König <[email protected]>
Sent: Thursday, June 1, 2023 2:25 PM
To: Paneer Selvam, Arunpravin <[email protected]>; Chai, Thomas <[email protected]>; [email protected]
Cc: Zhou1, Tao <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Li, Candice <[email protected]>; Koenig, Christian <[email protected]>; Zhang, Hawking <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: change reserved vram info print
If you haven't already pushed it Reviewed-by: Christian König <[email protected]><mailto:[email protected]> as well.
You might want to add a CC: stable... tag so that it gets backported.
Regards,
Christian.
Am 01.06.23 um 08:13 schrieb Arunpravin Paneer Selvam:
On 5/25/2023 2:20 PM, YiPeng Chai wrote
The link object of mgr->reserved_pages is the blocks
variable in struct amdgpu_vram_reservation, not the
link variable in struct drm_buddy_block.
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -0
index 89d35d194f2c..c7085a747b03 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
@@ -839,7 +839,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));
@@ -851,8 +851,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);
}