aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/umc_v12_0.c
diff options
context:
space:
mode:
authorTao Zhou <[email protected]>2025-04-03 03:39:49 +0000
committerAlex Deucher <[email protected]>2025-04-08 20:48:14 +0000
commitb695dd3bb8e806916ba64a62fae918c60004cc4d (patch)
tree8e0f4aa98c506a16188c710b552e0ed2efe7bfb0 /drivers/gpu/drm/amd/amdgpu/umc_v12_0.c
parentdrm/amd/amdgpu: decouple ASPM with pcie dpm (diff)
downloadkernel-b695dd3bb8e806916ba64a62fae918c60004cc4d.tar.gz
kernel-b695dd3bb8e806916ba64a62fae918c60004cc4d.zip
drm/amdgpu: add loop bits for NPS2 page retirement
Support NPS2 RAS. 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/umc_v12_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/umc_v12_0.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/umc_v12_0.c b/drivers/gpu/drm/amd/amdgpu/umc_v12_0.c
index 0e404c074975..da00d6b3b6a3 100644
--- a/drivers/gpu/drm/amd/amdgpu/umc_v12_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/umc_v12_0.c
@@ -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;