Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: fix bad address translation for sienna_cichlid

Signed-off-by: Stanley.Yang <Stanley.Yang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Stanley.Yang and committed by
Alex Deucher
6ec598cc 09b6744c

+6 -1
+5
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h
··· 22 22 #define __AMDGPU_UMC_H__ 23 23 24 24 /* 25 + * (addr / 256) * 4096, the higher 26 bits in ErrorAddr 26 + * is the index of 4KB block 27 + */ 28 + #define ADDR_OF_4KB_BLOCK(addr) (((addr) & ~0xffULL) << 4) 29 + /* 25 30 * (addr / 256) * 8192, the higher 26 bits in ErrorAddr 26 31 * is the index of 8KB block 27 32 */
+1 -1
drivers/gpu/drm/amd/amdgpu/umc_v8_7.c
··· 234 234 err_addr &= ~((0x1ULL << lsb) - 1); 235 235 236 236 /* translate umc channel address to soc pa, 3 parts are included */ 237 - retired_page = ADDR_OF_8KB_BLOCK(err_addr) | 237 + retired_page = ADDR_OF_4KB_BLOCK(err_addr) | 238 238 ADDR_OF_256B_BLOCK(channel_index) | 239 239 OFFSET_IN_256B_BLOCK(err_addr); 240 240