]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/amdgpu: Allocate coredump ring buffers per ring
authorLijo Lazar <lijo.lazar@amd.com>
Wed, 29 Jul 2026 10:53:58 +0000 (16:23 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 6 Aug 2026 18:32:54 +0000 (14:32 -0400)
commite40ff9840fa8a633d149f0242df10cae5e518062
treed5e48cb0d752954c1239834228378a8fb801162a
parentb88a5a43c070df46939de419663d4679b90caf2f
drm/amdgpu: Allocate coredump ring buffers per ring

Allocate each ring buffer separately. A single allocation summing all
ring sizes can exceed the page allocator's MAX_ORDER limit and fail;
per-ring buffers stay small enough to satisfy. The existing allocation
style doesn't capture any ring data if the huge allocation fails.
Splitting into multiple allocations helps to capture as much data as
possible for the core dump.

A failed ring is left with a NULL buffer and skipped when formatting.

Fixes: eea85914d15b ("drm/amdgpu: save ring content before resetting the device")
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Assisted-by: Claude Code
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 3e8e92b7892a6377bef86106bfff1b98cf586aee)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.h