Skip to contentSkip to conversation

drm/amdgpu: optimize gfx ras features flag clean

PATCH In review Stanley.Yang 2 participants 2 messages Apr 19, 2021 – Apr 21, 2021

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

PATCH 1/1 drm/amdgpu: optimize gfx ras features flag clean

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +5 -5
index ec3ebc33ee03..8fdf355d7de8 100644
@@ -657,11 +657,7 @@ static int __amdgpu_ras_feature_enable(struct amdgpu_device *adev,
 		con->features |= BIT(head->block);
 	} else {
 		if (obj && amdgpu_ras_is_feature_enabled(adev, head)) {
-			/* skip clean gfx ras context feature for VEGA20 Gaming.
-			 * will clean later
-			 */
-			if (!(!adev->ras_features && con->features & BIT(AMDGPU_RAS_BLOCK__GFX)))
-				con->features &= ~BIT(head->block);
+			con->features &= ~BIT(head->block);
 			put_obj(obj);
 		}
 	}
@@ -769,6 +765,10 @@ int amdgpu_ras_feature_enable_on_boot(struct amdgpu_device *adev,
 				con->features |= BIT(head->block);
 
 			ret = amdgpu_ras_feature_enable(adev, head, 0);
+
+			/* clean gfx block ras features flag */
+			if (adev->ras_features && head->block == AMDGPU_RAS_BLOCK__GFX)
+				con->features &= ~BIT(head->block);
 		}
 	} else
 		ret = amdgpu_ras_feature_enable(adev, head, enable);
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - Internal Distribution Only]

-----Original Message-----
From: Stanley.Yang <[email protected]>
Sent: Monday, April 19, 2021 5:44 PM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Clements, John <[email protected]>; Li, Dennis <[email protected]>; Xu, Feifei <[email protected]>; Yang, Stanley <[email protected]>
Subject: [PATCH Review 1/1] drm/amdgpu: optimize gfx ras features flag clean

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +5 -5
index ec3ebc33ee03..8fdf355d7de8 100644
@@ -657,11 +657,7 @@ static int __amdgpu_ras_feature_enable(struct amdgpu_device *adev,
 con->features |= BIT(head->block);
 } else {
 if (obj && amdgpu_ras_is_feature_enabled(adev, head)) {
-/* skip clean gfx ras context feature for VEGA20 Gaming.
- * will clean later
- */
-if (!(!adev->ras_features && con->features & BIT(AMDGPU_RAS_BLOCK__GFX)))
-con->features &= ~BIT(head->block);
+con->features &= ~BIT(head->block);
 put_obj(obj);
 }
 }
@@ -769,6 +765,10 @@ int amdgpu_ras_feature_enable_on_boot(struct amdgpu_device *adev,
 con->features |= BIT(head->block);
 
 ret = amdgpu_ras_feature_enable(adev, head, 0);
+
+/* clean gfx block ras features flag */
+if (adev->ras_features && head->block == AMDGPU_RAS_BLOCK__GFX)
+con->features &= ~BIT(head->block);
 }
 } else
 ret = amdgpu_ras_feature_enable(adev, head, enable);

--
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx