drm/amdkfd: Clean up debug runlist printing
Subsystems (3)
PATCH 1/1 drm/amdkfd: Clean up debug runlist printing
Having single lines with random hex codes really doesn't help a user to know what's going on. Give it a title, and print 8 8-length hex values per line, instead of a single 2-length hex value per printed line.
Previous output:
...
amdgpu: 0x20000010
amdgpu: 0x3000
amdgpu: 0x12E6E00
amdgpu: 0xFF
amdgpu: 0x207008
amdgpu: 0x 0
amdgpu:
New output:
amdgpu: Runlist dump: amdgpu: 0: 0xc00ea100 0x14008008 0x0f4fffc0 0x00000000 0x20002000 0x00000338 0x00000020 0x00080017 amdgpu: 8: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x03400000 0x00000000 0x00000000 amdgpu: 16: 0xc005a200 0x20000010 0x00003030 0x012ed000 0x000000ff 0x00252008 0x00000000 0xc005a200 amdgpu: 24: 0x20000010 0x0000302c 0x012ec800 0x000000ff 0x0024c008 0x00000000 0xc005a200 0x20000010 amdgpu: 32: 0x00003028 0x012ec000 0x000000ff 0x00246008 0x00000000 0xc005a200 0x20000010 0x00003024 amdgpu: 40: 0x012eb800 0x000000ff 0x00240008 0x00000000 0xc005a200 0x20000010 0x00003020 0x012eb000 amdgpu: 48: 0x000000ff 0x0023a008 0x00000000 0xc005a200 0x20000010 0x0000301c 0x012ea800 0x000000ff amdgpu: 56: 0x00234008 0x00000000 0xc005a200 0x20000010 0x00003018 0x012ea000 0x000000ff 0x0022e008 amdgpu: 64: 0x00000000 0xc005a200 0x20000010 0x00003014 0x012e9800 0x000000ff 0x00228008 0x00000000 amdgpu: 72: 0xc005a200 0x20000010 0x00003010 0x012e9000 0x000000ff 0x00222008 0x00000000 0xc005a200 amdgpu: 80: 0x20000010 0x0000300c 0x012e8800 0x000000ff 0x0021c008 0x00000000 0xc005a200 0x20000010 amdgpu: 88: 0x00003008 0x012e8000 0x000000ff 0x00216008 0x00000000 0xc005a200 0x20000010 0x00003004 amdgpu: 96: 0x012e7800 0x000000ff 0x00210008 0x00000000 0xc005a200 0x20000010 0x00003000 0x012e6e00 amdgpu: 104: 0x000000ff 0x00207008 0x00000000
--- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c +13 -3
@@ -269,9 +269,19 @@ static int pm_create_runlist_ib(struct packet_manager *pm, } pm->is_over_subscription = !!is_over_subscription; -for (i =0 ; i < alloc_size_bytes /sizeof (uint32_t ); i++) -pr_debug ("0x%2X " , rl_buffer[i]); -pr_debug ("\n" ); +pr_debug ("Runlist dump:" ); +for (i =0 ; i < alloc_size_bytes /sizeof (uint32_t ); i +=8 ) { +char buf[128 ]; +int j, len =0 ; + +/* Dump 8 entries per line with an index for each line */ + len +=scnprintf (buf + len,sizeof (buf) - len,"%4u:" , i); + +for (j =0 ; j <8 && (i + j) < alloc_size_bytes /sizeof (uint32_t ); j++) + len +=scnprintf (buf + len,sizeof (buf) - len," 0x%08x" , rl_buffer[i + j]); + +pr_debug ("%s\n" , buf); + }return retval; }
Signature · 1 line
2.43.0
AMD General
Non-critical ping
Kent
Quoted 91 lines
-----Original Message-----
From: Russell, Kent <[email protected]>
Sent: July 6, 2026 1:30 PM
To: [email protected]
Cc: Koenig, Christian <[email protected]>; Russell, Kent <[email protected]>
Subject: [PATCH] drm/amdkfd: Clean up debug runlist printingHaving single lines with random hex codes really doesn't help a user to know what's going on. Give it a title, and print 8 8-length hex values per line, instead of a single 2-length hex value per printed line.
Previous output:
...
amdgpu:0x20000010
amdgpu:0x3000
amdgpu:0x12E6E00
amdgpu:0xFF
amdgpu:0x207008
amdgpu: 0x 0
amdgpu:New output:
amdgpu: Runlist dump:
amdgpu: 0:0xc00ea1000x140080080x0f4fffc00x000000000x200020000x000003380x000000200x00080017
amdgpu: 8:0x000000000x000000000x000000000x000000000x000000000x034000000x000000000x00000000
amdgpu: 16:0xc005a2000x200000100x000030300x012ed0000x000000ff0x002520080x000000000xc005a200
amdgpu: 24:0x200000100x0000302c0x012ec8000x000000ff0x0024c0080x000000000xc005a2000x20000010
amdgpu: 32:0x000030280x012ec0000x000000ff0x002460080x000000000xc005a2000x200000100x00003024
amdgpu: 40:0x012eb8000x000000ff0x002400080x000000000xc005a2000x200000100x000030200x012eb000
amdgpu: 48:0x000000ff0x0023a0080x000000000xc005a2000x200000100x0000301c0x012ea8000x000000ff
amdgpu: 56:0x002340080x000000000xc005a2000x200000100x000030180x012ea0000x000000ff0x0022e008
amdgpu: 64:0x000000000xc005a2000x200000100x000030140x012e98000x000000ff0x002280080x00000000
amdgpu: 72:0xc005a2000x200000100x000030100x012e90000x000000ff0x002220080x000000000xc005a200
amdgpu: 80:0x200000100x0000300c0x012e88000x000000ff0x0021c0080x000000000xc005a2000x20000010
amdgpu: 88:0x000030080x012e80000x000000ff0x002160080x000000000xc005a2000x200000100x00003004
amdgpu: 96:0x012e78000x000000ff0x002100080x000000000xc005a2000x200000100x000030000x012e6e00
amdgpu: 104:0x000000ff0x002070080x00000000Signed-off-by Kent Russell <[email protected]>--- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c +13
-3@@ -269,9 +269,19 @@ static int pm_create_runlist_ib(struct packet_manager *pm, } pm->is_over_subscription = !!is_over_subscription; -for (i =0 ; i < alloc_size_bytes /sizeof (uint32_t ); i++) -pr_debug ("0x%2X " , rl_buffer[i]); -pr_debug ("\n" ); +pr_debug ("Runlist dump:" ); +for (i =0 ; i < alloc_size_bytes /sizeof (uint32_t ); i +=8 ) { +char buf[128 ]; +int j, len =0 ; + +/* Dump 8 entries per line with an index for each line */ + len +=scnprintf (buf + len,sizeof (buf) - len,"%4u:" , i); + +for (j =0 ; j <8 && (i + j) < alloc_size_bytes /sizeof (uint32_t ); j++) + len +=scnprintf (buf + len,sizeof (buf) - len," 0x%08x" , rl_buffer[i + j]); + +pr_debug ("%s\n" , buf); + }return retval;}
--
2.43.0
Alex Deucher
Reviewed-byQuoted 99 lines · Kent
AMD General
Non-critical ping
Kent
Quoted 91 lines
-----Original Message-----
From: Russell, Kent <[email protected]>
Sent: July 6, 2026 1:30 PM
To: [email protected]
Cc: Koenig, Christian <[email protected]>; Russell, Kent <[email protected]>
Subject: [PATCH] drm/amdkfd: Clean up debug runlist printingHaving single lines with random hex codes really doesn't help a user to know what's going on. Give it a title, and print 8 8-length hex values per line, instead of a single 2-length hex value per printed line.
Previous output:
...
amdgpu:0x20000010
amdgpu:0x3000
amdgpu:0x12E6E00
amdgpu:0xFF
amdgpu:0x207008
amdgpu: 0x 0
amdgpu:New output:
amdgpu: Runlist dump:
amdgpu: 0:0xc00ea1000x140080080x0f4fffc00x000000000x200020000x000003380x000000200x00080017
amdgpu: 8:0x000000000x000000000x000000000x000000000x000000000x034000000x000000000x00000000
amdgpu: 16:0xc005a2000x200000100x000030300x012ed0000x000000ff0x002520080x000000000xc005a200
amdgpu: 24:0x200000100x0000302c0x012ec8000x000000ff0x0024c0080x000000000xc005a2000x20000010
amdgpu: 32:0x000030280x012ec0000x000000ff0x002460080x000000000xc005a2000x200000100x00003024
amdgpu: 40:0x012eb8000x000000ff0x002400080x000000000xc005a2000x200000100x000030200x012eb000
amdgpu: 48:0x000000ff0x0023a0080x000000000xc005a2000x200000100x0000301c0x012ea8000x000000ff
amdgpu: 56:0x002340080x000000000xc005a2000x200000100x000030180x012ea0000x000000ff0x0022e008
amdgpu: 64:0x000000000xc005a2000x200000100x000030140x012e98000x000000ff0x002280080x00000000
amdgpu: 72:0xc005a2000x200000100x000030100x012e90000x000000ff0x002220080x000000000xc005a200
amdgpu: 80:0x200000100x0000300c0x012e88000x000000ff0x0021c0080x000000000xc005a2000x20000010
amdgpu: 88:0x000030080x012e80000x000000ff0x002160080x000000000xc005a2000x200000100x00003004
amdgpu: 96:0x012e78000x000000ff0x002100080x000000000xc005a2000x200000100x000030000x012e6e00
amdgpu: 104:0x000000ff0x002070080x00000000Signed-off-by Kent Russell <[email protected]>--- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c +13
-3@@ -269,9 +269,19 @@ static int pm_create_runlist_ib(struct packet_manager *pm, } pm->is_over_subscription = !!is_over_subscription; -for (i =0 ; i < alloc_size_bytes /sizeof (uint32_t ); i++) -pr_debug ("0x%2X " , rl_buffer[i]); -pr_debug ("\n" ); +pr_debug ("Runlist dump:" ); +for (i =0 ; i < alloc_size_bytes /sizeof (uint32_t ); i +=8 ) { +char buf[128 ]; +int j, len =0 ; + +/* Dump 8 entries per line with an index for each line */ + len +=scnprintf (buf + len,sizeof (buf) - len,"%4u:" , i); + +for (j =0 ; j <8 && (i + j) < alloc_size_bytes /sizeof (uint32_t ); j++) + len +=scnprintf (buf + len,sizeof (buf) - len," 0x%08x" , rl_buffer[i + j]); + +pr_debug ("%s\n" , buf); + }return retval;}
--
2.43.0