From f9b325008cf94bd8e4d18e511b0951fb8ddab072 Mon Sep 17 00:00:00 2001 From: jsg Date: Wed, 18 Jan 2023 23:51:35 +0000 Subject: [PATCH] drm/amd/pm/smu13: BACO is supported when it's in BACO state From Guchun Chen b8e6fc445990dce368950bd9553b31f46b50285e in linux-6.1.y/6.1.7 972fb53d3605eb6cdf0d6ae9a52e910626a91ff7 in mainline linux --- sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0.c b/sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0.c index 53c69a3a35c..25591195210 100644 --- a/sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0.c +++ b/sys/dev/pci/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; -- 2.20.1