All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] drm/amdgpu: fix byte/dword unit mismatch in coredump IB dump
@ 2026-08-27 16:37 Sunil Khatri
  2026-08-28  8:25 ` Khatri, Sunil
  0 siblings, 1 reply; 4+ messages in thread
From: Sunil Khatri @ 2026-08-27 16:37 UTC (permalink / raw)
  To: Alex Deucher, Christian König, Prosyak Vitaly; +Cc: amd-gfx, Sunil Khatri

In amdgpu_devcoredump_print_ibs(), the NO_CPU_ACCESS VRAM path passed
cursor.start/4 and cursor.size/4 to amdgpu_device_mm_access(), but that
function's pos/size parameters are byte offsets/lengths (confirmed by
amdgpu_ttm_vram_mm_access() and leading to wrong size calculation.

Similarly with that change the off index needs to be calculated
based on dword since that is a u32 type.

Fixes: 7b15fc2d1f1a ("drm/amdgpu: dump job ibs in the devcoredump")
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
index 76771ad30c41..2d3fb87af00a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
@@ -297,10 +297,10 @@ amdgpu_devcoredump_print_ibs(struct drm_printer *p,
 			amdgpu_res_first(abo->tbo.resource, offset,
 					 coredump->ibs[i].ib_size_dw * 4, &cursor);
 			while (cursor.remaining) {
-				amdgpu_device_mm_access(adev, cursor.start / 4,
-							&ib_content[off], cursor.size / 4,
+				amdgpu_device_mm_access(adev, cursor.start,
+							&ib_content[off], cursor.size,
 							false);
-				off += cursor.size;
+				off += cursor.size / 4;
 				amdgpu_res_next(&cursor, cursor.size);
 			}
 			emit_content = true;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-31 15:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-27 16:37 [PATCH v1] drm/amdgpu: fix byte/dword unit mismatch in coredump IB dump Sunil Khatri
2026-08-28  8:25 ` Khatri, Sunil
2026-08-31 15:09   ` Khatri, Sunil
2026-08-31 15:22     ` vitaly prosyak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.