Lines Matching refs:jsm_msg
36 struct vpu_jsm_msg *jsm_msg, u32 vpu_addr) in ivpu_jsm_msg_dump() argument
38 u32 *payload = (u32 *)&jsm_msg->payload; in ivpu_jsm_msg_dump()
42 c, vpu_addr, ivpu_jsm_msg_type_to_str(jsm_msg->type), in ivpu_jsm_msg_dump()
43 jsm_msg->status, jsm_msg->request_id, jsm_msg->result, in ivpu_jsm_msg_dump()
49 struct vpu_jsm_msg *jsm_msg) in ivpu_ipc_rx_mark_free() argument
52 if (jsm_msg) in ivpu_ipc_rx_mark_free()
53 jsm_msg->status = VPU_JSM_MSG_FREE; in ivpu_ipc_rx_mark_free()
137 struct ivpu_ipc_hdr *ipc_hdr, struct vpu_jsm_msg *jsm_msg) in ivpu_ipc_rx_msg_add() argument
147 ivpu_ipc_rx_mark_free(vdev, ipc_hdr, jsm_msg); in ivpu_ipc_rx_msg_add()
154 rx_msg->jsm_msg = jsm_msg; in ivpu_ipc_rx_msg_add()
171 ivpu_ipc_rx_mark_free(vdev, rx_msg->ipc_hdr, rx_msg->jsm_msg); in ivpu_ipc_rx_msg_del()
249 struct vpu_jsm_msg *jsm_msg, unsigned long timeout_ms) in ivpu_ipc_receive() argument
277 if (rx_msg->jsm_msg) { in ivpu_ipc_receive()
278 u32 size = min_t(int, rx_msg->ipc_hdr->data_size, sizeof(*jsm_msg)); in ivpu_ipc_receive()
280 if (rx_msg->jsm_msg->result != VPU_JSM_STATUS_SUCCESS) { in ivpu_ipc_receive()
281 ivpu_dbg(vdev, IPC, "IPC resp result error: %d\n", rx_msg->jsm_msg->result); in ivpu_ipc_receive()
285 if (jsm_msg) in ivpu_ipc_receive()
286 memcpy(jsm_msg, rx_msg->jsm_msg, size); in ivpu_ipc_receive()
369 struct ivpu_ipc_hdr *ipc_hdr, struct vpu_jsm_msg *jsm_msg) in ivpu_ipc_match_consumer() argument
374 if (!jsm_msg || jsm_msg->request_id == cons->request_id) in ivpu_ipc_match_consumer()
385 struct vpu_jsm_msg *jsm_msg; in ivpu_ipc_irq_handler() local
408 jsm_msg = NULL; in ivpu_ipc_irq_handler()
410 jsm_msg = ivpu_to_cpu_addr(ipc->mem_rx, ipc_hdr->data_addr); in ivpu_ipc_irq_handler()
411 if (!jsm_msg) { in ivpu_ipc_irq_handler()
417 ivpu_jsm_msg_dump(vdev, "RX", jsm_msg, ipc_hdr->data_addr); in ivpu_ipc_irq_handler()
423 ivpu_ipc_rx_mark_free(vdev, ipc_hdr, jsm_msg); in ivpu_ipc_irq_handler()
430 if (ivpu_ipc_match_consumer(vdev, cons, ipc_hdr, jsm_msg)) { in ivpu_ipc_irq_handler()
431 ivpu_ipc_rx_msg_add(vdev, cons, ipc_hdr, jsm_msg); in ivpu_ipc_irq_handler()
440 ivpu_ipc_rx_mark_free(vdev, ipc_hdr, jsm_msg); in ivpu_ipc_irq_handler()
462 rx_msg->callback(vdev, rx_msg->ipc_hdr, rx_msg->jsm_msg); in ivpu_ipc_irq_thread_handler()