drm/amdgpu: fix bad address translation for sienna_cichlid
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix bad address translation for sienna_cichlid
Signed-off-by Stanley.Yang <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h | 5 +++++ drivers/gpu/drm/amd/amdgpu/umc_v8_7.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h +5 -0
@@ -21,6 +21,11 @@#ifndef __AMDGPU_UMC_H__#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
drivers/gpu/drm/amd/amdgpu/umc_v8_7.c +1 -1
@@ -234,7 +234,7 @@ static void umc_v8_7_query_error_address(struct amdgpu_device *adev, err_addr &= ~((0x1ULL << lsb) -1 );/* translate umc channel address to soc pa, 3 parts are included */ - retired_page =ADDR_OF_8KB_BLOCK (err_addr) | + retired_page =ADDR_OF_4KB_BLOCK (err_addr) |ADDR_OF_256B_BLOCK (channel_index) |OFFSET_IN_256B_BLOCK (err_addr);
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only]
Reviewed-by Hawking Zhang <[email protected]>
Regards,
Hawking
-----Original Message-----
From: Stanley.Yang <[email protected]>
Sent: Wednesday, June 16, 2021 21:23
To: [email protected]; Zhang, Hawking <[email protected]>
Cc: Yang, Stanley <[email protected]>
Subject: [PATCH Review 1/1] drm/amdgpu: fix bad address translation for sienna_cichlid
Signed-off-by Stanley.Yang <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h | 5 +++++ drivers/gpu/drm/amd/amdgpu/umc_v8_7.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h +5 -0
@@ -21,6 +21,11 @@#ifndef __AMDGPU_UMC_H__#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
drivers/gpu/drm/amd/amdgpu/umc_v8_7.c +1 -1
@@ -234,7 +234,7 @@ static void umc_v8_7_query_error_address(struct amdgpu_device *adev, err_addr &= ~((0x1ULL << lsb) -1 );/* translate umc channel address to soc pa, 3 parts are included */ - retired_page =ADDR_OF_8KB_BLOCK (err_addr) | + retired_page =ADDR_OF_4KB_BLOCK (err_addr) |ADDR_OF_256B_BLOCK (channel_index) |OFFSET_IN_256B_BLOCK (err_addr);
Signature · 5 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx