AMD General Non-critical ping
Kent > -----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 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 > > Signed-off-by: Kent Russell <[email protected]> > --- > drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 16 +++++++++++++--- > 1 file changed, 13 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c > b/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c > index b1a6eb349bb3..85bf1790a6c8 100644 > --- a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c > @@ -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
