aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cper.h
diff options
context:
space:
mode:
authorTao Zhou <tao.zhou1@amd.com>2025-02-10 15:28:37 +0800
committerAlex Deucher <alexander.deucher@amd.com>2025-02-17 14:09:30 -0500
commit8652920d2c00243e8a8ca91560a30488d95d9a1b (patch)
treecad8dfb258ce2aed4acf7a90c804787812d22aeb /drivers/gpu/drm/amd/amdgpu/amdgpu_cper.h
parentdrm/amd/pm: Limit jpeg rings as per max for jpeg_v_4_0_3 (diff)
downloadwireguard-linux-8652920d2c00243e8a8ca91560a30488d95d9a1b.tar.xz
wireguard-linux-8652920d2c00243e8a8ca91560a30488d95d9a1b.zip
drm/amdgpu: add mutex lock for cper ring
Avoid the confliction between read and write of ring buffer. Signed-off-by: Tao Zhou <tao.zhou1@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_cper.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cper.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cper.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_cper.h
index add25975d4f6..d35d1ddac7cc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cper.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cper.h
@@ -64,6 +64,7 @@ struct amdgpu_cper {
void *ring[CPER_MAX_ALLOWED_COUNT];
struct amdgpu_ring ring_buf;
+ struct mutex ring_lock;
};
void amdgpu_cper_entry_fill_hdr(struct amdgpu_device *adev,