diff options
author | Jack Xiao <Jack.Xiao@amd.com> | 2022-07-07 15:57:34 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-07-09 01:25:56 +0300 |
commit | 35ba8850b673050b71b17c1421079031f4fda319 (patch) | |
tree | f910e560336e78405a46460c4f482325aaa17378 /drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | |
parent | 872642edaf4228040473349ae0ee872264fa67f7 (diff) | |
download | linux-35ba8850b673050b71b17c1421079031f4fda319.tar.xz |
drm/amdgpu/mes: fix mes submission in atomic context
For some cases (accessing registers, unmap legacy queue), it needs
access mes in atomic context. Use spinlock to protect agaist mes
ring buffer race condition.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h index 3cec87e023b3..1133c361e7a7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h @@ -83,6 +83,7 @@ struct amdgpu_mes { uint64_t default_gang_quantum; struct amdgpu_ring ring; + spinlock_t ring_lock; const struct firmware *fw[AMDGPU_MAX_MES_PIPES]; |