Skip to contentSkip to conversation

drm/amdgpu: disable ras ta if module param amdgpu_ras_enable = 0

PATCH In review Yang Wang 2 participants 3 messages Mar 12, 2025

Subsystems (2)
lore
Share & tools
lore

Yang Wang

author
#0 lore raw

PATCH 1/1 drm/amdgpu: disable ras ta if module param amdgpu_ras_enable = 0

remove unnecessary ra ta laods if the module parameter is specified.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +2 -2
index 79dad75bd0e7..f4309e79b85c 100644
@@ -1752,7 +1752,7 @@ int psp_ras_terminate(struct psp_context *psp)
 	/*
 	 * TODO: bypass the terminate in sriov for now
 	 */
-	if (amdgpu_sriov_vf(psp->adev))
+	if (amdgpu_sriov_vf(psp->adev) || !amdgpu_ras_enable)
 		return 0;
 
 	if (!psp->ras_context.context.initialized)
@@ -1777,7 +1777,7 @@ int psp_ras_initialize(struct psp_context *psp)
 	/*
 	 * TODO: bypass the initialize in sriov for now
 	 */
-	if (amdgpu_sriov_vf(adev))
+	if (amdgpu_sriov_vf(adev) || !amdgpu_ras_enable)
 		return 0;
 
 	if (!adev->psp.ras_context.context.bin_desc.size_bytes ||
Signature · 1 line
2.34.1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Let's not do that. Ras ta should still be functioning to forward disable feature command even software ras is disabled by ras_enable.

Regards,
Hawking

-----Original Message-----
From: Wang, Yang(Kevin) <[email protected]>
Sent: Wednesday, March 12, 2025 09:50
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: disable ras ta if module param amdgpu_ras_enable = 0

remove unnecessary ra ta laods if the module parameter is specified.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +2 -2
index 79dad75bd0e7..f4309e79b85c 100644
@@ -1752,7 +1752,7 @@ int psp_ras_terminate(struct psp_context *psp)
        /*
         * TODO: bypass the terminate in sriov for now
         */
-       if (amdgpu_sriov_vf(psp->adev))
+       if (amdgpu_sriov_vf(psp->adev) || !amdgpu_ras_enable)
                return 0;
 
        if (!psp->ras_context.context.initialized)
@@ -1777,7 +1777,7 @@ int psp_ras_initialize(struct psp_context *psp)
        /*
         * TODO: bypass the initialize in sriov for now
         */
-       if (amdgpu_sriov_vf(adev))
+       if (amdgpu_sriov_vf(adev) || !amdgpu_ras_enable)
                return 0;
 
        if (!adev->psp.ras_context.context.bin_desc.size_bytes ||

--
2.34.1

#2 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

It is ok, thank you for your explanation.

Best Regards,
Kevin

-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Wednesday, March 12, 2025 11:58
To: Wang, Yang(Kevin) <[email protected]>; [email protected]
Cc: Zhou1, Tao <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: disable ras ta if module param amdgpu_ras_enable = 0

[AMD Official Use Only - AMD Internal Distribution Only]

Let's not do that. Ras ta should still be functioning to forward disable feature command even software ras is disabled by ras_enable.

Regards,
Hawking

-----Original Message-----
From: Wang, Yang(Kevin) <[email protected]>
Sent: Wednesday, March 12, 2025 09:50
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: disable ras ta if module param amdgpu_ras_enable = 0

remove unnecessary ra ta laods if the module parameter is specified.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +2 -2
index 79dad75bd0e7..f4309e79b85c 100644
@@ -1752,7 +1752,7 @@ int psp_ras_terminate(struct psp_context *psp)
        /*
         * TODO: bypass the terminate in sriov for now
         */
-       if (amdgpu_sriov_vf(psp->adev))
+       if (amdgpu_sriov_vf(psp->adev) || !amdgpu_ras_enable)
                return 0;
 
        if (!psp->ras_context.context.initialized)
@@ -1777,7 +1777,7 @@ int psp_ras_initialize(struct psp_context *psp)
        /*
         * TODO: bypass the initialize in sriov for now
         */
-       if (amdgpu_sriov_vf(adev))
+       if (amdgpu_sriov_vf(adev) || !amdgpu_ras_enable)
                return 0;
 
        if (!adev->psp.ras_context.context.bin_desc.size_bytes ||

--
2.34.1