diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2018-01-23 04:31:17 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-02-19 14:18:48 -0500 |
commit | c1f2fb6b6371980dfdaea1ceba7269ccac6fda3f (patch) | |
tree | f531de60c8d5bca75607d2b7c7961458915a0a8a | |
parent | c7429b3ae97fe3fdbbc8fb61ab0a032a558bba9e (diff) |
drm/amd/pp: Delete unnecessary function argument
in populate_single_graphic_level for smu7
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 files changed, 8 insertions, 18 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c index 61dbbf19fed9..6cdaed06da0b 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | |||
@@ -411,8 +411,7 @@ static uint8_t ci_get_sleep_divider_id_from_clock(uint32_t clock, | |||
411 | } | 411 | } |
412 | 412 | ||
413 | static int ci_populate_single_graphic_level(struct pp_hwmgr *hwmgr, | 413 | static int ci_populate_single_graphic_level(struct pp_hwmgr *hwmgr, |
414 | uint32_t clock, uint16_t sclk_al_threshold, | 414 | uint32_t clock, struct SMU7_Discrete_GraphicsLevel *level) |
415 | struct SMU7_Discrete_GraphicsLevel *level) | ||
416 | { | 415 | { |
417 | int result; | 416 | int result; |
418 | struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); | 417 | struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); |
@@ -438,7 +437,7 @@ static int ci_populate_single_graphic_level(struct pp_hwmgr *hwmgr, | |||
438 | clock, | 437 | clock, |
439 | &level->MinVddcPhases); | 438 | &level->MinVddcPhases); |
440 | 439 | ||
441 | level->ActivityLevel = sclk_al_threshold; | 440 | level->ActivityLevel = data->current_profile_setting.sclk_activity; |
442 | level->CcPwrDynRm = 0; | 441 | level->CcPwrDynRm = 0; |
443 | level->CcPwrDynRm1 = 0; | 442 | level->CcPwrDynRm1 = 0; |
444 | level->EnabledForActivity = 0; | 443 | level->EnabledForActivity = 0; |
@@ -492,7 +491,6 @@ static int ci_populate_all_graphic_levels(struct pp_hwmgr *hwmgr) | |||
492 | for (i = 0; i < dpm_table->sclk_table.count; i++) { | 491 | for (i = 0; i < dpm_table->sclk_table.count; i++) { |
493 | result = ci_populate_single_graphic_level(hwmgr, | 492 | result = ci_populate_single_graphic_level(hwmgr, |
494 | dpm_table->sclk_table.dpm_levels[i].value, | 493 | dpm_table->sclk_table.dpm_levels[i].value, |
495 | data->current_profile_setting.sclk_activity, | ||
496 | &levels[i]); | 494 | &levels[i]); |
497 | if (result) | 495 | if (result) |
498 | return result; | 496 | return result; |
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c index 1d0bc6632217..9d5ccdbc391d 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | |||
@@ -968,8 +968,7 @@ static int fiji_calculate_sclk_params(struct pp_hwmgr *hwmgr, | |||
968 | } | 968 | } |
969 | 969 | ||
970 | static int fiji_populate_single_graphic_level(struct pp_hwmgr *hwmgr, | 970 | static int fiji_populate_single_graphic_level(struct pp_hwmgr *hwmgr, |
971 | uint32_t clock, uint16_t sclk_al_threshold, | 971 | uint32_t clock, struct SMU73_Discrete_GraphicsLevel *level) |
972 | struct SMU73_Discrete_GraphicsLevel *level) | ||
973 | { | 972 | { |
974 | int result; | 973 | int result; |
975 | /* PP_Clocks minClocks; */ | 974 | /* PP_Clocks minClocks; */ |
@@ -996,7 +995,7 @@ static int fiji_populate_single_graphic_level(struct pp_hwmgr *hwmgr, | |||
996 | return result); | 995 | return result); |
997 | 996 | ||
998 | level->SclkFrequency = clock; | 997 | level->SclkFrequency = clock; |
999 | level->ActivityLevel = sclk_al_threshold; | 998 | level->ActivityLevel = data->current_profile_setting.sclk_activity; |
1000 | level->CcPwrDynRm = 0; | 999 | level->CcPwrDynRm = 0; |
1001 | level->CcPwrDynRm1 = 0; | 1000 | level->CcPwrDynRm1 = 0; |
1002 | level->EnabledForActivity = 0; | 1001 | level->EnabledForActivity = 0; |
@@ -1059,7 +1058,6 @@ static int fiji_populate_all_graphic_levels(struct pp_hwmgr *hwmgr) | |||
1059 | for (i = 0; i < dpm_table->sclk_table.count; i++) { | 1058 | for (i = 0; i < dpm_table->sclk_table.count; i++) { |
1060 | result = fiji_populate_single_graphic_level(hwmgr, | 1059 | result = fiji_populate_single_graphic_level(hwmgr, |
1061 | dpm_table->sclk_table.dpm_levels[i].value, | 1060 | dpm_table->sclk_table.dpm_levels[i].value, |
1062 | data->current_profile_setting.sclk_activity, | ||
1063 | &levels[i]); | 1061 | &levels[i]); |
1064 | if (result) | 1062 | if (result) |
1065 | return result; | 1063 | return result; |
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c index bf58a684d624..11aeb150a97f 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | |||
@@ -894,7 +894,6 @@ static int iceland_populate_phase_value_based_on_sclk(struct pp_hwmgr *hwmgr, | |||
894 | 894 | ||
895 | static int iceland_populate_single_graphic_level(struct pp_hwmgr *hwmgr, | 895 | static int iceland_populate_single_graphic_level(struct pp_hwmgr *hwmgr, |
896 | uint32_t engine_clock, | 896 | uint32_t engine_clock, |
897 | uint16_t sclk_activity_level_threshold, | ||
898 | SMU71_Discrete_GraphicsLevel *graphic_level) | 897 | SMU71_Discrete_GraphicsLevel *graphic_level) |
899 | { | 898 | { |
900 | int result; | 899 | int result; |
@@ -920,7 +919,7 @@ static int iceland_populate_single_graphic_level(struct pp_hwmgr *hwmgr, | |||
920 | &graphic_level->MinVddcPhases); | 919 | &graphic_level->MinVddcPhases); |
921 | 920 | ||
922 | /* Indicates maximum activity level for this performance level. 50% for now*/ | 921 | /* Indicates maximum activity level for this performance level. 50% for now*/ |
923 | graphic_level->ActivityLevel = sclk_activity_level_threshold; | 922 | graphic_level->ActivityLevel = data->current_profile_setting.sclk_activity; |
924 | 923 | ||
925 | graphic_level->CcPwrDynRm = 0; | 924 | graphic_level->CcPwrDynRm = 0; |
926 | graphic_level->CcPwrDynRm1 = 0; | 925 | graphic_level->CcPwrDynRm1 = 0; |
@@ -985,7 +984,6 @@ static int iceland_populate_all_graphic_levels(struct pp_hwmgr *hwmgr) | |||
985 | for (i = 0; i < dpm_table->sclk_table.count; i++) { | 984 | for (i = 0; i < dpm_table->sclk_table.count; i++) { |
986 | result = iceland_populate_single_graphic_level(hwmgr, | 985 | result = iceland_populate_single_graphic_level(hwmgr, |
987 | dpm_table->sclk_table.dpm_levels[i].value, | 986 | dpm_table->sclk_table.dpm_levels[i].value, |
988 | data->current_profile_setting.sclk_activity, | ||
989 | &(smu_data->smc_state_table.GraphicsLevel[i])); | 987 | &(smu_data->smc_state_table.GraphicsLevel[i])); |
990 | if (result != 0) | 988 | if (result != 0) |
991 | return result; | 989 | return result; |
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c index d2f8e34e0a4e..bfb2c85d3c60 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | |||
@@ -934,8 +934,7 @@ static int polaris10_calculate_sclk_params(struct pp_hwmgr *hwmgr, | |||
934 | } | 934 | } |
935 | 935 | ||
936 | static int polaris10_populate_single_graphic_level(struct pp_hwmgr *hwmgr, | 936 | static int polaris10_populate_single_graphic_level(struct pp_hwmgr *hwmgr, |
937 | uint32_t clock, uint16_t sclk_al_threshold, | 937 | uint32_t clock, struct SMU74_Discrete_GraphicsLevel *level) |
938 | struct SMU74_Discrete_GraphicsLevel *level) | ||
939 | { | 938 | { |
940 | int result; | 939 | int result; |
941 | /* PP_Clocks minClocks; */ | 940 | /* PP_Clocks minClocks; */ |
@@ -962,7 +961,7 @@ static int polaris10_populate_single_graphic_level(struct pp_hwmgr *hwmgr, | |||
962 | "can not find VDDC voltage value for " | 961 | "can not find VDDC voltage value for " |
963 | "VDDC engine clock dependency table", | 962 | "VDDC engine clock dependency table", |
964 | return result); | 963 | return result); |
965 | level->ActivityLevel = sclk_al_threshold; | 964 | level->ActivityLevel = data->current_profile_setting.sclk_activity; |
966 | 965 | ||
967 | level->CcPwrDynRm = 0; | 966 | level->CcPwrDynRm = 0; |
968 | level->CcPwrDynRm1 = 0; | 967 | level->CcPwrDynRm1 = 0; |
@@ -1033,7 +1032,6 @@ static int polaris10_populate_all_graphic_levels(struct pp_hwmgr *hwmgr) | |||
1033 | 1032 | ||
1034 | result = polaris10_populate_single_graphic_level(hwmgr, | 1033 | result = polaris10_populate_single_graphic_level(hwmgr, |
1035 | dpm_table->sclk_table.dpm_levels[i].value, | 1034 | dpm_table->sclk_table.dpm_levels[i].value, |
1036 | hw_data->current_profile_setting.sclk_activity, | ||
1037 | &(smu_data->smc_state_table.GraphicsLevel[i])); | 1035 | &(smu_data->smc_state_table.GraphicsLevel[i])); |
1038 | if (result) | 1036 | if (result) |
1039 | return result; | 1037 | return result; |
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c index 70888478533f..748d98528c07 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | |||
@@ -608,7 +608,6 @@ static int tonga_calculate_sclk_params(struct pp_hwmgr *hwmgr, | |||
608 | 608 | ||
609 | static int tonga_populate_single_graphic_level(struct pp_hwmgr *hwmgr, | 609 | static int tonga_populate_single_graphic_level(struct pp_hwmgr *hwmgr, |
610 | uint32_t engine_clock, | 610 | uint32_t engine_clock, |
611 | uint16_t sclk_activity_level_threshold, | ||
612 | SMU72_Discrete_GraphicsLevel *graphic_level) | 611 | SMU72_Discrete_GraphicsLevel *graphic_level) |
613 | { | 612 | { |
614 | int result; | 613 | int result; |
@@ -636,7 +635,7 @@ static int tonga_populate_single_graphic_level(struct pp_hwmgr *hwmgr, | |||
636 | /* SCLK frequency in units of 10KHz*/ | 635 | /* SCLK frequency in units of 10KHz*/ |
637 | graphic_level->SclkFrequency = engine_clock; | 636 | graphic_level->SclkFrequency = engine_clock; |
638 | /* Indicates maximum activity level for this performance level. 50% for now*/ | 637 | /* Indicates maximum activity level for this performance level. 50% for now*/ |
639 | graphic_level->ActivityLevel = sclk_activity_level_threshold; | 638 | graphic_level->ActivityLevel = data->current_profile_setting.sclk_activity; |
640 | 639 | ||
641 | graphic_level->CcPwrDynRm = 0; | 640 | graphic_level->CcPwrDynRm = 0; |
642 | graphic_level->CcPwrDynRm1 = 0; | 641 | graphic_level->CcPwrDynRm1 = 0; |
@@ -704,7 +703,6 @@ static int tonga_populate_all_graphic_levels(struct pp_hwmgr *hwmgr) | |||
704 | for (i = 0; i < dpm_table->sclk_table.count; i++) { | 703 | for (i = 0; i < dpm_table->sclk_table.count; i++) { |
705 | result = tonga_populate_single_graphic_level(hwmgr, | 704 | result = tonga_populate_single_graphic_level(hwmgr, |
706 | dpm_table->sclk_table.dpm_levels[i].value, | 705 | dpm_table->sclk_table.dpm_levels[i].value, |
707 | data->current_profile_setting.sclk_activity, | ||
708 | &(smu_data->smc_state_table.GraphicsLevel[i])); | 706 | &(smu_data->smc_state_table.GraphicsLevel[i])); |
709 | if (result != 0) | 707 | if (result != 0) |
710 | return result; | 708 | return result; |