drm/amd/pp: Remove SAMU support in powerplay
Subsystems (2)
PATCH 1/1 drm/amd/pp: Remove SAMU support in powerplay
As the SAMU ip was not supported in linux,
so delete the SAMU support in powerplay on
asics Bonarire/Hawwii/Tonga/Fiji/Polaris/vegam.
--- .../amd/powerplay/hwmgr/smu7_clockpowergating.c | 54 -------------- .../amd/powerplay/hwmgr/smu7_clockpowergating.h | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.h | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h | 1 - drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 2 - drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 35 --------- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 74 ------------------- .../gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 10 --- .../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 86 ---------------------- .../gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 80 -------------------- .../gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 85 --------------------- 12 files changed, 430 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_clockpowergating.c +0 -54
@@ -39,13 +39,6 @@ static int smu7_enable_disable_vce_dpm(struct pp_hwmgr *hwmgr, bool enable) PPSMC_MSG_VCEDPM_Disable); } -static int smu7_enable_disable_samu_dpm (struct pp_hwmgr *hwmgr,bool enable) -{ -return smum_send_msg_to_smc (hwmgr, enable ? - PPSMC_MSG_SAMUDPM_Enable : - PPSMC_MSG_SAMUDPM_Disable); -} -static int smu7_update_uvd_dpm (struct pp_hwmgr *hwmgr,bool bgate) {if (!bgate)
@@ -60,13 +53,6 @@ static int smu7_update_vce_dpm(struct pp_hwmgr *hwmgr, bool bgate)return smu7_enable_disable_vce_dpm (hwmgr, !bgate); } -static int smu7_update_samu_dpm (struct pp_hwmgr *hwmgr,bool bgate) -{ -if (!bgate) -smum_update_smc_table (hwmgr,SMU_SAMU_TABLE ); -return smu7_enable_disable_samu_dpm (hwmgr, !bgate); -} -int smu7_powerdown_uvd (struct pp_hwmgr *hwmgr) {if (phm_cf_want_uvd_power_gating (hwmgr))
@@ -107,35 +93,15 @@ static int smu7_powerup_vce(struct pp_hwmgr *hwmgr)return 0 ; } -static int smu7_powerdown_samu (struct pp_hwmgr *hwmgr) -{ -if (phm_cap_enabled (hwmgr->platform_descriptor.platformCaps, - PHM_PlatformCaps_SamuPowerGating)) -return smum_send_msg_to_smc (hwmgr, - PPSMC_MSG_SAMPowerOFF); -return 0 ; -} - -static int smu7_powerup_samu (struct pp_hwmgr *hwmgr) -{ -if (phm_cap_enabled (hwmgr->platform_descriptor.platformCaps, - PHM_PlatformCaps_SamuPowerGating)) -return smum_send_msg_to_smc (hwmgr, - PPSMC_MSG_SAMPowerON); -return 0 ; -} -int smu7_disable_clock_power_gating (struct pp_hwmgr *hwmgr) {struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); data->uvd_power_gated = false; data->vce_power_gated = false; - data->samu_power_gated = false;smu7_powerup_uvd (hwmgr);smu7_powerup_vce (hwmgr); -smu7_powerup_samu (hwmgr);return 0 ; }
@@ -195,26 +161,6 @@ void smu7_powergate_vce(struct pp_hwmgr *hwmgr, bool bgate) } } -int smu7_powergate_samu (struct pp_hwmgr *hwmgr,bool bgate) -{ -struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); - -if (data->samu_power_gated == bgate) -return 0 ; - - data->samu_power_gated = bgate; - -if (bgate) { -smu7_update_samu_dpm (hwmgr, true); -smu7_powerdown_samu (hwmgr); - }else { -smu7_powerup_samu (hwmgr); -smu7_update_samu_dpm (hwmgr, false); - } - -return 0 ; -} -int smu7_update_clock_gatings (struct pp_hwmgr *hwmgr,const uint32_t *msg_id) {
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_clockpowergating.h +0 -1
@@ -29,7 +29,6 @@void smu7_powergate_vce (struct pp_hwmgr *hwmgr,bool bgate);void smu7_powergate_uvd (struct pp_hwmgr *hwmgr,bool bgate);int smu7_powerdown_uvd (struct pp_hwmgr *hwmgr); -int smu7_powergate_samu (struct pp_hwmgr *hwmgr,bool bgate);int smu7_powergate_acp (struct pp_hwmgr *hwmgr,bool bgate);int smu7_disable_clock_power_gating (struct pp_hwmgr *hwmgr); int smu7_update_clock_gatings(struct pp_hwmgr *hwmgr,
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
@@ -4244,7 +4244,6 @@ static int smu7_init_power_gate_state(struct pp_hwmgr *hwmgr) data->uvd_power_gated = false; data->vce_power_gated = false; - data->samu_power_gated = false;return 0 ; }
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.h +0 -1
@@ -310,7 +310,6 @@ struct smu7_hwmgr {/* ---- Power Gating States ---- */ bool uvd_power_gated;bool vce_power_gated; -bool samu_power_gated;bool need_long_memory_training;/* Application power optimization parameters */
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h +0 -1
@@ -370,7 +370,6 @@ struct vega10_hwmgr {/* ---- Power Gating States ---- */ bool uvd_power_gated;bool vce_power_gated; -bool samu_power_gated;bool need_long_memory_training;/* Internal settings to apply the application power optimization parameters */
drivers/gpu/drm/amd/powerplay/inc/smumgr.h +0 -2
@@ -29,7 +29,6 @@enum SMU_TABLE {SMU_UVD_TABLE =0 ,SMU_VCE_TABLE , -SMU_SAMU_TABLE ,SMU_BIF_TABLE , };
@@ -47,7 +46,6 @@ enum SMU_MEMBER { UcodeLoadStatus, UvdBootLevel, VceBootLevel, - SamuBootLevel, LowSclkInterruptThreshold,DRAM_LOG_ADDR_H , DRAM_LOG_ADDR_L,
drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c +0 -35
@@ -1614,37 +1614,6 @@ static int ci_populate_smc_acp_level(struct pp_hwmgr *hwmgr,return result; } -static int ci_populate_smc_samu_level (struct pp_hwmgr *hwmgr, -SMU7_Discrete_DpmTable *table) -{ -int result = -EINVAL ; -uint8_t count; -struct pp_atomctrl_clock_dividers_vi dividers; -struct phm_samu_clock_voltage_dependency_table *samu_table = - hwmgr->dyn_state.samu_clock_voltage_dependency_table; - - table->SamuBootLevel =0 ; - table->SamuLevelCount = (uint8_t )(samu_table->count); - -for (count =0 ; count < table->SamuLevelCount; count++) { - table->SamuLevel[count].Frequency = samu_table->entries[count].samclk; - table->SamuLevel[count].MinVoltage = samu_table->entries[count].v *VOLTAGE_SCALE ; - table->SamuLevel[count].MinPhases =1 ; - -/* retrieve divider value for VBIOS */ - result =atomctrl_get_dfs_pll_dividers_vi (hwmgr, - table->SamuLevel[count].Frequency, ÷rs); -PP_ASSERT_WITH_CODE ((0 == result), - "can not find divide id for samu clock", return result); - - table->SamuLevel[count].Divider = (uint8_t )dividers.pll_post_divider; - -CONVERT_FROM_HOST_TO_SMC_UL (table->SamuLevel[count].Frequency); -CONVERT_FROM_HOST_TO_SMC_US (table->SamuLevel[count].MinVoltage); - } -return result; -} - static int ci_populate_memory_timing_parameters( struct pp_hwmgr *hwmgr, uint32_t engine_clock,
@@ -2026,10 +1995,6 @@ static int ci_init_smc_table(struct pp_hwmgr *hwmgr)PP_ASSERT_WITH_CODE (0 == result, "Failed to initialize ACP Level!", return result); - result =ci_populate_smc_samu_level (hwmgr, table); -PP_ASSERT_WITH_CODE (0 == result, - "Failed to initialize SAMU Level!", return result); -/* Since only the initial state is completely set up at this point (the other states are just copies of the boot state) we only */ /* need to populate the ARB settings for the initial state. */ result =ci_program_memory_timing_parameters (hwmgr);
drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c +0 -74
104 lines not on this page · raw message
drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c +0 -10
@@ -1578,12 +1578,6 @@ static int iceland_populate_smc_acp_level(struct pp_hwmgr *hwmgr,return 0 ; } -static int iceland_populate_smc_samu_level (struct pp_hwmgr *hwmgr, -SMU71_Discrete_DpmTable *table) -{ -return 0 ; -} - static int iceland_populate_memory_timing_parameters( struct pp_hwmgr *hwmgr, uint32_t engine_clock,
@@ -1992,10 +1986,6 @@ static int iceland_init_smc_table(struct pp_hwmgr *hwmgr)PP_ASSERT_WITH_CODE (0 == result, "Failed to initialize ACP Level!", return result;); - result =iceland_populate_smc_samu_level (hwmgr, table); -PP_ASSERT_WITH_CODE (0 == result, - "Failed to initialize SAMU Level!", return result;); -/* Since only the initial state is completely set up at this point (the other states are just copies of the boot state) we only */ /* need to populate the ARB settings for the initial state. */ result =iceland_program_memory_timing_parameters (hwmgr);
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +0 -86
116 lines not on this page · raw message
drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c +0 -80
110 lines not on this page · raw message
drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c +0 -85
115 lines not on this page · raw message
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): 1528875245-5747-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: Wednesday, June 13, 2018 3:34:05 AM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH] drm/amd/pp: Remove SAMU support in powerplay
As the SAMU ip was not supported in linux,
so delete the SAMU support in powerplay on
asics Bonarire/Hawwii/Tonga/Fiji/Polaris/vegam.
--- .../amd/powerplay/hwmgr/smu7_clockpowergating.c | 54 -------------- .../amd/powerplay/hwmgr/smu7_clockpowergating.h | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.h | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h | 1 - drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 2 - drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 35 --------- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 74 ------------------- .../gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 10 --- .../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 86 ---------------------- .../gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 80 -------------------- .../gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 85 --------------------- 12 files changed, 430 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_clockpowergating.c +0 -54
@@ -39,13 +39,6 @@ static int smu7_enable_disable_vce_dpm(struct pp_hwmgr *hwmgr, bool enable) PPSMC_MSG_VCEDPM_Disable); } -static int smu7_enable_disable_samu_dpm (struct pp_hwmgr *hwmgr,bool enable) -{ -return smum_send_msg_to_smc (hwmgr, enable ? - PPSMC_MSG_SAMUDPM_Enable : - PPSMC_MSG_SAMUDPM_Disable); -} -static int smu7_update_uvd_dpm (struct pp_hwmgr *hwmgr,bool bgate) {if (!bgate)
@@ -60,13 +53,6 @@ static int smu7_update_vce_dpm(struct pp_hwmgr *hwmgr, bool bgate)return smu7_enable_disable_vce_dpm (hwmgr, !bgate); } -static int smu7_update_samu_dpm (struct pp_hwmgr *hwmgr,bool bgate) -{ -if (!bgate) -smum_update_smc_table (hwmgr,SMU_SAMU_TABLE ); -return smu7_enable_disable_samu_dpm (hwmgr, !bgate); -} -int smu7_powerdown_uvd (struct pp_hwmgr *hwmgr) {if (phm_cf_want_uvd_power_gating (hwmgr))
@@ -107,35 +93,15 @@ static int smu7_powerup_vce(struct pp_hwmgr *hwmgr)return 0 ; } -static int smu7_powerdown_samu (struct pp_hwmgr *hwmgr) -{ -if (phm_cap_enabled (hwmgr->platform_descriptor.platformCaps, - PHM_PlatformCaps_SamuPowerGating)) -return smum_send_msg_to_smc (hwmgr, - PPSMC_MSG_SAMPowerOFF); -return 0 ; -} - -static int smu7_powerup_samu (struct pp_hwmgr *hwmgr) -{ -if (phm_cap_enabled (hwmgr->platform_descriptor.platformCaps, - PHM_PlatformCaps_SamuPowerGating)) -return smum_send_msg_to_smc (hwmgr, - PPSMC_MSG_SAMPowerON); -return 0 ; -} -int smu7_disable_clock_power_gating (struct pp_hwmgr *hwmgr) {struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); data->uvd_power_gated = false; data->vce_power_gated = false; - data->samu_power_gated = false;smu7_powerup_uvd (hwmgr);smu7_powerup_vce (hwmgr); -smu7_powerup_samu (hwmgr);return 0 ; }
@@ -195,26 +161,6 @@ void smu7_powergate_vce(struct pp_hwmgr *hwmgr, bool bgate) } } -int smu7_powergate_samu (struct pp_hwmgr *hwmgr,bool bgate) -{ -struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); - -if (data->samu_power_gated == bgate) -return 0 ; - - data->samu_power_gated = bgate; - -if (bgate) { -smu7_update_samu_dpm (hwmgr, true); -smu7_powerdown_samu (hwmgr); - }else { -smu7_powerup_samu (hwmgr); -smu7_update_samu_dpm (hwmgr, false); - } - -return 0 ; -} -int smu7_update_clock_gatings (struct pp_hwmgr *hwmgr,const uint32_t *msg_id) {
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_clockpowergating.h +0 -1
@@ -29,7 +29,6 @@void smu7_powergate_vce (struct pp_hwmgr *hwmgr,bool bgate);void smu7_powergate_uvd (struct pp_hwmgr *hwmgr,bool bgate);int smu7_powerdown_uvd (struct pp_hwmgr *hwmgr); -int smu7_powergate_samu (struct pp_hwmgr *hwmgr,bool bgate);int smu7_powergate_acp (struct pp_hwmgr *hwmgr,bool bgate);int smu7_disable_clock_power_gating (struct pp_hwmgr *hwmgr); int smu7_update_clock_gatings(struct pp_hwmgr *hwmgr,
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
@@ -4244,7 +4244,6 @@ static int smu7_init_power_gate_state(struct pp_hwmgr *hwmgr) data->uvd_power_gated = false; data->vce_power_gated = false; - data->samu_power_gated = false;return 0 ; }
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.h +0 -1
@@ -310,7 +310,6 @@ struct smu7_hwmgr {/* ---- Power Gating States ---- */ bool uvd_power_gated;bool vce_power_gated; -bool samu_power_gated;bool need_long_memory_training;/* Application power optimization parameters */
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h +0 -1
@@ -370,7 +370,6 @@ struct vega10_hwmgr {/* ---- Power Gating States ---- */ bool uvd_power_gated;bool vce_power_gated; -bool samu_power_gated;bool need_long_memory_training;/* Internal settings to apply the application power optimization parameters */
drivers/gpu/drm/amd/powerplay/inc/smumgr.h +0 -2
@@ -29,7 +29,6 @@enum SMU_TABLE {SMU_UVD_TABLE =0 ,SMU_VCE_TABLE , -SMU_SAMU_TABLE ,SMU_BIF_TABLE , };
@@ -47,7 +46,6 @@ enum SMU_MEMBER { UcodeLoadStatus, UvdBootLevel, VceBootLevel, - SamuBootLevel, LowSclkInterruptThreshold,DRAM_LOG_ADDR_H , DRAM_LOG_ADDR_L,
drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c +0 -35
@@ -1614,37 +1614,6 @@ static int ci_populate_smc_acp_level(struct pp_hwmgr *hwmgr,return result; } -static int ci_populate_smc_samu_level (struct pp_hwmgr *hwmgr, -SMU7_Discrete_DpmTable *table) -{ -int result = -EINVAL ; -uint8_t count; -struct pp_atomctrl_clock_dividers_vi dividers; -struct phm_samu_clock_voltage_dependency_table *samu_table = - hwmgr->dyn_state.samu_clock_voltage_dependency_table; - - table->SamuBootLevel =0 ; - table->SamuLevelCount = (uint8_t )(samu_table->count); - -for (count =0 ; count < table->SamuLevelCount; count++) { - table->SamuLevel[count].Frequency = samu_table->entries[count].samclk; - table->SamuLevel[count].MinVoltage = samu_table->entries[count].v *VOLTAGE_SCALE ; - table->SamuLevel[count].MinPhases =1 ; - -/* retrieve divider value for VBIOS */ - result =atomctrl_get_dfs_pll_dividers_vi (hwmgr, - table->SamuLevel[count].Frequency, ÷rs); -PP_ASSERT_WITH_CODE ((0 == result), - "can not find divide id for samu clock", return result); - - table->SamuLevel[count].Divider = (uint8_t )dividers.pll_post_divider; - -CONVERT_FROM_HOST_TO_SMC_UL (table->SamuLevel[count].Frequency); -CONVERT_FROM_HOST_TO_SMC_US (table->SamuLevel[count].MinVoltage); - } -return result; -} - static int ci_populate_memory_timing_parameters( struct pp_hwmgr *hwmgr, uint32_t engine_clock,
@@ -2026,10 +1995,6 @@ static int ci_init_smc_table(struct pp_hwmgr *hwmgr)PP_ASSERT_WITH_CODE (0 == result, "Failed to initialize ACP Level!", return result); - result =ci_populate_smc_samu_level (hwmgr, table); -PP_ASSERT_WITH_CODE (0 == result, - "Failed to initialize SAMU Level!", return result); -/* Since only the initial state is completely set up at this point (the other states are just copies of the boot state) we only */ /* need to populate the ARB settings for the initial state. */ result =ci_program_memory_timing_parameters (hwmgr);
drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c +0 -74
104 lines not on this page · raw message
drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c +0 -10
@@ -1578,12 +1578,6 @@ static int iceland_populate_smc_acp_level(struct pp_hwmgr *hwmgr,return 0 ; } -static int iceland_populate_smc_samu_level (struct pp_hwmgr *hwmgr, -SMU71_Discrete_DpmTable *table) -{ -return 0 ; -} - static int iceland_populate_memory_timing_parameters( struct pp_hwmgr *hwmgr, uint32_t engine_clock,
@@ -1992,10 +1986,6 @@ static int iceland_init_smc_table(struct pp_hwmgr *hwmgr)PP_ASSERT_WITH_CODE (0 == result, "Failed to initialize ACP Level!", return result;); - result =iceland_populate_smc_samu_level (hwmgr, table); -PP_ASSERT_WITH_CODE (0 == result, - "Failed to initialize SAMU Level!", return result;); -/* Since only the initial state is completely set up at this point (the other states are just copies of the boot state) we only */ /* need to populate the ARB settings for the initial state. */ result =iceland_program_memory_timing_parameters (hwmgr);
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +0 -86
116 lines not on this page · raw message
drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c +0 -80
110 lines not on this page · raw message
drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c +0 -85
115 lines not on this page · raw message
--
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