[PATCH] drm/amd/pm: keep the BACO feature enabled for suspend
Chen, Guchun
Guchun.Chen at amd.com
Fri Dec 31 02:56:19 UTC 2021
[Public]
Reviewed-by: Guchun Chen <guchun.chen at amd.com>
Regards,
Guchun
-----Original Message-----
From: Quan, Evan <Evan.Quan at amd.com>
Sent: Thursday, December 30, 2021 6:01 PM
To: amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; Chen, Guchun <Guchun.Chen at amd.com>; Quan, Evan <Evan.Quan at amd.com>
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.
Fixes: 50583690930d ("drm/amdgpu: always reset the asic in suspend (v2)")
Signed-off-by: Evan Quan <evan.quan at amd.com>
Change-Id: I39ed072af16e34ef1e1c16b50ace6d46fbc388b9
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index 4d867778a65c..7628be2f2301 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -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
More information about the amd-gfx
mailing list