drm/amd/pp: Remove useless code in smu
Subsystems (2)
PATCH v2 1/1 drm/amd/pp: Remove useless code in smu
the condition always false and the code
path never be executed. so remove them.
v2: add comments
--- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 1 - drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 - drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 5 ----- drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c | 5 ----- 4 files changed, 12 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +0 -1
@@ -89,7 +89,6 @@ int hwmgr_early_init(struct pp_hwmgr *hwmgr)hwmgr_init_default_caps (hwmgr);hwmgr_set_user_specify_caps (hwmgr); hwmgr->fan_ctrl_is_in_default_mode = true; - hwmgr->reload_fw =1 ;hwmgr_init_workload_prority (hwmgr);switch (hwmgr->chip_family) {
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h +0 -1
@@ -733,7 +733,6 @@ struct pp_hwmgr {void *smu_backend;const struct pp_smumgr_func *smumgr_funcs;bool is_kicker; -bool reload_fw;enum PP_DAL_POWERLEVEL dal_power_level;struct phm_dynamic_state_info dyn_state;
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +0 -5
@@ -381,11 +381,6 @@ int smu7_request_smu_load_fw(struct pp_hwmgr *hwmgr)uint32_t fw_to_load;int r =0 ; -if (!hwmgr->reload_fw) { -pr_info ("skip reloading...\n" ); -return 0 ; - } -if (smu_data->soft_regs_start)cgs_write_ind_register (hwmgr->device,CGS_IND_REG__SMC , smu_data->soft_regs_start + smum_get_offsetof(hwmgr,
drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c +0 -5
@@ -659,11 +659,6 @@ static int smu8_request_smu_load_fw(struct pp_hwmgr *hwmgr)struct smu8_smumgr *smu8_smu = hwmgr->smu_backend;uint32_t smc_address; -if (!hwmgr->reload_fw) { -pr_info ("skip reloading...\n" ); -return 0 ; - } -smu8_smu_populate_firmware_entries (hwmgr);smu8_smu_construct_toc (hwmgr);
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1538126618-21656-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org
Deucher, Alexander
Reviewed-by________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Rex Zhu <[email protected]>
Sent: Friday, September 28, 2018 5:23:38 AM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH v2] drm/amd/pp: Remove useless code in smu
the condition always false and the code
path never be executed. so remove them.
v2: add comments
--- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 1 - drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 - drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 5 ----- drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c | 5 ----- 4 files changed, 12 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +0 -1
@@ -89,7 +89,6 @@ int hwmgr_early_init(struct pp_hwmgr *hwmgr)hwmgr_init_default_caps (hwmgr);hwmgr_set_user_specify_caps (hwmgr); hwmgr->fan_ctrl_is_in_default_mode = true; - hwmgr->reload_fw =1 ;hwmgr_init_workload_prority (hwmgr);switch (hwmgr->chip_family) {
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h +0 -1
@@ -733,7 +733,6 @@ struct pp_hwmgr {void *smu_backend;const struct pp_smumgr_func *smumgr_funcs;bool is_kicker; -bool reload_fw;enum PP_DAL_POWERLEVEL dal_power_level;struct phm_dynamic_state_info dyn_state;
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +0 -5
@@ -381,11 +381,6 @@ int smu7_request_smu_load_fw(struct pp_hwmgr *hwmgr)uint32_t fw_to_load;int r =0 ; -if (!hwmgr->reload_fw) { -pr_info ("skip reloading...\n" ); -return 0 ; - } -if (smu_data->soft_regs_start)cgs_write_ind_register (hwmgr->device,CGS_IND_REG__SMC , smu_data->soft_regs_start + smum_get_offsetof(hwmgr,
drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c +0 -5
@@ -659,11 +659,6 @@ static int smu8_request_smu_load_fw(struct pp_hwmgr *hwmgr)struct smu8_smumgr *smu8_smu = hwmgr->smu_backend;uint32_t smc_address; -if (!hwmgr->reload_fw) { -pr_info ("skip reloading...\n" ); -return 0 ; - } -smu8_smu_populate_firmware_entries (hwmgr);smu8_smu_construct_toc (hwmgr);
--
1.9.1
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx