drm/amd/pm: keep the BACO feature enabled for suspend
Subsystems (3)
PATCH 1/1 drm/amd/pm: keep the BACO feature enabled for suspend
To pair with the workaround which always reset the ASIC in suspend. Otherwise, the reset which relies on BACO will fail.
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +7 -1
@@ -1308,10 +1308,16 @@ static int smu_disable_dpms(struct smu_context *smu) {struct amdgpu_device *adev = smu->adev;int ret =0 ; +/* +* TODO: (adev->in_suspend && !adev->in_s0ix) is added to pair +* the workaround which always reset the asic in suspend. +* It's likely that workaround will be dropped in the future. +* Then the change here should be dropped together. +*/ bool use_baco = !smu->is_apu && ((amdgpu_in_reset (adev) && (amdgpu_asic_reset_method (adev) ==AMD_RESET_METHOD_BACO )) || - ((adev->in_runpm || adev->in_s4) &&amdgpu_asic_supports_baco (adev))); + ((adev->in_runpm || adev->in_s4 || (adev->in_suspend && !adev->in_s0ix)) &&amdgpu_asic_supports_baco (adev)));/* * For custom pptable uploading, skip the DPM features
Signature · 1 line
2.29.0
Quoted 37 lines · Evan Quan
To pair with the workaround which always reset the ASIC in suspend. Otherwise, the reset which relies on BACO will fail.
Fixes 50583690930d ("drm/amdgpu: always reset the asic in suspend (v2)")Signed-off-by Evan Quan <[email protected]>Change-Id I39ed072af16e34ef1e1c16b50ace6d46fbc388b9--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +7
-2@@ -1308,10 +1308,16 @@ static int smu_disable_dpms(struct smu_context *smu) {struct amdgpu_device *adev = smu->adev;int ret =0 ; +/* +* TODO: (adev->in_suspend && !adev->in_s0ix) is added to pair +* the workaround which always reset the asic in suspend. +* It's likely that workaround will be dropped in the future. +* Then the change here should be dropped together. +*/ bool use_baco = !smu->is_apu && ((amdgpu_in_reset (adev) && (amdgpu_asic_reset_method (adev) ==AMD_RESET_METHOD_BACO )) || - ((adev->in_runpm || adev->in_s4) &&amdgpu_asic_supports_baco (adev))); + ((adev->in_runpm || adev->in_s4 || (adev->in_suspend && !adev->in_s0ix)) &&amdgpu_asic_supports_baco (adev)));/* * For custom pptable uploading, skip the DPM features -- 2.29.0
[Public]
Regards,
Guchun
-----Original Message-----
From: Quan, Evan <[email protected]>
Sent: Thursday, December 30, 2021 6:01 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Chen, Guchun <[email protected]>; Quan, Evan <[email protected]>
Subject: [PATCH] drm/amd/pm: keep the BACO feature enabled for suspend
To pair with the workaround which always reset the ASIC in suspend. Otherwise, the reset which relies on BACO will fail.
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +8 -2
@@ -1308,10 +1308,16 @@ static int smu_disable_dpms(struct smu_context *smu) {struct amdgpu_device *adev = smu->adev;int ret =0 ; +/* +* TODO: (adev->in_suspend && !adev->in_s0ix) is added to pair +* the workaround which always reset the asic in suspend. +* It's likely that workaround will be dropped in the future. +* Then the change here should be dropped together. +*/ bool use_baco = !smu->is_apu && ((amdgpu_in_reset (adev) && (amdgpu_asic_reset_method (adev) ==AMD_RESET_METHOD_BACO )) || - ((adev->in_runpm || adev->in_s4) &&amdgpu_asic_supports_baco (adev))); + ((adev->in_runpm || adev->in_s4 || (adev->in_suspend && +!adev->in_s0ix)) &&amdgpu_asic_supports_baco (adev)));/* * For custom pptable uploading, skip the DPM features --
2.29.0