aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h
diff options
context:
space:
mode:
authorStanley.Yang <[email protected]>2021-06-16 13:14:01 +0000
committerAlex Deucher <[email protected]>2021-06-18 21:11:40 +0000
commit6ec598cc9dfbf40433e94a2ed1a622e3ef80268b (patch)
treeea687d7ce8c88837d06f7496d68a492fefb2ab44 /drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h
parentamdgpu/pm: replaced snprintf usage in amdgpu_pm.c with sysfs_emit (diff)
downloadkernel-6ec598cc9dfbf40433e94a2ed1a622e3ef80268b.tar.gz
kernel-6ec598cc9dfbf40433e94a2ed1a622e3ef80268b.zip
drm/amdgpu: fix bad address translation for sienna_cichlid
Signed-off-by: Stanley.Yang <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h
index bbcccf53080d..e5a75fb788dd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h
@@ -22,6 +22,11 @@
#define __AMDGPU_UMC_H__
/*
+ * (addr / 256) * 4096, the higher 26 bits in ErrorAddr
+ * is the index of 4KB block
+ */
+#define ADDR_OF_4KB_BLOCK(addr) (((addr) & ~0xffULL) << 4)
+/*
* (addr / 256) * 8192, the higher 26 bits in ErrorAddr
* is the index of 8KB block
*/