Lines Matching refs:m2m_ctx
150 struct vb2_queue *v4l2_m2m_get_vq(struct v4l2_m2m_ctx *m2m_ctx,
174 void v4l2_m2m_try_schedule(struct v4l2_m2m_ctx *m2m_ctx);
192 struct v4l2_m2m_ctx *m2m_ctx);
218 struct v4l2_m2m_ctx *m2m_ctx,
233 v4l2_m2m_clear_state(struct v4l2_m2m_ctx *m2m_ctx) in v4l2_m2m_clear_state() argument
235 m2m_ctx->next_buf_last = false; in v4l2_m2m_clear_state()
236 m2m_ctx->is_draining = false; in v4l2_m2m_clear_state()
237 m2m_ctx->has_stopped = false; in v4l2_m2m_clear_state()
246 v4l2_m2m_mark_stopped(struct v4l2_m2m_ctx *m2m_ctx) in v4l2_m2m_mark_stopped() argument
248 m2m_ctx->next_buf_last = false; in v4l2_m2m_mark_stopped()
249 m2m_ctx->is_draining = false; in v4l2_m2m_mark_stopped()
250 m2m_ctx->has_stopped = true; in v4l2_m2m_mark_stopped()
263 v4l2_m2m_dst_buf_is_last(struct v4l2_m2m_ctx *m2m_ctx) in v4l2_m2m_dst_buf_is_last() argument
265 return m2m_ctx->is_draining && m2m_ctx->next_buf_last; in v4l2_m2m_dst_buf_is_last()
275 v4l2_m2m_has_stopped(struct v4l2_m2m_ctx *m2m_ctx) in v4l2_m2m_has_stopped() argument
277 return m2m_ctx->has_stopped; in v4l2_m2m_has_stopped()
292 v4l2_m2m_is_last_draining_src_buf(struct v4l2_m2m_ctx *m2m_ctx, in v4l2_m2m_is_last_draining_src_buf() argument
295 return m2m_ctx->is_draining && vbuf == m2m_ctx->last_src_buf; in v4l2_m2m_is_last_draining_src_buf()
304 void v4l2_m2m_last_buffer_done(struct v4l2_m2m_ctx *m2m_ctx,
336 int v4l2_m2m_reqbufs(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
348 int v4l2_m2m_querybuf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
359 int v4l2_m2m_qbuf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
370 int v4l2_m2m_dqbuf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
381 int v4l2_m2m_prepare_buf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
392 int v4l2_m2m_create_bufs(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
403 int v4l2_m2m_expbuf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
413 int v4l2_m2m_streamon(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
423 int v4l2_m2m_streamoff(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
433 void v4l2_m2m_update_start_streaming_state(struct v4l2_m2m_ctx *m2m_ctx,
443 void v4l2_m2m_update_stop_streaming_state(struct v4l2_m2m_ctx *m2m_ctx,
453 int v4l2_m2m_encoder_cmd(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
463 int v4l2_m2m_decoder_cmd(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
478 __poll_t v4l2_m2m_poll(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
495 int v4l2_m2m_mmap(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
550 static inline void v4l2_m2m_set_src_buffered(struct v4l2_m2m_ctx *m2m_ctx, in v4l2_m2m_set_src_buffered() argument
553 m2m_ctx->out_q_ctx.buffered = buffered; in v4l2_m2m_set_src_buffered()
556 static inline void v4l2_m2m_set_dst_buffered(struct v4l2_m2m_ctx *m2m_ctx, in v4l2_m2m_set_dst_buffered() argument
559 m2m_ctx->cap_q_ctx.buffered = buffered; in v4l2_m2m_set_dst_buffered()
569 void v4l2_m2m_ctx_release(struct v4l2_m2m_ctx *m2m_ctx);
579 void v4l2_m2m_buf_queue(struct v4l2_m2m_ctx *m2m_ctx,
589 unsigned int v4l2_m2m_num_src_bufs_ready(struct v4l2_m2m_ctx *m2m_ctx) in v4l2_m2m_num_src_bufs_ready() argument
591 return m2m_ctx->out_q_ctx.num_rdy; in v4l2_m2m_num_src_bufs_ready()
601 unsigned int v4l2_m2m_num_dst_bufs_ready(struct v4l2_m2m_ctx *m2m_ctx) in v4l2_m2m_num_dst_bufs_ready() argument
603 return m2m_ctx->cap_q_ctx.num_rdy; in v4l2_m2m_num_dst_bufs_ready()
620 v4l2_m2m_next_src_buf(struct v4l2_m2m_ctx *m2m_ctx) in v4l2_m2m_next_src_buf() argument
622 return v4l2_m2m_next_buf(&m2m_ctx->out_q_ctx); in v4l2_m2m_next_src_buf()
632 v4l2_m2m_next_dst_buf(struct v4l2_m2m_ctx *m2m_ctx) in v4l2_m2m_next_dst_buf() argument
634 return v4l2_m2m_next_buf(&m2m_ctx->cap_q_ctx); in v4l2_m2m_next_dst_buf()
651 v4l2_m2m_last_src_buf(struct v4l2_m2m_ctx *m2m_ctx) in v4l2_m2m_last_src_buf() argument
653 return v4l2_m2m_last_buf(&m2m_ctx->out_q_ctx); in v4l2_m2m_last_src_buf()
663 v4l2_m2m_last_dst_buf(struct v4l2_m2m_ctx *m2m_ctx) in v4l2_m2m_last_dst_buf() argument
665 return v4l2_m2m_last_buf(&m2m_ctx->cap_q_ctx); in v4l2_m2m_last_dst_buf()
675 #define v4l2_m2m_for_each_dst_buf(m2m_ctx, b) \ argument
676 list_for_each_entry(b, &m2m_ctx->cap_q_ctx.rdy_queue, list)
684 #define v4l2_m2m_for_each_src_buf(m2m_ctx, b) \ argument
685 list_for_each_entry(b, &m2m_ctx->out_q_ctx.rdy_queue, list)
695 #define v4l2_m2m_for_each_dst_buf_safe(m2m_ctx, b, n) \ argument
696 list_for_each_entry_safe(b, n, &m2m_ctx->cap_q_ctx.rdy_queue, list)
706 #define v4l2_m2m_for_each_src_buf_safe(m2m_ctx, b, n) \ argument
707 list_for_each_entry_safe(b, n, &m2m_ctx->out_q_ctx.rdy_queue, list)
715 struct vb2_queue *v4l2_m2m_get_src_vq(struct v4l2_m2m_ctx *m2m_ctx) in v4l2_m2m_get_src_vq() argument
717 return &m2m_ctx->out_q_ctx.q; in v4l2_m2m_get_src_vq()
726 struct vb2_queue *v4l2_m2m_get_dst_vq(struct v4l2_m2m_ctx *m2m_ctx) in v4l2_m2m_get_dst_vq() argument
728 return &m2m_ctx->cap_q_ctx.q; in v4l2_m2m_get_dst_vq()
746 v4l2_m2m_src_buf_remove(struct v4l2_m2m_ctx *m2m_ctx) in v4l2_m2m_src_buf_remove() argument
748 return v4l2_m2m_buf_remove(&m2m_ctx->out_q_ctx); in v4l2_m2m_src_buf_remove()
758 v4l2_m2m_dst_buf_remove(struct v4l2_m2m_ctx *m2m_ctx) in v4l2_m2m_dst_buf_remove() argument
760 return v4l2_m2m_buf_remove(&m2m_ctx->cap_q_ctx); in v4l2_m2m_dst_buf_remove()
780 static inline void v4l2_m2m_src_buf_remove_by_buf(struct v4l2_m2m_ctx *m2m_ctx, in v4l2_m2m_src_buf_remove_by_buf() argument
783 v4l2_m2m_buf_remove_by_buf(&m2m_ctx->out_q_ctx, vbuf); in v4l2_m2m_src_buf_remove_by_buf()
793 static inline void v4l2_m2m_dst_buf_remove_by_buf(struct v4l2_m2m_ctx *m2m_ctx, in v4l2_m2m_dst_buf_remove_by_buf() argument
796 v4l2_m2m_buf_remove_by_buf(&m2m_ctx->cap_q_ctx, vbuf); in v4l2_m2m_dst_buf_remove_by_buf()
803 v4l2_m2m_src_buf_remove_by_idx(struct v4l2_m2m_ctx *m2m_ctx, unsigned int idx) in v4l2_m2m_src_buf_remove_by_idx() argument
805 return v4l2_m2m_buf_remove_by_idx(&m2m_ctx->out_q_ctx, idx); in v4l2_m2m_src_buf_remove_by_idx()
809 v4l2_m2m_dst_buf_remove_by_idx(struct v4l2_m2m_ctx *m2m_ctx, unsigned int idx) in v4l2_m2m_dst_buf_remove_by_idx() argument
811 return v4l2_m2m_buf_remove_by_idx(&m2m_ctx->cap_q_ctx, idx); in v4l2_m2m_dst_buf_remove_by_idx()