Skip to contentSkip to conversation

drm/amdgpu: skip SMU FW reloading in runpm BACO case (v2)

PATCH In review Guchun Chen 1 participant 1 message Jul 12, 2022

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

PATCH 1/2 drm/amdgpu: skip SMU FW reloading in runpm BACO case (v2)

SMU is always alive, so it's fine to skip SMU FW reloading when runpm resumed from BACO, this can avoid some race issues when resuming SMU FW.

v2: Exclude boco case if an ASIC supports both boco and baco

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +8 -0
index e9411c28d88b..de59dc051340 100644
@@ -2348,6 +2348,14 @@ static int psp_load_smu_fw(struct psp_context *psp)
 			&adev->firmware.ucode[AMDGPU_UCODE_ID_SMC];
 	struct amdgpu_ras *ras = psp->ras_context.ras;
 
+	/* Skip SMU FW reloading in case of using BACO for runpm only,
+	 * as SMU is always alive.
+	 */
+	if (adev->in_runpm &&
+	    !amdgpu_device_supports_boco(adev_to_drm(adev)) &&
+	    amdgpu_device_supports_baco(adev_to_drm(adev)))
+		return 0;
+
 	if (!ucode->fw || amdgpu_sriov_vf(psp->adev))
 		return 0;
 
Signature · 1 line
2.17.1