diff options
author | 2023-08-04 11:16:41 +0530 | |
---|---|---|
committer | 2023-08-30 15:51:17 -0400 | |
commit | bf227a4f0558320513b86c279996021480f9e750 (patch) | |
tree | daf32c9e6e4e6143165ea41b1263c096d31b1b0d /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |
parent | drm/amdgpu: remove unused parameter in amdgpu_vmid_grab_idle (diff) | |
download | linux-rng-bf227a4f0558320513b86c279996021480f9e750.tar.xz linux-rng-bf227a4f0558320513b86c279996021480f9e750.zip |
drm/amdgpu: Use READ_ONCE() when reading the values in 'sdma_v4_4_2_ring_get_rptr'
Use READ_ONCE() instead of declaring the pointer volatile. To prevent
the compiler from refetching or reordering the read, so that the read
value is always consistent.
Link: https://lwn.net/Articles/624126/
Cc: Felix Kuehling <Felix.Kuehling@amd.com>
Cc: Guchun Chen <guchun.chen@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
Cc: Le Ma <le.ma@amd.com>
Cc: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Le Ma <le.ma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
0 files changed, 0 insertions, 0 deletions