Skip to contentSkip to conversation

drm/amdgpu: add condition to set MP1 state on gpu reset

PATCH In review Likun Gao 2 participants 2 messages May 18, 2020 – May 20, 2020

Subsystems (2)
lore
Share & tools
lore

Likun Gao

author
#0 lore raw

PATCH 1/1 drm/amdgpu: add condition to set MP1 state on gpu reset

From: Likun Gao <[email protected]>

Only ras supportted need to set MP1 state to prepare for unload before reloading SMU FW.

Change-Id I9e49b3f13aa613393381fe15b6b060665026078a
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +2 -1
index 5de5b27bf4c4..a349cf15f90a 100644
@@ -1399,12 +1399,13 @@ static int psp_load_smu_fw(struct psp_context *psp)
 	struct amdgpu_device* adev = psp->adev;
 	struct amdgpu_firmware_info *ucode =
 			&adev->firmware.ucode[AMDGPU_UCODE_ID_SMC];
+	struct amdgpu_ras *ras = psp->ras.ras;
 
 	if (!ucode->fw || amdgpu_sriov_vf(psp->adev))
 		return 0;
 
 
-	if (adev->in_gpu_reset) {
+	if (adev->in_gpu_reset && ras && ras->supported) {
 		ret = amdgpu_dpm_set_mp1_state(adev, PP_MP1_STATE_UNLOAD);
 		if (ret) {
 			DRM_WARN("Failed to set MP1 state prepare for reload\n");
Signature · 6 lines
2.25.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: Gao, Likun <[email protected]>
Sent: Monday, May 18, 2020 6:35 PM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Quan, Evan <[email protected]>; Clements, John <[email protected]>; Gao, Likun <[email protected]>
Subject: [PATCH] drm/amdgpu: add condition to set MP1 state on gpu reset

From: Likun Gao <[email protected]>

Only ras supportted need to set MP1 state to prepare for unload before reloading SMU FW.

Change-Id I9e49b3f13aa613393381fe15b6b060665026078a
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +2 -1
index 5de5b27bf4c4..a349cf15f90a 100644
@@ -1399,12 +1399,13 @@ static int psp_load_smu_fw(struct psp_context *psp)
 struct amdgpu_device* adev = psp->adev;
 struct amdgpu_firmware_info *ucode =
 &adev->firmware.ucode[AMDGPU_UCODE_ID_SMC];
+struct amdgpu_ras *ras = psp->ras.ras;
 
 if (!ucode->fw || amdgpu_sriov_vf(psp->adev))
 return 0;
 
 
-if (adev->in_gpu_reset) {
+if (adev->in_gpu_reset && ras && ras->supported) {
 ret = amdgpu_dpm_set_mp1_state(adev, PP_MP1_STATE_UNLOAD);
 if (ret) {
 DRM_WARN("Failed to set MP1 state prepare for reload\n");

--
2.25.1

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