aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuchun Chen <[email protected]>2023-01-10 11:33:44 +0800
committerAlex Deucher <[email protected]>2023-01-10 18:04:45 -0500
commit45bf79719f1f7f3fbd5dcaf1440afc9b3033c778 (patch)
tree83f426d115be4b724528a9fce01cd2c7b5a4eb1d
parent8ce1d255147a2ccfa41884e36ec0b95bdb0d523a (diff)
drm/amd/pm/smu13: BACO is supported when it's in BACO state
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 <[email protected]> Reviewed-by: Kenneth Feng <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-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 ccaedfcf977e..78945e79dbee 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
@@ -2243,6 +2243,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;