From: Guchun Chen Date: Thu, 14 Jul 2022 07:55:37 +0000 (+0800) Subject: drm/amdgpu: skip SMU FW reloading in runpm BACO case X-Git-Tag: v6.6.17~6802^2~3^2~117 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f746556aa9724d740c44861db0ac005ae50e1332;p=platform%2Fkernel%2Flinux-rpi.git drm/amdgpu: skip SMU FW reloading in runpm BACO case 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. Suggested-by: Evan Quan Signed-off-by: Guchun Chen Reviewed-by: Lijo Lazar Reviewed-by: Evan Quan Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index e9411c2..6540582 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -2348,6 +2348,13 @@ 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 && (adev->pm.rpm_mode == AMDGPU_RUNPM_BACO)) + return 0; + if (!ucode->fw || amdgpu_sriov_vf(psp->adev)) return 0;