summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuchun Chen <guchun.chen@amd.com>2023-01-10 11:33:44 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-18 11:58:12 +0100
commitb8e6fc445990dce368950bd9553b31f46b50285e (patch)
treeed2218cd3fa350df236c63f88660e99c052a5e5f
parentadc48e5e408afbb01d261bd303fd9fbbbaa3e317 (diff)
downloadlinux-b8e6fc445990dce368950bd9553b31f46b50285e.tar.gz
linux-b8e6fc445990dce368950bd9553b31f46b50285e.tar.bz2
linux-b8e6fc445990dce368950bd9553b31f46b50285e.zip
drm/amd/pm/smu13: BACO is supported when it's in BACO state
commit 972fb53d3605eb6cdf0d6ae9a52e910626a91ff7 upstream. This leverages the logic in smu11. No need to talk to SMU to check BACO enablement as it's in BACO state already. Signed-off-by: Guchun Chen <guchun.chen@amd.com> Reviewed-by: Kenneth Feng <kenneth.feng@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org # 6.0, 6.1 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
index 8e4830a311bd..9b96902adad3 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
@@ -2249,6 +2249,10 @@ bool smu_v13_0_baco_is_support(struct smu_context *smu)
!smu_baco->platform_support)
return false;
+ /* return true if ASIC is in BACO state already */
+ if (smu_v13_0_baco_get_state(smu) == SMU_BACO_STATE_ENTER)
+ return true;
+
if (smu_cmn_feature_is_supported(smu, SMU_FEATURE_BACO_BIT) &&
!smu_cmn_feature_is_enabled(smu, SMU_FEATURE_BACO_BIT))
return false;