]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/amdgpu: move devcoredump generation to a worker
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fri, 21 Feb 2025 13:45:19 +0000 (14:45 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 17 Mar 2026 14:45:20 +0000 (10:45 -0400)
commit4bbba79a7f1d0c7296bf8c935d65a9ff633f6917
treee6f6d95e45fc091d563b51c5951de49080fa724e
parent15e19d832bae7921f9c18fd274aa51ee3e75342b
drm/amdgpu: move devcoredump generation to a worker

Update the way drm_coredump_printer is used based on its documentation
and Xe's code: the main idea is to generate the final version in one go
and then use memcpy to return the chunks requested by the caller of
amdgpu_devcoredump_read.

The generation is moved to a separate worker thread.

This cuts the time to copy the dump from 40s to ~0s on my machine.

---
v3:
- removed adev->coredump_in_progress and instead use work as
  the synchronisation mechanism
- use kvfree instead of kfree
---

Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.h
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c