summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2025-03-14 19:23:46 -0400
committerAlex Deucher <alexander.deucher@amd.com>2025-03-21 12:16:34 -0400
commite02fcf73081b7fc941aa6de007b0239e67688e15 (patch)
tree10d92c98375cbdfc710ba0d0192bad5c420e1619 /drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h
parentfc70d1ea1bb168b5d80fba6caf504416ceb9a566 (diff)
downloadlinux-e02fcf73081b7fc941aa6de007b0239e67688e15.tar.gz
linux-e02fcf73081b7fc941aa6de007b0239e67688e15.tar.bz2
linux-e02fcf73081b7fc941aa6de007b0239e67688e15.zip
drm/amdgpu/sdma: fix engine reset handling
Move the kfd suspend/resume code into the caller. That is where the KFD is likely to detect a reset so on the KFD side there is no need to call them. Also add a mutex to lock the actual reset sequence. v2: make the locking per instance Fixes: bac38ca8c475 ("drm/amdkfd: implement per queue sdma reset for gfx 9.4+") Reviewed-by: Jesse Zhang <jesse.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h
index 965169320065..8e7e794ff136 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h
@@ -64,6 +64,7 @@ struct amdgpu_sdma_instance {
struct amdgpu_bo *sdma_fw_obj;
uint64_t sdma_fw_gpu_addr;
uint32_t *sdma_fw_ptr;
+ struct mutex engine_reset_mutex;
};
enum amdgpu_sdma_ras_memory_id {
@@ -169,7 +170,7 @@ struct amdgpu_buffer_funcs {
};
void amdgpu_sdma_register_on_reset_callbacks(struct amdgpu_device *adev, struct sdma_on_reset_funcs *funcs);
-int amdgpu_sdma_reset_engine(struct amdgpu_device *adev, uint32_t instance_id, bool suspend_user_queues);
+int amdgpu_sdma_reset_engine(struct amdgpu_device *adev, uint32_t instance_id);
#define amdgpu_emit_copy_buffer(adev, ib, s, d, b, t) (adev)->mman.buffer_funcs->emit_copy_buffer((ib), (s), (d), (b), (t))
#define amdgpu_emit_fill_buffer(adev, ib, s, d, b) (adev)->mman.buffer_funcs->emit_fill_buffer((ib), (s), (d), (b))