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

drm/amd/powerplay: fix compile warning for wrong data type V2

do_div expects the 1st argument in 64bit instead of 32bit.
Drop the usage of do_div as it seems unnecessary.

V2: drop usage of do_div completely
Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 989edc69
...@@ -1195,7 +1195,7 @@ static int vega20_set_sclk_od( ...@@ -1195,7 +1195,7 @@ static int vega20_set_sclk_od(
int ret = 0; int ret = 0;
od_sclk = golden_sclk_table->dpm_levels[golden_sclk_table->count - 1].value * value; od_sclk = golden_sclk_table->dpm_levels[golden_sclk_table->count - 1].value * value;
do_div(od_sclk, 100); od_sclk /= 100;
od_sclk += golden_sclk_table->dpm_levels[golden_sclk_table->count - 1].value; od_sclk += golden_sclk_table->dpm_levels[golden_sclk_table->count - 1].value;
ret = vega20_od8_set_settings(hwmgr, OD8_SETTING_GFXCLK_FMAX, od_sclk); ret = vega20_od8_set_settings(hwmgr, OD8_SETTING_GFXCLK_FMAX, od_sclk);
...@@ -1242,7 +1242,7 @@ static int vega20_set_mclk_od( ...@@ -1242,7 +1242,7 @@ static int vega20_set_mclk_od(
int ret = 0; int ret = 0;
od_mclk = golden_mclk_table->dpm_levels[golden_mclk_table->count - 1].value * value; od_mclk = golden_mclk_table->dpm_levels[golden_mclk_table->count - 1].value * value;
do_div(od_mclk, 100); od_mclk /= 100;
od_mclk += golden_mclk_table->dpm_levels[golden_mclk_table->count - 1].value; od_mclk += golden_mclk_table->dpm_levels[golden_mclk_table->count - 1].value;
ret = vega20_od8_set_settings(hwmgr, OD8_SETTING_UCLK_FMAX, od_mclk); ret = vega20_od8_set_settings(hwmgr, OD8_SETTING_UCLK_FMAX, od_mclk);
......
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