mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 06:52:34 -04:00
drm/amdgpu: Fix missing comment for mb() in 'amdgpu_device_aper_access'
This patch adds the missing code comment for memory barrier WARNING: memory barrier without comment + mb(); WARNING: memory barrier without comment + mb(); 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> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by: Guchun Chen <guchun.chen@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
c84f512387
commit
4c452b5c7d
@@ -305,10 +305,16 @@ size_t amdgpu_device_aper_access(struct amdgpu_device *adev, loff_t pos,
|
||||
|
||||
if (write) {
|
||||
memcpy_toio(addr, buf, count);
|
||||
/* Make sure HDP write cache flush happens without any reordering
|
||||
* after the system memory contents are sent over PCIe device
|
||||
*/
|
||||
mb();
|
||||
amdgpu_device_flush_hdp(adev, NULL);
|
||||
} else {
|
||||
amdgpu_device_invalidate_hdp(adev, NULL);
|
||||
/* Make sure HDP read cache is invalidated before issuing a read
|
||||
* to the PCIe device
|
||||
*/
|
||||
mb();
|
||||
memcpy_fromio(buf, addr, count);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user