drm/amdgpu: skip SMU FW reloading in runpm BACO case
Subsystems (2)
PATCH 1/2 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 FW.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +6 -0
@@ -2348,6 +2348,12 @@ 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, +* as SMU is always alive. +*/ +if (adev->in_runpm &&amdgpu_asic_supports_baco (adev)) +return 0 ; +if (!ucode->fw ||amdgpu_sriov_vf (psp->adev))return 0 ;
Signature · 1 line
2.17.1
Quoted 16 lines · Guchun Chen
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.
Suggested-by Evan Quan <[email protected]>Signed-off-by Guchun Chen <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c static int psp_load_smu_fw(struct psp_context *psp) · line 2355
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +5
-0@@ -2348,6 +2348,12 @@ 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, +* as SMU is always alive. +*/ +if (adev->in_runpm &&amdgpu_asic_supports_baco (adev)) +return 0 ;
What is an asic supports both BACO and BOCO? I think we need to differentiate here.
Alex
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1
-1+if (!ucode->fw ||amdgpu_sriov_vf (psp->adev))return 0 ; --2.17.1
Good point. We should limit it in BACO only once an ASIC supports BOCO and BACO together.
Regards,
Guchun
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Monday, July 11, 2022 11:29 PM
To: Chen, Guchun <[email protected]>
Cc: amd-gfx list <[email protected]>; Deucher, Alexander <[email protected]>; Zhang, Hawking <[email protected]>; Lazar, Lijo <[email protected]>; Quan, Evan <[email protected]>; Feng, Kenneth <[email protected]>
Subject: Re: [PATCH 1/2] drm/amdgpu: skip SMU FW reloading in runpm BACO case
Quoted 17 lines · Guchun Chen
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.
Suggested-by Evan Quan <[email protected]>Signed-off-by Guchun Chen <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c static int psp_load_smu_fw(struct psp_context *psp) · line 2355
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +5
-0@@ -2348,6 +2348,12 @@ 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, +* as SMU is always alive. +*/ +if (adev->in_runpm &&amdgpu_asic_supports_baco (adev)) +return 0 ;
What is an asic supports both BACO and BOCO? I think we need to differentiate here.
Alex
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1
-1+if (!ucode->fw ||amdgpu_sriov_vf (psp->adev))return 0 ; --2.17.1