Lines Matching refs:tx_buf
76 struct ivpu_ipc_tx_buf *tx_buf; in ivpu_ipc_tx_prepare() local
80 tx_buf_vpu_addr = gen_pool_alloc(ipc->mm_tx, sizeof(*tx_buf)); in ivpu_ipc_tx_prepare()
83 sizeof(*tx_buf)); in ivpu_ipc_tx_prepare()
87 tx_buf = ivpu_to_cpu_addr(ipc->mem_tx, tx_buf_vpu_addr); in ivpu_ipc_tx_prepare()
88 if (drm_WARN_ON(&vdev->drm, !tx_buf)) { in ivpu_ipc_tx_prepare()
89 gen_pool_free(ipc->mm_tx, tx_buf_vpu_addr, sizeof(*tx_buf)); in ivpu_ipc_tx_prepare()
95 if (tx_buf->ipc.status != IVPU_IPC_HDR_FREE) in ivpu_ipc_tx_prepare()
99 if (tx_buf->jsm.status != VPU_JSM_MSG_FREE) in ivpu_ipc_tx_prepare()
103 memset(tx_buf, 0, sizeof(*tx_buf)); in ivpu_ipc_tx_prepare()
104 tx_buf->ipc.data_addr = jsm_vpu_addr; in ivpu_ipc_tx_prepare()
106 tx_buf->ipc.data_size = sizeof(*req); in ivpu_ipc_tx_prepare()
107 tx_buf->ipc.channel = cons->channel; in ivpu_ipc_tx_prepare()
108 tx_buf->ipc.src_node = 0; in ivpu_ipc_tx_prepare()
109 tx_buf->ipc.dst_node = 1; in ivpu_ipc_tx_prepare()
110 tx_buf->ipc.status = IVPU_IPC_HDR_ALLOCATED; in ivpu_ipc_tx_prepare()
111 tx_buf->jsm.type = req->type; in ivpu_ipc_tx_prepare()
112 tx_buf->jsm.status = VPU_JSM_MSG_ALLOCATED; in ivpu_ipc_tx_prepare()
113 tx_buf->jsm.payload = req->payload; in ivpu_ipc_tx_prepare()
116 tx_buf->jsm.request_id = req->request_id; in ivpu_ipc_tx_prepare()
122 ivpu_jsm_msg_dump(vdev, "TX", &tx_buf->jsm, jsm_vpu_addr); in ivpu_ipc_tx_prepare()
123 ivpu_ipc_msg_dump(vdev, "TX", &tx_buf->ipc, tx_buf_vpu_addr); in ivpu_ipc_tx_prepare()