drm/amdgpu: add loop bits for NPS2 RAS page retirement
Subsystems (2)
PATCH 1/1 drm/amdgpu: add loop bits for NPS2 RAS page retirement
Support NPS2 UMC RAS.
Signed-off-by Tao Zhou <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | 10 ++++++++++ drivers/gpu/drm/amd/amdgpu/umc_v12_0.h | 2 ++ 2 files changed, 12 insertions(+)
drivers/gpu/drm/amd/amdgpu/umc_v12_0.c +10 -0
@@ -220,6 +220,13 @@ static int umc_v12_0_convert_error_address(struct amdgpu_device *adev, nps = adev->gmc.gmc_funcs->query_mem_partition_mode (adev);/* other nps modes are taken as nps1 */ +if (nps ==AMDGPU_NPS2_PARTITION_MODE ) { + loop_bits[0 ] =UMC_V12_0_PA_CH5_BIT ; + loop_bits[1 ] =UMC_V12_0_PA_C2_BIT ; + loop_bits[2 ] =UMC_V12_0_PA_B1_BIT ; + loop_bits[3 ] =UMC_V12_0_PA_R12_BIT ; + } +if (nps ==AMDGPU_NPS4_PARTITION_MODE ) { loop_bits[0 ] =UMC_V12_0_PA_CH4_BIT ; loop_bits[1 ] =UMC_V12_0_PA_CH5_BIT ;
@@ -517,6 +524,9 @@ static int umc_v12_0_update_ecc_status(struct amdgpu_device *adev,if (adev->gmc.gmc_funcs->query_mem_partition_mode) nps = adev->gmc.gmc_funcs->query_mem_partition_mode (adev); + +if (nps ==AMDGPU_NPS2_PARTITION_MODE ) + shift_bit =UMC_V12_0_PA_B1_BIT ;if (nps ==AMDGPU_NPS4_PARTITION_MODE ) shift_bit =UMC_V12_0_PA_B0_BIT ;
drivers/gpu/drm/amd/amdgpu/umc_v12_0.h +2 -0
@@ -65,12 +65,14 @@/* row bits in SOC physical address */ #define UMC_V12_0_PA_R0_BIT 22#define UMC_V12_0_PA_R11_BIT 33 +#define UMC_V12_0_PA_R12_BIT 34#define UMC_V12_0_PA_R13_BIT 35/* channel bit in SOC physical address */ #define UMC_V12_0_PA_CH4_BIT 12#define UMC_V12_0_PA_CH5_BIT 13/* bank bit in SOC physical address */ #define UMC_V12_0_PA_B0_BIT 19 +#define UMC_V12_0_PA_B1_BIT 20/* row bits in MCA address */ #define UMC_V12_0_MA_R0_BIT 10
Signature · 1 line
2.34.1
[AMD Official Use Only - AMD Internal Distribution Only]
Reviewed-by Hawking Zhang <[email protected]>
Regards,
Hawking
Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: amd-gfx <[email protected]> on behalf of Tao Zhou <[email protected]>
Sent: Thursday, April 3, 2025 2:48:12 PM
To: [email protected] <[email protected]>
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: add loop bits for NPS2 RAS page retirement
Support NPS2 UMC RAS.
Signed-off-by Tao Zhou <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | 10 ++++++++++ drivers/gpu/drm/amd/amdgpu/umc_v12_0.h | 2 ++ 2 files changed, 12 insertions(+)
drivers/gpu/drm/amd/amdgpu/umc_v12_0.c +10 -0
@@ -220,6 +220,13 @@ static int umc_v12_0_convert_error_address(struct amdgpu_device *adev, nps = adev->gmc.gmc_funcs->query_mem_partition_mode (adev);/* other nps modes are taken as nps1 */ +if (nps ==AMDGPU_NPS2_PARTITION_MODE ) { + loop_bits[0 ] =UMC_V12_0_PA_CH5_BIT ; + loop_bits[1 ] =UMC_V12_0_PA_C2_BIT ; + loop_bits[2 ] =UMC_V12_0_PA_B1_BIT ; + loop_bits[3 ] =UMC_V12_0_PA_R12_BIT ; + } +if (nps ==AMDGPU_NPS4_PARTITION_MODE ) { loop_bits[0 ] =UMC_V12_0_PA_CH4_BIT ; loop_bits[1 ] =UMC_V12_0_PA_CH5_BIT ;
@@ -517,6 +524,9 @@ static int umc_v12_0_update_ecc_status(struct amdgpu_device *adev,if (adev->gmc.gmc_funcs->query_mem_partition_mode) nps = adev->gmc.gmc_funcs->query_mem_partition_mode (adev); + +if (nps ==AMDGPU_NPS2_PARTITION_MODE ) + shift_bit =UMC_V12_0_PA_B1_BIT ;if (nps ==AMDGPU_NPS4_PARTITION_MODE ) shift_bit =UMC_V12_0_PA_B0_BIT ;
drivers/gpu/drm/amd/amdgpu/umc_v12_0.h +2 -0
@@ -65,12 +65,14 @@/* row bits in SOC physical address */ #define UMC_V12_0_PA_R0_BIT 22#define UMC_V12_0_PA_R11_BIT 33 +#define UMC_V12_0_PA_R12_BIT 34#define UMC_V12_0_PA_R13_BIT 35/* channel bit in SOC physical address */ #define UMC_V12_0_PA_CH4_BIT 12#define UMC_V12_0_PA_CH5_BIT 13/* bank bit in SOC physical address */ #define UMC_V12_0_PA_B0_BIT 19 +#define UMC_V12_0_PA_B1_BIT 20/* row bits in MCA address */ #define UMC_V12_0_MA_R0_BIT 10
--
2.34.1