File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
drivers/gpu/drm/amd/powerplay Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1155,17 +1155,17 @@ static int smu_smc_table_hw_init(struct smu_context *smu,
1155
1155
}
1156
1156
}
1157
1157
1158
- if (adev -> asic_type >= CHIP_NAVI10 &&
1159
- adev -> asic_type <= CHIP_NAVI12 ) {
1158
+ if (smu -> ppt_funcs -> set_power_source ) {
1160
1159
/*
1161
1160
* For Navi1X, manually switch it to AC mode as PMFW
1162
1161
* may boot it with DC mode.
1163
- * TODO: should check whether we are indeed under AC
1164
- * mode before doing this.
1165
1162
*/
1166
- ret = smu_set_power_source (smu , SMU_POWER_SOURCE_AC );
1163
+ if (adev -> pm .ac_power )
1164
+ ret = smu_set_power_source (smu , SMU_POWER_SOURCE_AC );
1165
+ else
1166
+ ret = smu_set_power_source (smu , SMU_POWER_SOURCE_DC );
1167
1167
if (ret ) {
1168
- pr_err ("Failed to switch to AC mode!\n" );
1168
+ pr_err ("Failed to switch to %s mode!\n" , adev -> pm . ac_power ? "AC" : "DC " );
1169
1169
return ret ;
1170
1170
}
1171
1171
}
You can’t perform that action at this time.
0 commit comments