OSDN Git Service

drm/amd/pm: allow the user to force BACO on smu v13.0.0/7
authorKenneth Feng <kenneth.feng@amd.com>
Tue, 15 Aug 2023 08:55:16 +0000 (16:55 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 16 Aug 2023 15:34:30 +0000 (11:34 -0400)
allow the user to force BACO on smu v13.0.0/7

Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c

index 895cda8..52e9c76 100644 (file)
@@ -2263,7 +2263,7 @@ int smu_v13_0_baco_set_state(struct smu_context *smu,
        if (state == SMU_BACO_STATE_ENTER) {
                ret = smu_cmn_send_smc_msg_with_param(smu,
                                                      SMU_MSG_EnterBaco,
-                                                     smu_baco->maco_support ?
+                                                     (smu_baco->maco_support && amdgpu_runtime_pm != 1) ?
                                                      BACO_SEQ_BAMACO : BACO_SEQ_BACO,
                                                      NULL);
        } else {
index c904da1..784a9d2 100644 (file)
@@ -2206,7 +2206,8 @@ static int smu_v13_0_0_baco_enter(struct smu_context *smu)
 
        if (adev->in_runpm && smu_cmn_is_audio_func_enabled(adev))
                return smu_v13_0_baco_set_armd3_sequence(smu,
-                               smu_baco->maco_support ? BACO_SEQ_BAMACO : BACO_SEQ_BACO);
+                               (smu_baco->maco_support && amdgpu_runtime_pm != 1) ?
+                                       BACO_SEQ_BAMACO : BACO_SEQ_BACO);
        else
                return smu_v13_0_baco_enter(smu);
 }
index 822b971..32b0bb9 100644 (file)
@@ -2134,7 +2134,8 @@ static int smu_v13_0_7_baco_enter(struct smu_context *smu)
 
        if (adev->in_runpm && smu_cmn_is_audio_func_enabled(adev))
                return smu_v13_0_baco_set_armd3_sequence(smu,
-                               smu_baco->maco_support ? BACO_SEQ_BAMACO : BACO_SEQ_BACO);
+                               (smu_baco->maco_support && amdgpu_runtime_pm != 1) ?
+                                       BACO_SEQ_BAMACO : BACO_SEQ_BACO);
        else
                return smu_v13_0_baco_enter(smu);
 }