/Linux-v4.19/drivers/gpu/drm/amd/powerplay/hwmgr/ |
D | hwmgr.c | 48 extern int smu7_init_function_pointers(struct pp_hwmgr *hwmgr); 49 extern int smu8_init_function_pointers(struct pp_hwmgr *hwmgr); 50 extern int vega10_hwmgr_init(struct pp_hwmgr *hwmgr); 51 extern int vega12_hwmgr_init(struct pp_hwmgr *hwmgr); 52 extern int smu10_init_function_pointers(struct pp_hwmgr *hwmgr); 54 static int polaris_set_asic_special_caps(struct pp_hwmgr *hwmgr); 55 static void hwmgr_init_default_caps(struct pp_hwmgr *hwmgr); 56 static int hwmgr_set_user_specify_caps(struct pp_hwmgr *hwmgr); 57 static int fiji_set_asic_special_caps(struct pp_hwmgr *hwmgr); 58 static int tonga_set_asic_special_caps(struct pp_hwmgr *hwmgr); [all …]
|
D | hardwaremanager.c | 39 int phm_setup_asic(struct pp_hwmgr *hwmgr) in phm_setup_asic() argument 41 PHM_FUNC_CHECK(hwmgr); in phm_setup_asic() 43 if (NULL != hwmgr->hwmgr_func->asic_setup) in phm_setup_asic() 44 return hwmgr->hwmgr_func->asic_setup(hwmgr); in phm_setup_asic() 49 int phm_power_down_asic(struct pp_hwmgr *hwmgr) in phm_power_down_asic() argument 51 PHM_FUNC_CHECK(hwmgr); in phm_power_down_asic() 53 if (NULL != hwmgr->hwmgr_func->power_off_asic) in phm_power_down_asic() 54 return hwmgr->hwmgr_func->power_off_asic(hwmgr); in phm_power_down_asic() 59 int phm_set_power_state(struct pp_hwmgr *hwmgr, in phm_set_power_state() argument 65 PHM_FUNC_CHECK(hwmgr); in phm_set_power_state() [all …]
|
D | pp_psm.c | 29 int psm_init_power_state_table(struct pp_hwmgr *hwmgr) in psm_init_power_state_table() argument 37 if (hwmgr->hwmgr_func->get_num_of_pp_table_entries == NULL) in psm_init_power_state_table() 40 if (hwmgr->hwmgr_func->get_power_state_size == NULL) in psm_init_power_state_table() 43 hwmgr->num_ps = table_entries = hwmgr->hwmgr_func->get_num_of_pp_table_entries(hwmgr); in psm_init_power_state_table() 45 hwmgr->ps_size = size = hwmgr->hwmgr_func->get_power_state_size(hwmgr) + in psm_init_power_state_table() 53 hwmgr->ps = kcalloc(table_entries, size, GFP_KERNEL); in psm_init_power_state_table() 54 if (hwmgr->ps == NULL) in psm_init_power_state_table() 57 hwmgr->request_ps = kzalloc(size, GFP_KERNEL); in psm_init_power_state_table() 58 if (hwmgr->request_ps == NULL) { in psm_init_power_state_table() 59 kfree(hwmgr->ps); in psm_init_power_state_table() [all …]
|
D | smu7_thermal.c | 29 int smu7_fan_ctrl_get_fan_speed_info(struct pp_hwmgr *hwmgr, in smu7_fan_ctrl_get_fan_speed_info() argument 32 if (hwmgr->thermal_controller.fanInfo.bNoFan) in smu7_fan_ctrl_get_fan_speed_info() 41 hwmgr->thermal_controller.fanInfo.ucTachometerPulsesPerRevolution) { in smu7_fan_ctrl_get_fan_speed_info() 44 fan_speed_info->min_rpm = hwmgr->thermal_controller.fanInfo.ulMinRPM; in smu7_fan_ctrl_get_fan_speed_info() 45 fan_speed_info->max_rpm = hwmgr->thermal_controller.fanInfo.ulMaxRPM; in smu7_fan_ctrl_get_fan_speed_info() 54 int smu7_fan_ctrl_get_fan_speed_percent(struct pp_hwmgr *hwmgr, in smu7_fan_ctrl_get_fan_speed_percent() argument 61 if (hwmgr->thermal_controller.fanInfo.bNoFan) in smu7_fan_ctrl_get_fan_speed_percent() 64 duty100 = PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in smu7_fan_ctrl_get_fan_speed_percent() 66 duty = PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in smu7_fan_ctrl_get_fan_speed_percent() 83 int smu7_fan_ctrl_get_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t *speed) in smu7_fan_ctrl_get_fan_speed_rpm() argument [all …]
|
D | vega10_thermal.c | 31 static int vega10_get_current_rpm(struct pp_hwmgr *hwmgr, uint32_t *current_rpm) in vega10_get_current_rpm() argument 33 smum_send_msg_to_smc(hwmgr, PPSMC_MSG_GetCurrentRpm); in vega10_get_current_rpm() 34 *current_rpm = smum_get_argument(hwmgr); in vega10_get_current_rpm() 38 int vega10_fan_ctrl_get_fan_speed_info(struct pp_hwmgr *hwmgr, in vega10_fan_ctrl_get_fan_speed_info() argument 42 if (hwmgr->thermal_controller.fanInfo.bNoFan) in vega10_fan_ctrl_get_fan_speed_info() 51 hwmgr->thermal_controller.fanInfo. in vega10_fan_ctrl_get_fan_speed_info() 56 hwmgr->thermal_controller.fanInfo.ulMinRPM; in vega10_fan_ctrl_get_fan_speed_info() 58 hwmgr->thermal_controller.fanInfo.ulMaxRPM; in vega10_fan_ctrl_get_fan_speed_info() 67 int vega10_fan_ctrl_get_fan_speed_percent(struct pp_hwmgr *hwmgr, in vega10_fan_ctrl_get_fan_speed_percent() argument 73 if (hwmgr->thermal_controller.fanInfo.bNoFan) in vega10_fan_ctrl_get_fan_speed_percent() [all …]
|
D | smu8_hwmgr.c | 68 static uint32_t smu8_get_eclk_level(struct pp_hwmgr *hwmgr, in smu8_get_eclk_level() argument 73 hwmgr->dyn_state.vce_clock_voltage_dependency_table; in smu8_get_eclk_level() 99 static uint32_t smu8_get_sclk_level(struct pp_hwmgr *hwmgr, in smu8_get_sclk_level() argument 104 hwmgr->dyn_state.vddc_dependency_on_sclk; in smu8_get_sclk_level() 129 static uint32_t smu8_get_uvd_level(struct pp_hwmgr *hwmgr, in smu8_get_uvd_level() argument 134 hwmgr->dyn_state.uvd_clock_voltage_dependency_table; in smu8_get_uvd_level() 160 static uint32_t smu8_get_max_sclk_level(struct pp_hwmgr *hwmgr) in smu8_get_max_sclk_level() argument 162 struct smu8_hwmgr *data = hwmgr->backend; in smu8_get_max_sclk_level() 165 smum_send_msg_to_smc(hwmgr, PPSMC_MSG_GetMaxSclkLevel); in smu8_get_max_sclk_level() 166 data->max_sclk_level = smum_get_argument(hwmgr) + 1; in smu8_get_max_sclk_level() [all …]
|
D | smu7_hwmgr.c | 107 static int smu7_force_clock_level(struct pp_hwmgr *hwmgr, 136 static int smu7_get_mc_microcode_version(struct pp_hwmgr *hwmgr) in smu7_get_mc_microcode_version() argument 138 cgs_write_register(hwmgr->device, mmMC_SEQ_IO_DEBUG_INDEX, 0x9F); in smu7_get_mc_microcode_version() 140 hwmgr->microcode_version_info.MC = cgs_read_register(hwmgr->device, mmMC_SEQ_IO_DEBUG_DATA); in smu7_get_mc_microcode_version() 145 static uint16_t smu7_get_current_pcie_speed(struct pp_hwmgr *hwmgr) in smu7_get_current_pcie_speed() argument 150 speedCntl = cgs_read_ind_register(hwmgr->device, CGS_IND_REG__PCIE, in smu7_get_current_pcie_speed() 156 static int smu7_get_current_pcie_lane_number(struct pp_hwmgr *hwmgr) in smu7_get_current_pcie_lane_number() argument 161 link_width = PHM_READ_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__PCIE, in smu7_get_current_pcie_lane_number() 176 static int smu7_enable_smc_voltage_controller(struct pp_hwmgr *hwmgr) in smu7_enable_smc_voltage_controller() argument 178 if (hwmgr->chip_id == CHIP_VEGAM) { in smu7_enable_smc_voltage_controller() [all …]
|
D | smu10_hwmgr.c | 55 static int smu10_display_clock_voltage_request(struct pp_hwmgr *hwmgr, in smu10_display_clock_voltage_request() argument 58 struct smu10_hwmgr *smu10_data = (struct smu10_hwmgr *)(hwmgr->backend); in smu10_display_clock_voltage_request() 83 smum_send_msg_to_smc_with_parameter(hwmgr, msg, clk_freq); in smu10_display_clock_voltage_request() 105 static int smu10_initialize_dpm_defaults(struct pp_hwmgr *hwmgr) in smu10_initialize_dpm_defaults() argument 107 struct smu10_hwmgr *smu10_data = (struct smu10_hwmgr *)(hwmgr->backend); in smu10_initialize_dpm_defaults() 117 if (hwmgr->feature_mask & PP_GFXOFF_MASK) in smu10_initialize_dpm_defaults() 122 phm_cap_unset(hwmgr->platform_descriptor.platformCaps, in smu10_initialize_dpm_defaults() 125 phm_cap_unset(hwmgr->platform_descriptor.platformCaps, in smu10_initialize_dpm_defaults() 128 phm_cap_set(hwmgr->platform_descriptor.platformCaps, in smu10_initialize_dpm_defaults() 133 static int smu10_construct_max_power_limits_table(struct pp_hwmgr *hwmgr, in smu10_construct_max_power_limits_table() argument [all …]
|
D | smu7_clockpowergating.c | 28 static int smu7_enable_disable_uvd_dpm(struct pp_hwmgr *hwmgr, bool enable) in smu7_enable_disable_uvd_dpm() argument 30 return smum_send_msg_to_smc(hwmgr, enable ? in smu7_enable_disable_uvd_dpm() 35 static int smu7_enable_disable_vce_dpm(struct pp_hwmgr *hwmgr, bool enable) in smu7_enable_disable_vce_dpm() argument 37 return smum_send_msg_to_smc(hwmgr, enable ? in smu7_enable_disable_vce_dpm() 42 static int smu7_update_uvd_dpm(struct pp_hwmgr *hwmgr, bool bgate) in smu7_update_uvd_dpm() argument 45 smum_update_smc_table(hwmgr, SMU_UVD_TABLE); in smu7_update_uvd_dpm() 46 return smu7_enable_disable_uvd_dpm(hwmgr, !bgate); in smu7_update_uvd_dpm() 49 static int smu7_update_vce_dpm(struct pp_hwmgr *hwmgr, bool bgate) in smu7_update_vce_dpm() argument 52 smum_update_smc_table(hwmgr, SMU_VCE_TABLE); in smu7_update_vce_dpm() 53 return smu7_enable_disable_vce_dpm(hwmgr, !bgate); in smu7_update_vce_dpm() [all …]
|
D | processpptables.c | 48 static uint16_t get_vce_table_offset(struct pp_hwmgr *hwmgr, in get_vce_table_offset() argument 72 static uint16_t get_vce_clock_info_array_offset(struct pp_hwmgr *hwmgr, in get_vce_clock_info_array_offset() argument 75 uint16_t table_offset = get_vce_table_offset(hwmgr, in get_vce_clock_info_array_offset() 84 static uint16_t get_vce_clock_info_array_size(struct pp_hwmgr *hwmgr, in get_vce_clock_info_array_size() argument 87 uint16_t table_offset = get_vce_clock_info_array_offset(hwmgr, in get_vce_clock_info_array_size() 100 static uint16_t get_vce_clock_voltage_limit_table_offset(struct pp_hwmgr *hwmgr, in get_vce_clock_voltage_limit_table_offset() argument 103 uint16_t table_offset = get_vce_clock_info_array_offset(hwmgr, in get_vce_clock_voltage_limit_table_offset() 107 return table_offset + get_vce_clock_info_array_size(hwmgr, in get_vce_clock_voltage_limit_table_offset() 113 static uint16_t get_vce_clock_voltage_limit_table_size(struct pp_hwmgr *hwmgr, in get_vce_clock_voltage_limit_table_size() argument 116 uint16_t table_offset = get_vce_clock_voltage_limit_table_offset(hwmgr, powerplay_table); in get_vce_clock_voltage_limit_table_size() [all …]
|
D | vega12_hwmgr.c | 50 static int vega12_force_clock_level(struct pp_hwmgr *hwmgr, 52 static int vega12_get_clock_ranges(struct pp_hwmgr *hwmgr, 57 static void vega12_set_default_registry_data(struct pp_hwmgr *hwmgr) in vega12_set_default_registry_data() argument 60 (struct vega12_hwmgr *)(hwmgr->backend); in vega12_set_default_registry_data() 130 static int vega12_set_features_platform_caps(struct pp_hwmgr *hwmgr) in vega12_set_features_platform_caps() argument 133 (struct vega12_hwmgr *)(hwmgr->backend); in vega12_set_features_platform_caps() 134 struct amdgpu_device *adev = hwmgr->adev; in vega12_set_features_platform_caps() 137 phm_cap_unset(hwmgr->platform_descriptor.platformCaps, in vega12_set_features_platform_caps() 140 phm_cap_set(hwmgr->platform_descriptor.platformCaps, in vega12_set_features_platform_caps() 143 phm_cap_set(hwmgr->platform_descriptor.platformCaps, in vega12_set_features_platform_caps() [all …]
|
D | vega12_thermal.c | 32 static int vega12_get_current_rpm(struct pp_hwmgr *hwmgr, uint32_t *current_rpm) in vega12_get_current_rpm() argument 34 PP_ASSERT_WITH_CODE(!smum_send_msg_to_smc(hwmgr, in vega12_get_current_rpm() 38 *current_rpm = smum_get_argument(hwmgr); in vega12_get_current_rpm() 43 int vega12_fan_ctrl_get_fan_speed_info(struct pp_hwmgr *hwmgr, in vega12_fan_ctrl_get_fan_speed_info() argument 55 int vega12_fan_ctrl_get_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t *speed) in vega12_fan_ctrl_get_fan_speed_rpm() argument 59 return vega12_get_current_rpm(hwmgr, speed); in vega12_fan_ctrl_get_fan_speed_rpm() 69 static int vega12_enable_fan_control_feature(struct pp_hwmgr *hwmgr) in vega12_enable_fan_control_feature() argument 72 struct vega12_hwmgr *data = (struct vega12_hwmgr *)(hwmgr->backend); in vega12_enable_fan_control_feature() 76 hwmgr, true, in vega12_enable_fan_control_feature() 87 static int vega12_disable_fan_control_feature(struct pp_hwmgr *hwmgr) in vega12_disable_fan_control_feature() argument [all …]
|
D | vega10_hwmgr.c | 95 static void vega10_set_default_registry_data(struct pp_hwmgr *hwmgr) in vega10_set_default_registry_data() argument 97 struct vega10_hwmgr *data = hwmgr->backend; in vega10_set_default_registry_data() 100 hwmgr->feature_mask & PP_SCLK_DPM_MASK ? false : true; in vega10_set_default_registry_data() 102 hwmgr->feature_mask & PP_SOCCLK_DPM_MASK ? false : true; in vega10_set_default_registry_data() 104 hwmgr->feature_mask & PP_MCLK_DPM_MASK ? false : true; in vega10_set_default_registry_data() 106 hwmgr->feature_mask & PP_PCIE_DPM_MASK ? false : true; in vega10_set_default_registry_data() 109 hwmgr->feature_mask & PP_DCEFCLK_DPM_MASK ? false : true; in vega10_set_default_registry_data() 111 if (hwmgr->feature_mask & PP_POWER_CONTAINMENT_MASK) { in vega10_set_default_registry_data() 118 hwmgr->feature_mask & PP_CLOCK_STRETCH_MASK ? true : false; in vega10_set_default_registry_data() 121 hwmgr->feature_mask & PP_ULV_MASK ? true : false; in vega10_set_default_registry_data() [all …]
|
D | process_pptables_v1_0.c | 40 static void set_hw_cap(struct pp_hwmgr *hwmgr, bool setIt, enum phm_platform_caps cap) in set_hw_cap() argument 43 phm_cap_set(hwmgr->platform_descriptor.platformCaps, cap); in set_hw_cap() 45 phm_cap_unset(hwmgr->platform_descriptor.platformCaps, cap); in set_hw_cap() 55 static int set_platform_caps(struct pp_hwmgr *hwmgr, uint32_t powerplay_caps) in set_platform_caps() argument 69 hwmgr, in set_platform_caps() 75 hwmgr, in set_platform_caps() 81 hwmgr, in set_platform_caps() 87 hwmgr, in set_platform_caps() 93 hwmgr, in set_platform_caps() 99 hwmgr, in set_platform_caps() [all …]
|
/Linux-v4.19/drivers/gpu/drm/amd/powerplay/ |
D | amd_powerplay.c | 40 struct pp_hwmgr *hwmgr; in amd_powerplay_create() local 45 hwmgr = kzalloc(sizeof(struct pp_hwmgr), GFP_KERNEL); in amd_powerplay_create() 46 if (hwmgr == NULL) in amd_powerplay_create() 49 hwmgr->adev = adev; in amd_powerplay_create() 50 hwmgr->not_vf = !amdgpu_sriov_vf(adev); in amd_powerplay_create() 51 hwmgr->pm_en = (amdgpu_dpm && hwmgr->not_vf) ? true : false; in amd_powerplay_create() 52 hwmgr->device = amdgpu_cgs_create_device(adev); in amd_powerplay_create() 53 mutex_init(&hwmgr->smu_lock); in amd_powerplay_create() 54 hwmgr->chip_family = adev->family; in amd_powerplay_create() 55 hwmgr->chip_id = adev->asic_type; in amd_powerplay_create() [all …]
|
/Linux-v4.19/drivers/gpu/drm/amd/powerplay/smumgr/ |
D | smumgr.c | 50 int smum_thermal_avfs_enable(struct pp_hwmgr *hwmgr) in smum_thermal_avfs_enable() argument 52 if (NULL != hwmgr->smumgr_funcs->thermal_avfs_enable) in smum_thermal_avfs_enable() 53 return hwmgr->smumgr_funcs->thermal_avfs_enable(hwmgr); in smum_thermal_avfs_enable() 58 int smum_thermal_setup_fan_table(struct pp_hwmgr *hwmgr) in smum_thermal_setup_fan_table() argument 60 if (NULL != hwmgr->smumgr_funcs->thermal_setup_fan_table) in smum_thermal_setup_fan_table() 61 return hwmgr->smumgr_funcs->thermal_setup_fan_table(hwmgr); in smum_thermal_setup_fan_table() 66 int smum_update_sclk_threshold(struct pp_hwmgr *hwmgr) in smum_update_sclk_threshold() argument 69 if (NULL != hwmgr->smumgr_funcs->update_sclk_threshold) in smum_update_sclk_threshold() 70 return hwmgr->smumgr_funcs->update_sclk_threshold(hwmgr); in smum_update_sclk_threshold() 75 int smum_update_smc_table(struct pp_hwmgr *hwmgr, uint32_t type) in smum_update_smc_table() argument [all …]
|
D | smu8_smumgr.c | 55 static uint32_t smu8_get_argument(struct pp_hwmgr *hwmgr) in smu8_get_argument() argument 57 if (hwmgr == NULL || hwmgr->device == NULL) in smu8_get_argument() 60 return cgs_read_register(hwmgr->device, in smu8_get_argument() 64 static int smu8_send_msg_to_smc_async(struct pp_hwmgr *hwmgr, uint16_t msg) in smu8_send_msg_to_smc_async() argument 68 if (hwmgr == NULL || hwmgr->device == NULL) in smu8_send_msg_to_smc_async() 71 result = PHM_WAIT_FIELD_UNEQUAL(hwmgr, in smu8_send_msg_to_smc_async() 78 cgs_write_register(hwmgr->device, mmSMU_MP1_SRBM2P_RESP_0, 0); in smu8_send_msg_to_smc_async() 79 cgs_write_register(hwmgr->device, mmSMU_MP1_SRBM2P_MSG_0, msg); in smu8_send_msg_to_smc_async() 85 static int smu8_send_msg_to_smc(struct pp_hwmgr *hwmgr, uint16_t msg) in smu8_send_msg_to_smc() argument 89 result = smu8_send_msg_to_smc_async(hwmgr, msg); in smu8_send_msg_to_smc() [all …]
|
D | smu7_smumgr.c | 38 static int smu7_set_smc_sram_address(struct pp_hwmgr *hwmgr, uint32_t smc_addr, uint32_t limit) in smu7_set_smc_sram_address() argument 43 cgs_write_register(hwmgr->device, mmSMC_IND_INDEX_11, smc_addr); in smu7_set_smc_sram_address() 44 …PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_11, 0); /* on ci, SMC_IND_A… in smu7_set_smc_sram_address() 49 int smu7_copy_bytes_from_smc(struct pp_hwmgr *hwmgr, uint32_t smc_start_address, uint32_t *dest, ui… in smu7_copy_bytes_from_smc() argument 63 smu7_read_smc_sram_dword(hwmgr, addr, &data, limit); in smu7_copy_bytes_from_smc() 73 smu7_read_smc_sram_dword(hwmgr, addr, &data, limit); in smu7_copy_bytes_from_smc() 85 int smu7_copy_bytes_to_smc(struct pp_hwmgr *hwmgr, uint32_t smc_start_address, in smu7_copy_bytes_to_smc() argument 103 result = smu7_set_smc_sram_address(hwmgr, addr, limit); in smu7_copy_bytes_to_smc() 108 cgs_write_register(hwmgr->device, mmSMC_IND_DATA_11, data); in smu7_copy_bytes_to_smc() 119 result = smu7_set_smc_sram_address(hwmgr, addr, limit); in smu7_copy_bytes_to_smc() [all …]
|
D | smu10_smumgr.c | 48 static uint32_t smu10_wait_for_response(struct pp_hwmgr *hwmgr) in smu10_wait_for_response() argument 50 struct amdgpu_device *adev = hwmgr->adev; in smu10_wait_for_response() 55 phm_wait_for_register_unequal(hwmgr, reg, in smu10_wait_for_response() 61 static int smu10_send_msg_to_smc_without_waiting(struct pp_hwmgr *hwmgr, in smu10_send_msg_to_smc_without_waiting() argument 64 struct amdgpu_device *adev = hwmgr->adev; in smu10_send_msg_to_smc_without_waiting() 71 static uint32_t smu10_read_arg_from_smc(struct pp_hwmgr *hwmgr) in smu10_read_arg_from_smc() argument 73 struct amdgpu_device *adev = hwmgr->adev; in smu10_read_arg_from_smc() 78 static int smu10_send_msg_to_smc(struct pp_hwmgr *hwmgr, uint16_t msg) in smu10_send_msg_to_smc() argument 80 struct amdgpu_device *adev = hwmgr->adev; in smu10_send_msg_to_smc() 82 smu10_wait_for_response(hwmgr); in smu10_send_msg_to_smc() [all …]
|
D | iceland_smumgr.c | 108 static int iceland_start_smc(struct pp_hwmgr *hwmgr) in iceland_start_smc() argument 110 PHM_WRITE_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in iceland_start_smc() 116 static void iceland_reset_smc(struct pp_hwmgr *hwmgr) in iceland_reset_smc() argument 118 PHM_WRITE_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in iceland_reset_smc() 124 static void iceland_stop_smc_clock(struct pp_hwmgr *hwmgr) in iceland_stop_smc_clock() argument 126 PHM_WRITE_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in iceland_stop_smc_clock() 131 static void iceland_start_smc_clock(struct pp_hwmgr *hwmgr) in iceland_start_smc_clock() argument 133 PHM_WRITE_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in iceland_start_smc_clock() 138 static int iceland_smu_start_smc(struct pp_hwmgr *hwmgr) in iceland_smu_start_smc() argument 141 smu7_program_jump_on_start(hwmgr); in iceland_smu_start_smc() [all …]
|
D | ci_smumgr.c | 93 static int ci_set_smc_sram_address(struct pp_hwmgr *hwmgr, in ci_set_smc_sram_address() argument 102 cgs_write_register(hwmgr->device, mmSMC_IND_INDEX_0, smc_addr); in ci_set_smc_sram_address() 103 PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 0); in ci_set_smc_sram_address() 107 static int ci_copy_bytes_to_smc(struct pp_hwmgr *hwmgr, uint32_t smc_start_address, in ci_copy_bytes_to_smc() argument 128 result = ci_set_smc_sram_address(hwmgr, addr, limit); in ci_copy_bytes_to_smc() 133 cgs_write_register(hwmgr->device, mmSMC_IND_DATA_0, data); in ci_copy_bytes_to_smc() 144 result = ci_set_smc_sram_address(hwmgr, addr, limit); in ci_copy_bytes_to_smc() 150 original_data = cgs_read_register(hwmgr->device, mmSMC_IND_DATA_0); in ci_copy_bytes_to_smc() 164 result = ci_set_smc_sram_address(hwmgr, addr, limit); in ci_copy_bytes_to_smc() 169 cgs_write_register(hwmgr->device, mmSMC_IND_DATA_0, data); in ci_copy_bytes_to_smc() [all …]
|
D | polaris10_smumgr.c | 95 static int polaris10_perform_btc(struct pp_hwmgr *hwmgr) in polaris10_perform_btc() argument 98 struct smu7_smumgr *smu_data = (struct smu7_smumgr *)(hwmgr->smu_backend); in polaris10_perform_btc() 101 …if (0 != smu7_send_msg_to_smc_with_parameter(hwmgr, PPSMC_MSG_PerformBtc, smu_data->avfs_btc_param… in polaris10_perform_btc() 109 cgs_write_register(hwmgr->device, mmCP_MEC_CNTL, 0x50000000); in polaris10_perform_btc() 111 cgs_write_register(hwmgr->device, mmGRBM_SOFT_RESET, 0xffffffff); in polaris10_perform_btc() 112 cgs_write_register(hwmgr->device, mmGRBM_SOFT_RESET, 0); in polaris10_perform_btc() 118 static int polaris10_setup_graphics_level_structure(struct pp_hwmgr *hwmgr) in polaris10_setup_graphics_level_structure() argument 129 PP_ASSERT_WITH_CODE(0 == smu7_read_smc_sram_dword(hwmgr, in polaris10_setup_graphics_level_structure() 140 PP_ASSERT_WITH_CODE(0 == smu7_copy_bytes_to_smc(hwmgr, vr_config_address, in polaris10_setup_graphics_level_structure() 147 PP_ASSERT_WITH_CODE(0 == smu7_copy_bytes_to_smc(hwmgr, graphics_level_address, in polaris10_setup_graphics_level_structure() [all …]
|
D | fiji_smumgr.c | 99 static int fiji_start_smu_in_protection_mode(struct pp_hwmgr *hwmgr) in fiji_start_smu_in_protection_mode() argument 107 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in fiji_start_smu_in_protection_mode() 110 result = smu7_upload_smu_firmware_image(hwmgr); in fiji_start_smu_in_protection_mode() 115 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, in fiji_start_smu_in_protection_mode() 118 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in fiji_start_smu_in_protection_mode() 122 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in fiji_start_smu_in_protection_mode() 130 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in fiji_start_smu_in_protection_mode() 134 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, in fiji_start_smu_in_protection_mode() 137 PHM_WAIT_VFPF_INDIRECT_FIELD(hwmgr, SMC_IND, RCU_UC_EVENTS, in fiji_start_smu_in_protection_mode() 140 cgs_write_register(hwmgr->device, mmSMC_MSG_ARG_0, 0x20000); in fiji_start_smu_in_protection_mode() [all …]
|
D | vegam_smumgr.c | 83 static int vegam_smu_init(struct pp_hwmgr *hwmgr) in vegam_smu_init() argument 91 hwmgr->smu_backend = smu_data; in vegam_smu_init() 93 if (smu7_init(hwmgr)) { in vegam_smu_init() 101 static int vegam_start_smu_in_protection_mode(struct pp_hwmgr *hwmgr) in vegam_start_smu_in_protection_mode() argument 109 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in vegam_start_smu_in_protection_mode() 112 result = smu7_upload_smu_firmware_image(hwmgr); in vegam_start_smu_in_protection_mode() 117 cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, ixSMU_STATUS, 0); in vegam_start_smu_in_protection_mode() 119 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in vegam_start_smu_in_protection_mode() 123 PHM_WRITE_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, in vegam_start_smu_in_protection_mode() 127 PHM_WAIT_VFPF_INDIRECT_FIELD(hwmgr, SMC_IND, RCU_UC_EVENTS, INTERRUPTS_ENABLED, 1); in vegam_start_smu_in_protection_mode() [all …]
|
/Linux-v4.19/drivers/gpu/drm/amd/powerplay/inc/ |
D | hwmgr.h | 189 int (*smu_init)(struct pp_hwmgr *hwmgr); 190 int (*smu_fini)(struct pp_hwmgr *hwmgr); 191 int (*start_smu)(struct pp_hwmgr *hwmgr); 192 int (*check_fw_load_finish)(struct pp_hwmgr *hwmgr, 194 int (*request_smu_load_fw)(struct pp_hwmgr *hwmgr); 195 int (*request_smu_load_specific_fw)(struct pp_hwmgr *hwmgr, 197 uint32_t (*get_argument)(struct pp_hwmgr *hwmgr); 198 int (*send_msg_to_smc)(struct pp_hwmgr *hwmgr, uint16_t msg); 199 int (*send_msg_to_smc_with_parameter)(struct pp_hwmgr *hwmgr, 201 int (*download_pptable_settings)(struct pp_hwmgr *hwmgr, [all …]
|