Lines Matching refs:pkt

25 	void (*done)(struct vpu_inst *inst, struct vpu_rpc_event *pkt);
29 static void vpu_session_handle_start_done(struct vpu_inst *inst, struct vpu_rpc_event *pkt) in vpu_session_handle_start_done() argument
34 static void vpu_session_handle_mem_request(struct vpu_inst *inst, struct vpu_rpc_event *pkt) in vpu_session_handle_mem_request() argument
38 vpu_iface_unpack_msg_data(inst->core, pkt, (void *)&req_data); in vpu_session_handle_mem_request()
58 static void vpu_session_handle_stop_done(struct vpu_inst *inst, struct vpu_rpc_event *pkt) in vpu_session_handle_stop_done() argument
65 static void vpu_session_handle_seq_hdr(struct vpu_inst *inst, struct vpu_rpc_event *pkt) in vpu_session_handle_seq_hdr() argument
73 vpu_iface_unpack_msg_data(inst->core, pkt, (void *)&info); in vpu_session_handle_seq_hdr()
77 static void vpu_session_handle_resolution_change(struct vpu_inst *inst, struct vpu_rpc_event *pkt) in vpu_session_handle_resolution_change() argument
82 static void vpu_session_handle_enc_frame_done(struct vpu_inst *inst, struct vpu_rpc_event *pkt) in vpu_session_handle_enc_frame_done() argument
86 vpu_iface_unpack_msg_data(inst->core, pkt, (void *)&info); in vpu_session_handle_enc_frame_done()
92 static void vpu_session_handle_frame_request(struct vpu_inst *inst, struct vpu_rpc_event *pkt) in vpu_session_handle_frame_request() argument
96 vpu_iface_unpack_msg_data(inst->core, pkt, &fs); in vpu_session_handle_frame_request()
100 static void vpu_session_handle_frame_release(struct vpu_inst *inst, struct vpu_rpc_event *pkt) in vpu_session_handle_frame_release() argument
106 vpu_iface_unpack_msg_data(inst->core, pkt, (void *)&info.sequence); in vpu_session_handle_frame_release()
113 vpu_iface_unpack_msg_data(inst->core, pkt, &fs); in vpu_session_handle_frame_release()
118 static void vpu_session_handle_input_done(struct vpu_inst *inst, struct vpu_rpc_event *pkt) in vpu_session_handle_input_done() argument
124 static void vpu_session_handle_pic_decoded(struct vpu_inst *inst, struct vpu_rpc_event *pkt) in vpu_session_handle_pic_decoded() argument
128 vpu_iface_unpack_msg_data(inst->core, pkt, (void *)&info); in vpu_session_handle_pic_decoded()
132 static void vpu_session_handle_pic_done(struct vpu_inst *inst, struct vpu_rpc_event *pkt) in vpu_session_handle_pic_done() argument
138 vpu_iface_unpack_msg_data(inst->core, pkt, (void *)&info); in vpu_session_handle_pic_done()
149 static void vpu_session_handle_eos(struct vpu_inst *inst, struct vpu_rpc_event *pkt) in vpu_session_handle_eos() argument
154 static void vpu_session_handle_error(struct vpu_inst *inst, struct vpu_rpc_event *pkt) in vpu_session_handle_error() argument
156 char *str = (char *)pkt->data; in vpu_session_handle_error()
166 static void vpu_session_handle_firmware_xcpt(struct vpu_inst *inst, struct vpu_rpc_event *pkt) in vpu_session_handle_firmware_xcpt() argument
168 char *str = (char *)pkt->data; in vpu_session_handle_firmware_xcpt()
177 static void vpu_session_handle_pic_skipped(struct vpu_inst *inst, struct vpu_rpc_event *pkt) in vpu_session_handle_pic_skipped() argument
184 static void vpu_session_handle_dbg_msg(struct vpu_inst *inst, struct vpu_rpc_event *pkt) in vpu_session_handle_dbg_msg() argument
186 char *str = (char *)pkt->data; in vpu_session_handle_dbg_msg()
192 static void vpu_terminate_string_msg(struct vpu_rpc_event *pkt) in vpu_terminate_string_msg() argument
194 if (pkt->hdr.num == ARRAY_SIZE(pkt->data)) in vpu_terminate_string_msg()
195 pkt->hdr.num--; in vpu_terminate_string_msg()
196 pkt->data[pkt->hdr.num] = 0; in vpu_terminate_string_msg()
251 static bool vpu_inst_receive_msg(struct vpu_inst *inst, struct vpu_rpc_event *pkt) in vpu_inst_receive_msg() argument
256 memset(pkt, 0, sizeof(*pkt)); in vpu_inst_receive_msg()
260 ret = kfifo_out(&inst->msg_fifo, pkt, bytes); in vpu_inst_receive_msg()
264 if (pkt->hdr.num > 0) { in vpu_inst_receive_msg()
265 bytes = pkt->hdr.num * sizeof(u32); in vpu_inst_receive_msg()
266 ret = kfifo_out(&inst->msg_fifo, pkt->data, bytes); in vpu_inst_receive_msg()
277 struct vpu_rpc_event pkt; in vpu_inst_run_work() local
279 while (vpu_inst_receive_msg(inst, &pkt)) in vpu_inst_run_work()
280 vpu_session_handle_msg(inst, &pkt); in vpu_inst_run_work()
283 static void vpu_inst_handle_msg(struct vpu_inst *inst, struct vpu_rpc_event *pkt) in vpu_inst_handle_msg() argument
286 u32 id = pkt->hdr.id; in vpu_inst_handle_msg()
292 bytes = sizeof(pkt->hdr) + pkt->hdr.num * sizeof(u32); in vpu_inst_handle_msg()
293 ret = kfifo_in(&inst->msg_fifo, pkt, bytes); in vpu_inst_handle_msg()
301 struct vpu_rpc_event pkt; in vpu_handle_msg() local
305 memset(&pkt, 0, sizeof(pkt)); in vpu_handle_msg()
306 while (!vpu_iface_receive_msg(core, &pkt)) { in vpu_handle_msg()
308 pkt.hdr.index, pkt.hdr.id, pkt.hdr.num); in vpu_handle_msg()
310 ret = vpu_iface_convert_msg_id(core, pkt.hdr.id); in vpu_handle_msg()
314 inst = vpu_core_find_instance(core, pkt.hdr.index); in vpu_handle_msg()
321 vpu_inst_handle_msg(inst, &pkt); in vpu_handle_msg()
324 memset(&pkt, 0, sizeof(pkt)); in vpu_handle_msg()