Lines Matching refs:hwmgr
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()
86 smu10_send_msg_to_smc_without_waiting(hwmgr, msg); in smu10_send_msg_to_smc()
88 if (smu10_wait_for_response(hwmgr) == 0) in smu10_send_msg_to_smc()
95 static int smu10_send_msg_to_smc_with_parameter(struct pp_hwmgr *hwmgr, in smu10_send_msg_to_smc_with_parameter() argument
98 struct amdgpu_device *adev = hwmgr->adev; in smu10_send_msg_to_smc_with_parameter()
100 smu10_wait_for_response(hwmgr); in smu10_send_msg_to_smc_with_parameter()
106 smu10_send_msg_to_smc_without_waiting(hwmgr, msg); in smu10_send_msg_to_smc_with_parameter()
109 if (smu10_wait_for_response(hwmgr) == 0) in smu10_send_msg_to_smc_with_parameter()
115 static int smu10_copy_table_from_smc(struct pp_hwmgr *hwmgr, in smu10_copy_table_from_smc() argument
119 (struct smu10_smumgr *)(hwmgr->smu_backend); in smu10_copy_table_from_smc()
127 smu10_send_msg_to_smc_with_parameter(hwmgr, in smu10_copy_table_from_smc()
130 smu10_send_msg_to_smc_with_parameter(hwmgr, in smu10_copy_table_from_smc()
133 smu10_send_msg_to_smc_with_parameter(hwmgr, in smu10_copy_table_from_smc()
143 static int smu10_copy_table_to_smc(struct pp_hwmgr *hwmgr, in smu10_copy_table_to_smc() argument
147 (struct smu10_smumgr *)(hwmgr->smu_backend); in smu10_copy_table_to_smc()
159 smu10_send_msg_to_smc_with_parameter(hwmgr, in smu10_copy_table_to_smc()
162 smu10_send_msg_to_smc_with_parameter(hwmgr, in smu10_copy_table_to_smc()
165 smu10_send_msg_to_smc_with_parameter(hwmgr, in smu10_copy_table_to_smc()
172 static int smu10_verify_smc_interface(struct pp_hwmgr *hwmgr) in smu10_verify_smc_interface() argument
176 smu10_send_msg_to_smc(hwmgr, in smu10_verify_smc_interface()
178 smc_driver_if_version = smu10_read_arg_from_smc(hwmgr); in smu10_verify_smc_interface()
189 static void smu10_smc_enable_sdma(struct pp_hwmgr *hwmgr) in smu10_smc_enable_sdma() argument
191 smu10_send_msg_to_smc(hwmgr, in smu10_smc_enable_sdma()
195 static void smu10_smc_disable_sdma(struct pp_hwmgr *hwmgr) in smu10_smc_disable_sdma() argument
197 smu10_send_msg_to_smc(hwmgr, in smu10_smc_disable_sdma()
202 static void smu10_smc_enable_vcn(struct pp_hwmgr *hwmgr) in smu10_smc_enable_vcn() argument
204 smu10_send_msg_to_smc_with_parameter(hwmgr, in smu10_smc_enable_vcn()
208 static void smu10_smc_disable_vcn(struct pp_hwmgr *hwmgr) in smu10_smc_disable_vcn() argument
210 smu10_send_msg_to_smc_with_parameter(hwmgr, in smu10_smc_disable_vcn()
214 static int smu10_smu_fini(struct pp_hwmgr *hwmgr) in smu10_smu_fini() argument
217 (struct smu10_smumgr *)(hwmgr->smu_backend); in smu10_smu_fini()
220 smu10_smc_disable_sdma(hwmgr); in smu10_smu_fini()
221 smu10_smc_disable_vcn(hwmgr); in smu10_smu_fini()
228 kfree(hwmgr->smu_backend); in smu10_smu_fini()
229 hwmgr->smu_backend = NULL; in smu10_smu_fini()
235 static int smu10_start_smu(struct pp_hwmgr *hwmgr) in smu10_start_smu() argument
237 struct amdgpu_device *adev = hwmgr->adev; in smu10_start_smu()
239 smum_send_msg_to_smc(hwmgr, PPSMC_MSG_GetSmuVersion); in smu10_start_smu()
240 hwmgr->smu_version = smu10_read_arg_from_smc(hwmgr); in smu10_start_smu()
241 adev->pm.fw_version = hwmgr->smu_version >> 8; in smu10_start_smu()
243 if (smu10_verify_smc_interface(hwmgr)) in smu10_start_smu()
245 smu10_smc_enable_sdma(hwmgr); in smu10_start_smu()
246 smu10_smc_enable_vcn(hwmgr); in smu10_start_smu()
250 static int smu10_smu_init(struct pp_hwmgr *hwmgr) in smu10_smu_init() argument
260 hwmgr->smu_backend = priv; in smu10_smu_init()
263 r = amdgpu_bo_create_kernel((struct amdgpu_device *)hwmgr->adev, in smu10_smu_init()
279 r = amdgpu_bo_create_kernel((struct amdgpu_device *)hwmgr->adev, in smu10_smu_init()
305 static int smu10_smc_table_manager(struct pp_hwmgr *hwmgr, uint8_t *table, uint16_t table_id, bool … in smu10_smc_table_manager() argument
310 ret = smu10_copy_table_from_smc(hwmgr, table, table_id); in smu10_smc_table_manager()
312 ret = smu10_copy_table_to_smc(hwmgr, table, table_id); in smu10_smc_table_manager()