Skip to content

Commit 3113497

Browse files
committed
drm/amd/pm: Fix error of MACO flag setting code
jira LE-1907 Rebuild_History Non-Buildable kernel-4.18.0-553.16.1.el8_10 commit-author Ma Jun <[email protected]> commit 7f3e6b8 MACO only works if BACO is supported Signed-off-by: Ma Jun <[email protected]> Reviewed-by: Kenneth Feng <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] # 6.1.x (cherry picked from commit 7f3e6b8) Signed-off-by: Jonathan Maple <[email protected]>
1 parent aa8b25b commit 3113497

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,12 +335,12 @@ static int smu_v13_0_0_check_powerplay_table(struct smu_context *smu)
335335
if (powerplay_table->platform_caps & SMU_13_0_0_PP_PLATFORM_CAP_HARDWAREDC)
336336
smu->dc_controlled_by_gpio = true;
337337

338-
if (powerplay_table->platform_caps & SMU_13_0_0_PP_PLATFORM_CAP_BACO ||
339-
powerplay_table->platform_caps & SMU_13_0_0_PP_PLATFORM_CAP_MACO)
338+
if (powerplay_table->platform_caps & SMU_13_0_0_PP_PLATFORM_CAP_BACO) {
340339
smu_baco->platform_support = true;
341340

342-
if (powerplay_table->platform_caps & SMU_13_0_0_PP_PLATFORM_CAP_MACO)
343-
smu_baco->maco_support = true;
341+
if (powerplay_table->platform_caps & SMU_13_0_0_PP_PLATFORM_CAP_MACO)
342+
smu_baco->maco_support = true;
343+
}
344344

345345
table_context->thermal_controller_type =
346346
powerplay_table->thermal_controller_type;

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,12 +326,13 @@ static int smu_v13_0_7_check_powerplay_table(struct smu_context *smu)
326326
if (powerplay_table->platform_caps & SMU_13_0_7_PP_PLATFORM_CAP_HARDWAREDC)
327327
smu->dc_controlled_by_gpio = true;
328328

329-
if (powerplay_table->platform_caps & SMU_13_0_7_PP_PLATFORM_CAP_BACO ||
330-
powerplay_table->platform_caps & SMU_13_0_7_PP_PLATFORM_CAP_MACO)
329+
if (powerplay_table->platform_caps & SMU_13_0_7_PP_PLATFORM_CAP_BACO) {
331330
smu_baco->platform_support = true;
332331

333-
if (smu_baco->platform_support && (BoardTable->HsrEnabled || BoardTable->VddqOffEnabled))
334-
smu_baco->maco_support = true;
332+
if ((powerplay_table->platform_caps & SMU_13_0_7_PP_PLATFORM_CAP_MACO)
333+
&& (BoardTable->HsrEnabled || BoardTable->VddqOffEnabled))
334+
smu_baco->maco_support = true;
335+
}
335336

336337
table_context->thermal_controller_type =
337338
powerplay_table->thermal_controller_type;

0 commit comments

Comments
 (0)