Lines Matching refs:psp

48 static int psp_v12_0_init_microcode(struct psp_context *psp)  in psp_v12_0_init_microcode()  argument
50 struct amdgpu_device *adev = psp->adev; in psp_v12_0_init_microcode()
68 err = psp_init_asd_microcode(psp, chip_name); in psp_v12_0_init_microcode()
73 err = request_firmware(&adev->psp.ta_fw, fw_name, adev->dev); in psp_v12_0_init_microcode()
75 release_firmware(adev->psp.ta_fw); in psp_v12_0_init_microcode()
76 adev->psp.ta_fw = NULL; in psp_v12_0_init_microcode()
81 err = amdgpu_ucode_validate(adev->psp.ta_fw); in psp_v12_0_init_microcode()
86 adev->psp.ta_fw->data; in psp_v12_0_init_microcode()
87 adev->psp.hdcp_context.context.bin_desc.fw_version = in psp_v12_0_init_microcode()
89 adev->psp.hdcp_context.context.bin_desc.size_bytes = in psp_v12_0_init_microcode()
91 adev->psp.hdcp_context.context.bin_desc.start_addr = in psp_v12_0_init_microcode()
95 adev->psp.ta_fw_version = le32_to_cpu(ta_hdr->header.ucode_version); in psp_v12_0_init_microcode()
97 adev->psp.dtm_context.context.bin_desc.fw_version = in psp_v12_0_init_microcode()
99 adev->psp.dtm_context.context.bin_desc.size_bytes = in psp_v12_0_init_microcode()
101 adev->psp.dtm_context.context.bin_desc.start_addr = in psp_v12_0_init_microcode()
102 (uint8_t *)adev->psp.hdcp_context.context.bin_desc.start_addr + in psp_v12_0_init_microcode()
106 adev->psp.securedisplay_context.context.bin_desc.fw_version = in psp_v12_0_init_microcode()
108 adev->psp.securedisplay_context.context.bin_desc.size_bytes = in psp_v12_0_init_microcode()
110 adev->psp.securedisplay_context.context.bin_desc.start_addr = in psp_v12_0_init_microcode()
111 (uint8_t *)adev->psp.hdcp_context.context.bin_desc.start_addr + in psp_v12_0_init_microcode()
119 release_firmware(adev->psp.ta_fw); in psp_v12_0_init_microcode()
120 adev->psp.ta_fw = NULL; in psp_v12_0_init_microcode()
130 static int psp_v12_0_bootloader_load_sysdrv(struct psp_context *psp) in psp_v12_0_bootloader_load_sysdrv() argument
134 struct amdgpu_device *adev = psp->adev; in psp_v12_0_bootloader_load_sysdrv()
145 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_35), in psp_v12_0_bootloader_load_sysdrv()
151 psp_copy_fw(psp, psp->sys.start_addr, psp->sys.size_bytes); in psp_v12_0_bootloader_load_sysdrv()
155 (uint32_t)(psp->fw_pri_mc_addr >> 20)); in psp_v12_0_bootloader_load_sysdrv()
163 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_35), in psp_v12_0_bootloader_load_sysdrv()
169 static int psp_v12_0_bootloader_load_sos(struct psp_context *psp) in psp_v12_0_bootloader_load_sos() argument
173 struct amdgpu_device *adev = psp->adev; in psp_v12_0_bootloader_load_sos()
184 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_35), in psp_v12_0_bootloader_load_sos()
190 psp_copy_fw(psp, psp->sos.start_addr, psp->sos.size_bytes); in psp_v12_0_bootloader_load_sos()
194 (uint32_t)(psp->fw_pri_mc_addr >> 20)); in psp_v12_0_bootloader_load_sos()
201 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_81), in psp_v12_0_bootloader_load_sos()
208 static void psp_v12_0_reroute_ih(struct psp_context *psp) in psp_v12_0_reroute_ih() argument
210 struct amdgpu_device *adev = psp->adev; in psp_v12_0_reroute_ih()
223 psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_64), in psp_v12_0_reroute_ih()
235 psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_64), in psp_v12_0_reroute_ih()
239 static int psp_v12_0_ring_init(struct psp_context *psp, in psp_v12_0_ring_init() argument
244 struct amdgpu_device *adev = psp->adev; in psp_v12_0_ring_init()
246 psp_v12_0_reroute_ih(psp); in psp_v12_0_ring_init()
248 ring = &psp->km_ring; in psp_v12_0_ring_init()
267 static int psp_v12_0_ring_create(struct psp_context *psp, in psp_v12_0_ring_create() argument
272 struct psp_ring *ring = &psp->km_ring; in psp_v12_0_ring_create()
273 struct amdgpu_device *adev = psp->adev; in psp_v12_0_ring_create()
275 if (amdgpu_sriov_vf(psp->adev)) { in psp_v12_0_ring_create()
291 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_101), in psp_v12_0_ring_create()
313 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_64), in psp_v12_0_ring_create()
320 static int psp_v12_0_ring_stop(struct psp_context *psp, in psp_v12_0_ring_stop() argument
324 struct amdgpu_device *adev = psp->adev; in psp_v12_0_ring_stop()
339 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_101), in psp_v12_0_ring_stop()
342 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_64), in psp_v12_0_ring_stop()
348 static int psp_v12_0_ring_destroy(struct psp_context *psp, in psp_v12_0_ring_destroy() argument
352 struct psp_ring *ring = &psp->km_ring; in psp_v12_0_ring_destroy()
353 struct amdgpu_device *adev = psp->adev; in psp_v12_0_ring_destroy()
355 ret = psp_v12_0_ring_stop(psp, ring_type); in psp_v12_0_ring_destroy()
366 static int psp_v12_0_mode1_reset(struct psp_context *psp) in psp_v12_0_mode1_reset() argument
370 struct amdgpu_device *adev = psp->adev; in psp_v12_0_mode1_reset()
374 ret = psp_wait_for(psp, offset, 0x80000000, 0x8000FFFF, false); in psp_v12_0_mode1_reset()
388 ret = psp_wait_for(psp, offset, 0x80000000, 0x80000000, false); in psp_v12_0_mode1_reset()
400 static uint32_t psp_v12_0_ring_get_wptr(struct psp_context *psp) in psp_v12_0_ring_get_wptr() argument
403 struct amdgpu_device *adev = psp->adev; in psp_v12_0_ring_get_wptr()
413 static void psp_v12_0_ring_set_wptr(struct psp_context *psp, uint32_t value) in psp_v12_0_ring_set_wptr() argument
415 struct amdgpu_device *adev = psp->adev; in psp_v12_0_ring_set_wptr()
437 void psp_v12_0_set_psp_funcs(struct psp_context *psp) in psp_v12_0_set_psp_funcs() argument
439 psp->funcs = &psp_v12_0_funcs; in psp_v12_0_set_psp_funcs()