Lines Matching refs:rx_msg
140 struct ivpu_ipc_rx_msg *rx_msg; in ivpu_ipc_rx_msg_add() local
145 rx_msg = kzalloc(sizeof(*rx_msg), GFP_ATOMIC); in ivpu_ipc_rx_msg_add()
146 if (!rx_msg) { in ivpu_ipc_rx_msg_add()
153 rx_msg->ipc_hdr = ipc_hdr; in ivpu_ipc_rx_msg_add()
154 rx_msg->jsm_msg = jsm_msg; in ivpu_ipc_rx_msg_add()
155 rx_msg->callback = cons->rx_callback; in ivpu_ipc_rx_msg_add()
157 if (rx_msg->callback) { in ivpu_ipc_rx_msg_add()
158 list_add_tail(&rx_msg->link, &ipc->cb_msg_list); in ivpu_ipc_rx_msg_add()
161 list_add_tail(&rx_msg->link, &cons->rx_msg_list); in ivpu_ipc_rx_msg_add()
168 ivpu_ipc_rx_msg_del(struct ivpu_device *vdev, struct ivpu_ipc_rx_msg *rx_msg) in ivpu_ipc_rx_msg_del() argument
170 list_del(&rx_msg->link); in ivpu_ipc_rx_msg_del()
171 ivpu_ipc_rx_mark_free(vdev, rx_msg->ipc_hdr, rx_msg->jsm_msg); in ivpu_ipc_rx_msg_del()
173 kfree(rx_msg); in ivpu_ipc_rx_msg_del()
199 struct ivpu_ipc_rx_msg *rx_msg, *r; in ivpu_ipc_consumer_del() local
206 list_for_each_entry_safe(rx_msg, r, &cons->rx_msg_list, link) in ivpu_ipc_consumer_del()
207 ivpu_ipc_rx_msg_del(vdev, rx_msg); in ivpu_ipc_consumer_del()
251 struct ivpu_ipc_rx_msg *rx_msg; in ivpu_ipc_receive() local
269 rx_msg = list_first_entry_or_null(&cons->rx_msg_list, struct ivpu_ipc_rx_msg, link); in ivpu_ipc_receive()
270 if (!rx_msg) { in ivpu_ipc_receive()
276 memcpy(ipc_buf, rx_msg->ipc_hdr, sizeof(*ipc_buf)); in ivpu_ipc_receive()
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()
286 memcpy(jsm_msg, rx_msg->jsm_msg, size); in ivpu_ipc_receive()
289 ivpu_ipc_rx_msg_del(vdev, rx_msg); in ivpu_ipc_receive()
452 struct ivpu_ipc_rx_msg *rx_msg, *r; in ivpu_ipc_irq_thread_handler() local
461 list_for_each_entry_safe(rx_msg, r, &cb_msg_list, link) { in ivpu_ipc_irq_thread_handler()
462 rx_msg->callback(vdev, rx_msg->ipc_hdr, rx_msg->jsm_msg); in ivpu_ipc_irq_thread_handler()
463 ivpu_ipc_rx_msg_del(vdev, rx_msg); in ivpu_ipc_irq_thread_handler()
542 struct ivpu_ipc_rx_msg *rx_msg, *r; in ivpu_ipc_disable() local
555 list_for_each_entry_safe(rx_msg, r, &cons->rx_msg_list, link) in ivpu_ipc_disable()
556 ivpu_ipc_rx_msg_del(vdev, rx_msg); in ivpu_ipc_disable()