Commit a0a59c8f authored by Evan Quan's avatar Evan Quan Committed by Alex Deucher

drm/amd/powerplay: correct vega12 max num of dpm level

Use MAX_NUM_CLOCKS instead of VG12_PSUEDO* macros for
the max number of dpm levels.
Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 30222561
...@@ -1642,8 +1642,8 @@ static int vega12_get_sclks(struct pp_hwmgr *hwmgr, ...@@ -1642,8 +1642,8 @@ static int vega12_get_sclks(struct pp_hwmgr *hwmgr,
return -1; return -1;
dpm_table = &(data->dpm_table.gfx_table); dpm_table = &(data->dpm_table.gfx_table);
ucount = (dpm_table->count > VG12_PSUEDO_NUM_GFXCLK_DPM_LEVELS) ? ucount = (dpm_table->count > MAX_NUM_CLOCKS) ?
VG12_PSUEDO_NUM_GFXCLK_DPM_LEVELS : dpm_table->count; MAX_NUM_CLOCKS : dpm_table->count;
for (i = 0; i < ucount; i++) { for (i = 0; i < ucount; i++) {
clocks->data[i].clocks_in_khz = clocks->data[i].clocks_in_khz =
...@@ -1674,11 +1674,12 @@ static int vega12_get_memclocks(struct pp_hwmgr *hwmgr, ...@@ -1674,11 +1674,12 @@ static int vega12_get_memclocks(struct pp_hwmgr *hwmgr,
return -1; return -1;
dpm_table = &(data->dpm_table.mem_table); dpm_table = &(data->dpm_table.mem_table);
ucount = (dpm_table->count > VG12_PSUEDO_NUM_UCLK_DPM_LEVELS) ? ucount = (dpm_table->count > MAX_NUM_CLOCKS) ?
VG12_PSUEDO_NUM_UCLK_DPM_LEVELS : dpm_table->count; MAX_NUM_CLOCKS : dpm_table->count;
for (i = 0; i < ucount; i++) { for (i = 0; i < ucount; i++) {
clocks->data[i].clocks_in_khz = clocks->data[i].clocks_in_khz =
data->mclk_latency_table.entries[i].frequency =
dpm_table->dpm_levels[i].value * 100; dpm_table->dpm_levels[i].value * 100;
clocks->data[i].latency_in_us = clocks->data[i].latency_in_us =
...@@ -1704,8 +1705,8 @@ static int vega12_get_dcefclocks(struct pp_hwmgr *hwmgr, ...@@ -1704,8 +1705,8 @@ static int vega12_get_dcefclocks(struct pp_hwmgr *hwmgr,
dpm_table = &(data->dpm_table.dcef_table); dpm_table = &(data->dpm_table.dcef_table);
ucount = (dpm_table->count > VG12_PSUEDO_NUM_DCEFCLK_DPM_LEVELS) ? ucount = (dpm_table->count > MAX_NUM_CLOCKS) ?
VG12_PSUEDO_NUM_DCEFCLK_DPM_LEVELS : dpm_table->count; MAX_NUM_CLOCKS : dpm_table->count;
for (i = 0; i < ucount; i++) { for (i = 0; i < ucount; i++) {
clocks->data[i].clocks_in_khz = clocks->data[i].clocks_in_khz =
...@@ -1732,8 +1733,8 @@ static int vega12_get_socclocks(struct pp_hwmgr *hwmgr, ...@@ -1732,8 +1733,8 @@ static int vega12_get_socclocks(struct pp_hwmgr *hwmgr,
dpm_table = &(data->dpm_table.soc_table); dpm_table = &(data->dpm_table.soc_table);
ucount = (dpm_table->count > VG12_PSUEDO_NUM_SOCCLK_DPM_LEVELS) ? ucount = (dpm_table->count > MAX_NUM_CLOCKS) ?
VG12_PSUEDO_NUM_SOCCLK_DPM_LEVELS : dpm_table->count; MAX_NUM_CLOCKS : dpm_table->count;
for (i = 0; i < ucount; i++) { for (i = 0; i < ucount; i++) {
clocks->data[i].clocks_in_khz = clocks->data[i].clocks_in_khz =
......
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