1 |
From 972fb53d3605eb6cdf0d6ae9a52e910626a91ff7 Mon Sep 17 00:00:00 2001 |
2 |
From: Guchun Chen <guchun.chen@amd.com> |
3 |
Date: Tue, 10 Jan 2023 11:33:44 +0800 |
4 |
Subject: drm/amd/pm/smu13: BACO is supported when it's in BACO state |
5 |
|
6 |
From: Guchun Chen <guchun.chen@amd.com> |
7 |
|
8 |
commit 972fb53d3605eb6cdf0d6ae9a52e910626a91ff7 upstream. |
9 |
|
10 |
This leverages the logic in smu11. No need to talk to SMU to |
11 |
check BACO enablement as it's in BACO state already. |
12 |
|
13 |
Signed-off-by: Guchun Chen <guchun.chen@amd.com> |
14 |
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com> |
15 |
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> |
16 |
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
17 |
Cc: stable@vger.kernel.org # 6.0, 6.1 |
18 |
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
19 |
--- |
20 |
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 4 ++++ |
21 |
1 file changed, 4 insertions(+) |
22 |
|
23 |
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c |
24 |
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c |
25 |
@@ -2249,6 +2249,10 @@ bool smu_v13_0_baco_is_support(struct sm |
26 |
!smu_baco->platform_support) |
27 |
return false; |
28 |
|
29 |
+ /* return true if ASIC is in BACO state already */ |
30 |
+ if (smu_v13_0_baco_get_state(smu) == SMU_BACO_STATE_ENTER) |
31 |
+ return true; |
32 |
+ |
33 |
if (smu_cmn_feature_is_supported(smu, SMU_FEATURE_BACO_BIT) && |
34 |
!smu_cmn_feature_is_enabled(smu, SMU_FEATURE_BACO_BIT)) |
35 |
return false; |