Lines Matching refs:desc
31 static u32 vpu_rpc_check_buffer_space(struct vpu_rpc_buffer_desc *desc, bool write) in vpu_rpc_check_buffer_space() argument
37 size = desc->end - desc->start; in vpu_rpc_check_buffer_space()
39 ptr1 = desc->wptr; in vpu_rpc_check_buffer_space()
40 ptr2 = desc->rptr; in vpu_rpc_check_buffer_space()
42 ptr1 = desc->rptr; in vpu_rpc_check_buffer_space()
43 ptr2 = desc->wptr; in vpu_rpc_check_buffer_space()
58 struct vpu_rpc_buffer_desc *desc; in vpu_rpc_send_cmd_buf() local
66 desc = shared->cmd_desc; in vpu_rpc_send_cmd_buf()
67 space = vpu_rpc_check_buffer_space(desc, true); in vpu_rpc_send_cmd_buf()
70 wptr = desc->wptr; in vpu_rpc_send_cmd_buf()
71 data = (u32 *)(shared->cmd_mem_vir + desc->wptr - desc->start); in vpu_rpc_send_cmd_buf()
78 if (wptr >= desc->end) { in vpu_rpc_send_cmd_buf()
79 wptr = desc->start; in vpu_rpc_send_cmd_buf()
87 if (wptr >= desc->end) { in vpu_rpc_send_cmd_buf()
88 wptr = desc->start; in vpu_rpc_send_cmd_buf()
95 desc->wptr = wptr; in vpu_rpc_send_cmd_buf()
102 struct vpu_rpc_buffer_desc *desc; in vpu_rpc_check_msg() local
107 desc = shared->msg_desc; in vpu_rpc_check_msg()
108 space = vpu_rpc_check_buffer_space(desc, 0); in vpu_rpc_check_msg()
112 msgword = *(u32 *)(shared->msg_mem_vir + desc->rptr - desc->start); in vpu_rpc_check_msg()
123 struct vpu_rpc_buffer_desc *desc; in vpu_rpc_receive_msg_buf() local
132 desc = shared->msg_desc; in vpu_rpc_receive_msg_buf()
133 data = (u32 *)(shared->msg_mem_vir + desc->rptr - desc->start); in vpu_rpc_receive_msg_buf()
134 rptr = desc->rptr; in vpu_rpc_receive_msg_buf()
138 if (rptr >= desc->end) { in vpu_rpc_receive_msg_buf()
139 rptr = desc->start; in vpu_rpc_receive_msg_buf()
154 if (rptr >= desc->end) { in vpu_rpc_receive_msg_buf()
155 rptr = desc->start; in vpu_rpc_receive_msg_buf()
162 desc->rptr = rptr; in vpu_rpc_receive_msg_buf()