Commit 5d41535c authored by Kenneth Feng's avatar Kenneth Feng Committed by Alex Deucher

drm/amd/powerplay: Enable ACG SS feature

Port the atomfirmware.h and populates the
updated pptable to SMU.With the new parameters
in the new pptable, the ACG SS feature is enabled.
Signed-off-by: default avatarKenneth Feng <kenneth.feng@amd.com>
Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4a8e06f7
...@@ -1264,9 +1264,9 @@ struct atom_smc_dpm_info_v4_1 ...@@ -1264,9 +1264,9 @@ struct atom_smc_dpm_info_v4_1
uint8_t ledpin2; uint8_t ledpin2;
uint8_t padding8_4; uint8_t padding8_4;
uint8_t gfxclkspreadenabled; uint8_t pllgfxclkspreadenabled;
uint8_t gfxclkspreadpercent; uint8_t pllgfxclkspreadpercent;
uint16_t gfxclkspreadfreq; uint16_t pllgfxclkspreadfreq;
uint8_t uclkspreadenabled; uint8_t uclkspreadenabled;
uint8_t uclkspreadpercent; uint8_t uclkspreadpercent;
...@@ -1276,7 +1276,11 @@ struct atom_smc_dpm_info_v4_1 ...@@ -1276,7 +1276,11 @@ struct atom_smc_dpm_info_v4_1
uint8_t socclkspreadpercent; uint8_t socclkspreadpercent;
uint16_t socclkspreadfreq; uint16_t socclkspreadfreq;
uint32_t boardreserved[3]; uint8_t acggfxclkspreadenabled;
uint8_t acggfxclkspreadpercent;
uint16_t acggfxclkspreadfreq;
uint32_t boardreserved[10];
}; };
......
...@@ -616,9 +616,9 @@ int pp_atomfwctrl_get_smc_dpm_information(struct pp_hwmgr *hwmgr, ...@@ -616,9 +616,9 @@ int pp_atomfwctrl_get_smc_dpm_information(struct pp_hwmgr *hwmgr,
param->ledpin1 = info->ledpin1; param->ledpin1 = info->ledpin1;
param->ledpin2 = info->ledpin2; param->ledpin2 = info->ledpin2;
param->gfxclkspreadenabled = info->gfxclkspreadenabled; param->pllgfxclkspreadenabled = info->pllgfxclkspreadenabled;
param->gfxclkspreadpercent = info->gfxclkspreadpercent; param->pllgfxclkspreadpercent = info->pllgfxclkspreadpercent;
param->gfxclkspreadfreq = info->gfxclkspreadfreq; param->pllgfxclkspreadfreq = info->pllgfxclkspreadfreq;
param->uclkspreadenabled = info->uclkspreadenabled; param->uclkspreadenabled = info->uclkspreadenabled;
param->uclkspreadpercent = info->uclkspreadpercent; param->uclkspreadpercent = info->uclkspreadpercent;
...@@ -628,5 +628,9 @@ int pp_atomfwctrl_get_smc_dpm_information(struct pp_hwmgr *hwmgr, ...@@ -628,5 +628,9 @@ int pp_atomfwctrl_get_smc_dpm_information(struct pp_hwmgr *hwmgr,
param->socclkspreadpercent = info->socclkspreadpercent; param->socclkspreadpercent = info->socclkspreadpercent;
param->socclkspreadfreq = info->socclkspreadfreq; param->socclkspreadfreq = info->socclkspreadfreq;
param->acggfxclkspreadenabled = info->acggfxclkspreadenabled;
param->acggfxclkspreadpercent = info->acggfxclkspreadpercent;
param->acggfxclkspreadfreq = info->acggfxclkspreadfreq;
return 0; return 0;
} }
...@@ -192,9 +192,9 @@ struct pp_atomfwctrl_smc_dpm_parameters ...@@ -192,9 +192,9 @@ struct pp_atomfwctrl_smc_dpm_parameters
uint8_t ledpin1; uint8_t ledpin1;
uint8_t ledpin2; uint8_t ledpin2;
uint8_t gfxclkspreadenabled; uint8_t pllgfxclkspreadenabled;
uint8_t gfxclkspreadpercent; uint8_t pllgfxclkspreadpercent;
uint16_t gfxclkspreadfreq; uint16_t pllgfxclkspreadfreq;
uint8_t uclkspreadenabled; uint8_t uclkspreadenabled;
uint8_t uclkspreadpercent; uint8_t uclkspreadpercent;
...@@ -203,6 +203,10 @@ struct pp_atomfwctrl_smc_dpm_parameters ...@@ -203,6 +203,10 @@ struct pp_atomfwctrl_smc_dpm_parameters
uint8_t socclkspreadenabled; uint8_t socclkspreadenabled;
uint8_t socclkspreadpercent; uint8_t socclkspreadpercent;
uint16_t socclkspreadfreq; uint16_t socclkspreadfreq;
uint8_t acggfxclkspreadenabled;
uint8_t acggfxclkspreadpercent;
uint16_t acggfxclkspreadfreq;
}; };
int pp_atomfwctrl_get_gpu_pll_dividers_vega10(struct pp_hwmgr *hwmgr, int pp_atomfwctrl_get_gpu_pll_dividers_vega10(struct pp_hwmgr *hwmgr,
......
...@@ -208,9 +208,9 @@ static int append_vbios_pptable(struct pp_hwmgr *hwmgr, PPTable_t *ppsmc_pptable ...@@ -208,9 +208,9 @@ static int append_vbios_pptable(struct pp_hwmgr *hwmgr, PPTable_t *ppsmc_pptable
ppsmc_pptable->LedPin1 = smc_dpm_table.ledpin1; ppsmc_pptable->LedPin1 = smc_dpm_table.ledpin1;
ppsmc_pptable->LedPin2 = smc_dpm_table.ledpin2; ppsmc_pptable->LedPin2 = smc_dpm_table.ledpin2;
ppsmc_pptable->GfxclkSpreadEnabled = smc_dpm_table.gfxclkspreadenabled; ppsmc_pptable->PllGfxclkSpreadEnabled = smc_dpm_table.pllgfxclkspreadenabled;
ppsmc_pptable->GfxclkSpreadPercent = smc_dpm_table.gfxclkspreadpercent; ppsmc_pptable->PllGfxclkSpreadPercent = smc_dpm_table.pllgfxclkspreadpercent;
ppsmc_pptable->GfxclkSpreadFreq = smc_dpm_table.gfxclkspreadfreq; ppsmc_pptable->PllGfxclkSpreadFreq = smc_dpm_table.pllgfxclkspreadfreq;
ppsmc_pptable->UclkSpreadEnabled = 0; ppsmc_pptable->UclkSpreadEnabled = 0;
ppsmc_pptable->UclkSpreadPercent = smc_dpm_table.uclkspreadpercent; ppsmc_pptable->UclkSpreadPercent = smc_dpm_table.uclkspreadpercent;
...@@ -220,6 +220,11 @@ static int append_vbios_pptable(struct pp_hwmgr *hwmgr, PPTable_t *ppsmc_pptable ...@@ -220,6 +220,11 @@ static int append_vbios_pptable(struct pp_hwmgr *hwmgr, PPTable_t *ppsmc_pptable
ppsmc_pptable->SocclkSpreadPercent = smc_dpm_table.socclkspreadpercent; ppsmc_pptable->SocclkSpreadPercent = smc_dpm_table.socclkspreadpercent;
ppsmc_pptable->SocclkSpreadFreq = smc_dpm_table.socclkspreadfreq; ppsmc_pptable->SocclkSpreadFreq = smc_dpm_table.socclkspreadfreq;
ppsmc_pptable->AcgGfxclkSpreadEnabled = smc_dpm_table.acggfxclkspreadenabled;
ppsmc_pptable->AcgGfxclkSpreadPercent = smc_dpm_table.acggfxclkspreadpercent;
ppsmc_pptable->AcgGfxclkSpreadFreq = smc_dpm_table.acggfxclkspreadfreq;
return 0; return 0;
} }
......
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
#define FEATURE_GFX_EDC_MASK (1 << FEATURE_GFX_EDC_BIT ) #define FEATURE_GFX_EDC_MASK (1 << FEATURE_GFX_EDC_BIT )
#define FEATURE_GFXOFF_MASK (1 << FEATURE_GFXOFF_BIT ) #define FEATURE_GFXOFF_MASK (1 << FEATURE_GFXOFF_BIT )
#define FEATURE_CG_MASK (1 << FEATURE_CG_BIT ) #define FEATURE_CG_MASK (1 << FEATURE_CG_BIT )
#define FEATURE_ACG_MASK (1 << FEATURE_ACG_BIT ) #define FEATURE_ACG_MASK (1 << FEATURE_ACG_BIT)
#define FEATURE_SPARE_29_MASK (1 << FEATURE_SPARE_29_BIT ) #define FEATURE_SPARE_29_MASK (1 << FEATURE_SPARE_29_BIT )
#define FEATURE_SPARE_30_MASK (1 << FEATURE_SPARE_30_BIT ) #define FEATURE_SPARE_30_MASK (1 << FEATURE_SPARE_30_BIT )
#define FEATURE_SPARE_31_MASK (1 << FEATURE_SPARE_31_BIT ) #define FEATURE_SPARE_31_MASK (1 << FEATURE_SPARE_31_BIT )
...@@ -481,9 +481,9 @@ typedef struct { ...@@ -481,9 +481,9 @@ typedef struct {
uint8_t padding8_4; uint8_t padding8_4;
uint8_t GfxclkSpreadEnabled; uint8_t PllGfxclkSpreadEnabled;
uint8_t GfxclkSpreadPercent; uint8_t PllGfxclkSpreadPercent;
uint16_t GfxclkSpreadFreq; uint16_t PllGfxclkSpreadFreq;
uint8_t UclkSpreadEnabled; uint8_t UclkSpreadEnabled;
uint8_t UclkSpreadPercent; uint8_t UclkSpreadPercent;
...@@ -493,7 +493,11 @@ typedef struct { ...@@ -493,7 +493,11 @@ typedef struct {
uint8_t SocclkSpreadPercent; uint8_t SocclkSpreadPercent;
uint16_t SocclkSpreadFreq; uint16_t SocclkSpreadFreq;
uint32_t BoardReserved[3]; uint8_t AcgGfxclkSpreadEnabled;
uint8_t AcgGfxclkSpreadPercent;
uint16_t AcgGfxclkSpreadFreq;
uint32_t BoardReserved[10];
uint32_t MmHubPadding[7]; uint32_t MmHubPadding[7];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment