Skip to content

Commit

Permalink
drm/amd/pm: correct the baco state setting for ArmD3 scenario
Browse files Browse the repository at this point in the history
The check for baco support relies on the correct baco state.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Feifei Xu <feifei.xu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Evan Quan authored and Alex Deucher committed Feb 23, 2023
1 parent b299221 commit edddc6f
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
Original file line number Diff line number Diff line change
Expand Up @@ -2229,10 +2229,23 @@ int smu_v13_0_gfx_ulv_control(struct smu_context *smu,
int smu_v13_0_baco_set_armd3_sequence(struct smu_context *smu,
enum smu_baco_seq baco_seq)
{
return smu_cmn_send_smc_msg_with_param(smu,
SMU_MSG_ArmD3,
baco_seq,
NULL);
struct smu_baco_context *smu_baco = &smu->smu_baco;
int ret;

ret = smu_cmn_send_smc_msg_with_param(smu,
SMU_MSG_ArmD3,
baco_seq,
NULL);
if (ret)
return ret;

if (baco_seq == BACO_SEQ_BAMACO ||
baco_seq == BACO_SEQ_BACO)
smu_baco->state = SMU_BACO_STATE_ENTER;
else
smu_baco->state = SMU_BACO_STATE_EXIT;

return 0;
}

bool smu_v13_0_baco_is_support(struct smu_context *smu)
Expand Down

0 comments on commit edddc6f

Please sign in to comment.