Skip to contentSkip to conversation

drm/amdgpu: Enable aqua vanjaram RAS

PATCH In review Stanley.Yang 2 participants 3 messages Jul 14, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/2 drm/amdgpu: Enable aqua vanjaram RAS

Enable RAS for aqua vanjaram.

Changed from V1:
Split the change in amdgpu_ras_asic_supported into a separated patch.

Changed from V2:
Avoid to modify global variable amdgpu_ras_enable.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -0
index 5371fbd3fe17..8673d9790bb0 100644
@@ -2422,6 +2422,7 @@ static bool amdgpu_ras_asic_supported(struct amdgpu_device *adev)
 	if (adev->asic_type == CHIP_IP_DISCOVERY) {
 		switch (adev->ip_versions[MP0_HWIP][0]) {
 		case IP_VERSION(13, 0, 0):
+		case IP_VERSION(13, 0, 6):
 		case IP_VERSION(13, 0, 10):
 			return true;
 		default:
Signature · 1 line
2.25.1
#1 lore raw

PATCH v3 2/2 drm/amdgpu: Disable RAS by default on APU flatform

Disable RAS feature by default for aqua vanjaram on APU platform.

Changed from V1:
Splite Disable RAS by default on APU platform into a separated patch.

Changed from V2:
Avoid to modify global variable amdgpu_ras_enable.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +11 -2
index 8673d9790bb0..c46e0ed9165e 100644
@@ -2524,8 +2524,17 @@ static void amdgpu_ras_check_supported(struct amdgpu_device *adev)
 	/* hw_supported needs to be aligned with RAS block mask. */
 	adev->ras_hw_enabled &= AMDGPU_RAS_BLOCK_MASK;
 
-	adev->ras_enabled = amdgpu_ras_enable == 0 ? 0 :
-		adev->ras_hw_enabled & amdgpu_ras_mask;
+
+	/*
+	 * Disable ras feature for aqua vanjaram
+	 * by default on apu platform.
+	 */
+	if (adev->ip_versions[MP0_HWIP][0] == IP_VERSION(13, 0, 6))
+		adev->ras_enabled = amdgpu_ras_enable != 1 ? 0 :
+			adev->ras_hw_enabled & amdgpu_ras_mask;
+	else
+		adev->ras_enabled = amdgpu_ras_enable == 0 ? 0 :
+			adev->ras_hw_enabled & amdgpu_ras_mask;
 }
 
 static void amdgpu_ras_counte_dw(struct work_struct *work)
Signature · 1 line
2.25.1
Reviewed-by on v3 2/2
#2 lore raw

RE: [PATCH Review V3 2/2] drm/amdgpu: Disable RAS by default on APU flatform

[AMD Official Use Only - General]

The series is:

Quoted 53 lines

-----Original Message-----
From: Stanley.Yang <[email protected]>
Sent: Friday, July 14, 2023 11:42 AM
To: [email protected]; Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Chai, Thomas <[email protected]>; Li, Candice <[email protected]>
Cc: Yang, Stanley <[email protected]>
Subject: [PATCH Review V3 2/2] drm/amdgpu: Disable RAS by default on APU flatform

Disable RAS feature by default for aqua vanjaram on APU platform.

Changed from V1:
Splite Disable RAS by default on APU platform into a separated patch.

Changed from V2:
Avoid to modify global variable amdgpu_ras_enable.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +11 -2
index 8673d9790bb0..c46e0ed9165e 100644
@@ -2524,8 +2524,17 @@ static void amdgpu_ras_check_supported(struct
 amdgpu_device *adev)
      /* hw_supported needs to be aligned with RAS block mask. */
      adev->ras_hw_enabled &= AMDGPU_RAS_BLOCK_MASK;
 
-     adev->ras_enabled = amdgpu_ras_enable == 0 ? 0 :
-             adev->ras_hw_enabled & amdgpu_ras_mask;
+
+     /*
+      * Disable ras feature for aqua vanjaram
+      * by default on apu platform.
+      */
+     if (adev->ip_versions[MP0_HWIP][0] == IP_VERSION(13, 0, 6))
+             adev->ras_enabled = amdgpu_ras_enable != 1 ? 0 :
+                     adev->ras_hw_enabled & amdgpu_ras_mask;
+     else
+             adev->ras_enabled = amdgpu_ras_enable == 0 ? 0 :
+                     adev->ras_hw_enabled & amdgpu_ras_mask;
 }
 

static void amdgpu_ras_counte_dw(struct work_struct *work)
--
2.25.1