aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h
diff options
context:
space:
mode:
authorTao Zhou <[email protected]>2023-05-17 06:20:46 +0000
committerAlex Deucher <[email protected]>2023-09-11 21:10:35 +0000
commit40a08fe890640f9c61d4443c218b61f745b11b2d (patch)
tree00da7bdb0bd94c18bcaa1390ea95df4e45198255 /drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h
parentdrm/amdgpu: Use default reset method handler (diff)
downloadkernel-40a08fe890640f9c61d4443c218b61f745b11b2d.tar.gz
kernel-40a08fe890640f9c61d4443c218b61f745b11b2d.zip
drm/amdgpu: add address conversion for UMC v12
Convert MCA error address to physical address and find out all pages in one physical row. Signed-off-by: Tao Zhou <[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 43321f57f557..417a6726c71b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h
@@ -32,6 +32,11 @@
* is the index of 8KB block
*/
#define ADDR_OF_8KB_BLOCK(addr) (((addr) & ~0xffULL) << 5)
+/*
+ * (addr / 256) * 32768, the higher 26 bits in ErrorAddr
+ * is the index of 8KB block
+ */
+#define ADDR_OF_32KB_BLOCK(addr) (((addr) & ~0xffULL) << 7)
/* channel index is the index of 256B block */
#define ADDR_OF_256B_BLOCK(channel_index) ((channel_index) << 8)
/* offset in 256B block */