[PATCH 1/5] drm/amd/pm: correct DPM_XGMI/VCN_DPM feature name
Lazar, Lijo
lijo.lazar at amd.com
Wed Aug 11 09:46:31 UTC 2021
Reviewed-by: Lijo Lazar <lijo.lazar at amd.com>
On 8/11/2021 2:03 PM, Kevin Wang wrote:
> the following feature is wrong, it will cause sysnode of pp_features show error:
> 1. DPM_XGMI
> 2. VCN_DPM
>
> Signed-off-by: Kevin Wang <kevin1.wang at amd.com>
> ---
> drivers/gpu/drm/amd/pm/inc/smu_types.h | 1 -
> .../gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 16 ++++++++--------
> .../gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 4 ++--
> 3 files changed, 10 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/inc/smu_types.h b/drivers/gpu/drm/amd/pm/inc/smu_types.h
> index 1d3765b873df..3fdee6cf01ed 100644
> --- a/drivers/gpu/drm/amd/pm/inc/smu_types.h
> +++ b/drivers/gpu/drm/amd/pm/inc/smu_types.h
> @@ -297,7 +297,6 @@ enum smu_clk_type {
> __SMU_DUMMY_MAP(DS_FCLK), \
> __SMU_DUMMY_MAP(DS_MP1CLK), \
> __SMU_DUMMY_MAP(DS_MP0CLK), \
> - __SMU_DUMMY_MAP(XGMI), \
> __SMU_DUMMY_MAP(XGMI_PER_LINK_PWR_DWN), \
> __SMU_DUMMY_MAP(DPM_GFX_PACE), \
> __SMU_DUMMY_MAP(MEM_VDDCI_SCALING), \
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
> index 6ec8492f71f5..b4d98465bb36 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
> @@ -163,14 +163,14 @@ static const struct cmn2asic_mapping arcturus_feature_mask_map[SMU_FEATURE_COUNT
> FEA_MAP(DPM_SOCCLK),
> FEA_MAP(DPM_FCLK),
> FEA_MAP(DPM_MP0CLK),
> - ARCTURUS_FEA_MAP(SMU_FEATURE_XGMI_BIT, FEATURE_DPM_XGMI_BIT),
> + FEA_MAP(DPM_XGMI),
> FEA_MAP(DS_GFXCLK),
> FEA_MAP(DS_SOCCLK),
> FEA_MAP(DS_LCLK),
> FEA_MAP(DS_FCLK),
> FEA_MAP(DS_UCLK),
> FEA_MAP(GFX_ULV),
> - ARCTURUS_FEA_MAP(SMU_FEATURE_VCN_PG_BIT, FEATURE_DPM_VCN_BIT),
> + ARCTURUS_FEA_MAP(SMU_FEATURE_VCN_DPM_BIT, FEATURE_DPM_VCN_BIT),
> FEA_MAP(RSMU_SMN_CG),
> FEA_MAP(WAFL_CG),
> FEA_MAP(PPT),
> @@ -721,13 +721,13 @@ static int arcturus_get_current_clk_freq_by_table(struct smu_context *smu,
> member_type = METRICS_AVERAGE_SOCCLK;
> break;
> case PPCLK_VCLK:
> - if (smu_cmn_feature_is_enabled(smu, SMU_FEATURE_VCN_PG_BIT))
> + if (smu_cmn_feature_is_enabled(smu, SMU_FEATURE_VCN_DPM_BIT))
> member_type = METRICS_CURR_VCLK;
> else
> member_type = METRICS_AVERAGE_VCLK;
> break;
> case PPCLK_DCLK:
> - if (smu_cmn_feature_is_enabled(smu, SMU_FEATURE_VCN_PG_BIT))
> + if (smu_cmn_feature_is_enabled(smu, SMU_FEATURE_VCN_DPM_BIT))
> member_type = METRICS_CURR_DCLK;
> else
> member_type = METRICS_AVERAGE_DCLK;
> @@ -1916,16 +1916,16 @@ static int arcturus_dpm_set_vcn_enable(struct smu_context *smu, bool enable)
> int ret = 0;
>
> if (enable) {
> - if (!smu_cmn_feature_is_enabled(smu, SMU_FEATURE_VCN_PG_BIT)) {
> - ret = smu_cmn_feature_set_enabled(smu, SMU_FEATURE_VCN_PG_BIT, 1);
> + if (!smu_cmn_feature_is_enabled(smu, SMU_FEATURE_VCN_DPM_BIT)) {
> + ret = smu_cmn_feature_set_enabled(smu, SMU_FEATURE_VCN_DPM_BIT, 1);
> if (ret) {
> dev_err(smu->adev->dev, "[EnableVCNDPM] failed!\n");
> return ret;
> }
> }
> } else {
> - if (smu_cmn_feature_is_enabled(smu, SMU_FEATURE_VCN_PG_BIT)) {
> - ret = smu_cmn_feature_set_enabled(smu, SMU_FEATURE_VCN_PG_BIT, 0);
> + if (smu_cmn_feature_is_enabled(smu, SMU_FEATURE_VCN_DPM_BIT)) {
> + ret = smu_cmn_feature_set_enabled(smu, SMU_FEATURE_VCN_DPM_BIT, 0);
> if (ret) {
> dev_err(smu->adev->dev, "[DisableVCNDPM] failed!\n");
> return ret;
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
> index 856eeaf293b8..97cc6fb9b22b 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
> @@ -156,14 +156,14 @@ static const struct cmn2asic_mapping aldebaran_feature_mask_map[SMU_FEATURE_COUN
> ALDEBARAN_FEA_MAP(SMU_FEATURE_DPM_SOCCLK_BIT, FEATURE_DPM_SOCCLK_BIT),
> ALDEBARAN_FEA_MAP(SMU_FEATURE_DPM_FCLK_BIT, FEATURE_DPM_FCLK_BIT),
> ALDEBARAN_FEA_MAP(SMU_FEATURE_DPM_LCLK_BIT, FEATURE_DPM_LCLK_BIT),
> - ALDEBARAN_FEA_MAP(SMU_FEATURE_XGMI_BIT, FEATURE_DPM_XGMI_BIT),
> + ALDEBARAN_FEA_MAP(SMU_FEATURE_DPM_XGMI_BIT, FEATURE_DPM_XGMI_BIT),
> ALDEBARAN_FEA_MAP(SMU_FEATURE_DS_GFXCLK_BIT, FEATURE_DS_GFXCLK_BIT),
> ALDEBARAN_FEA_MAP(SMU_FEATURE_DS_SOCCLK_BIT, FEATURE_DS_SOCCLK_BIT),
> ALDEBARAN_FEA_MAP(SMU_FEATURE_DS_LCLK_BIT, FEATURE_DS_LCLK_BIT),
> ALDEBARAN_FEA_MAP(SMU_FEATURE_DS_FCLK_BIT, FEATURE_DS_FCLK_BIT),
> ALDEBARAN_FEA_MAP(SMU_FEATURE_DS_UCLK_BIT, FEATURE_DS_UCLK_BIT),
> ALDEBARAN_FEA_MAP(SMU_FEATURE_GFX_SS_BIT, FEATURE_GFX_SS_BIT),
> - ALDEBARAN_FEA_MAP(SMU_FEATURE_VCN_PG_BIT, FEATURE_DPM_VCN_BIT),
> + ALDEBARAN_FEA_MAP(SMU_FEATURE_VCN_DPM_BIT, FEATURE_DPM_VCN_BIT),
> ALDEBARAN_FEA_MAP(SMU_FEATURE_RSMU_SMN_CG_BIT, FEATURE_RSMU_SMN_CG_BIT),
> ALDEBARAN_FEA_MAP(SMU_FEATURE_WAFL_CG_BIT, FEATURE_WAFL_CG_BIT),
> ALDEBARAN_FEA_MAP(SMU_FEATURE_PPT_BIT, FEATURE_PPT_BIT),
>
More information about the amd-gfx
mailing list