drm/amd/pm: enable BACO on smu_v13_0_7
authorKenneth Feng <kenneth.feng@amd.com>
Wed, 8 Jun 2022 08:31:18 +0000 (16:31 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 8 Jun 2022 15:44:11 +0000 (11:44 -0400)
enable BACO on smu_v13_0_7

Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c

index fb04d82f66e63b7e343b7ae844ed068d22e876eb..f57710790b8cd73f572f17c56b454fc99c48b44f 100644 (file)
@@ -1456,6 +1456,7 @@ static int smu_disable_dpms(struct smu_context *smu)
                case IP_VERSION(11, 0, 0):
                case IP_VERSION(11, 0, 5):
                case IP_VERSION(11, 0, 9):
+               case IP_VERSION(13, 0, 7):
                        return 0;
                default:
                        break;
index 7da42cae5d6eee3f3fa2dfd092a31940acd09b0f..dc614befcdf5b37f525727ba5da9852e77acc54e 100644 (file)
@@ -97,6 +97,7 @@ static struct cmn2asic_msg_mapping smu_v13_0_7_message_map[SMU_MSG_MAX_COUNT] =
        MSG_MAP(UseDefaultPPTable,              PPSMC_MSG_UseDefaultPPTable,           0),
        MSG_MAP(RunDcBtc,                       PPSMC_MSG_RunDcBtc,                    0),
        MSG_MAP(EnterBaco,                      PPSMC_MSG_EnterBaco,                   0),
+       MSG_MAP(ExitBaco,           PPSMC_MSG_ExitBaco,                            0),
        MSG_MAP(SetSoftMinByFreq,               PPSMC_MSG_SetSoftMinByFreq,            1),
        MSG_MAP(SetSoftMaxByFreq,               PPSMC_MSG_SetSoftMaxByFreq,            1),
        MSG_MAP(SetHardMinByFreq,               PPSMC_MSG_SetHardMinByFreq,            1),
@@ -281,6 +282,7 @@ smu_v13_0_7_get_allowed_feature_mask(struct smu_context *smu,
        *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_BACO_MPCLK_DS_BIT);
        *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_GFX_PCC_DFLL_BIT);
        *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_SOC_CG_BIT);
+       *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_BACO_BIT);
 
        if (adev->pm.pp_feature & PP_DCEFCLK_DPM_MASK)
                *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_DPM_DCN_BIT);
@@ -1584,6 +1586,11 @@ static const struct pptable_funcs smu_v13_0_7_ppt_funcs = {
        .set_tool_table_location = smu_v13_0_set_tool_table_location,
        .get_pp_feature_mask = smu_cmn_get_pp_feature_mask,
        .set_pp_feature_mask = smu_cmn_set_pp_feature_mask,
+       .baco_is_support = smu_v13_0_baco_is_support,
+       .baco_get_state = smu_v13_0_baco_get_state,
+       .baco_set_state = smu_v13_0_baco_set_state,
+       .baco_enter = smu_v13_0_baco_enter,
+       .baco_exit = smu_v13_0_baco_exit,
 };
 
 void smu_v13_0_7_set_ppt_funcs(struct smu_context *smu)