Lines Matching refs:m2m_ctx

147  * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
150 struct vb2_queue *v4l2_m2m_get_vq(struct v4l2_m2m_ctx *m2m_ctx,
157 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
174 void v4l2_m2m_try_schedule(struct v4l2_m2m_ctx *m2m_ctx);
181 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
192 struct v4l2_m2m_ctx *m2m_ctx);
200 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
218 struct v4l2_m2m_ctx *m2m_ctx,
230 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
233 v4l2_m2m_clear_state(struct v4l2_m2m_ctx *m2m_ctx)
235 m2m_ctx->next_buf_last = false;
236 m2m_ctx->is_draining = false;
237 m2m_ctx->has_stopped = false;
243 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
246 v4l2_m2m_mark_stopped(struct v4l2_m2m_ctx *m2m_ctx)
248 m2m_ctx->next_buf_last = false;
249 m2m_ctx->is_draining = false;
250 m2m_ctx->has_stopped = true;
260 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
263 v4l2_m2m_dst_buf_is_last(struct v4l2_m2m_ctx *m2m_ctx)
265 return m2m_ctx->is_draining && m2m_ctx->next_buf_last;
272 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
275 v4l2_m2m_has_stopped(struct v4l2_m2m_ctx *m2m_ctx)
277 return m2m_ctx->has_stopped;
288 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
292 v4l2_m2m_is_last_draining_src_buf(struct v4l2_m2m_ctx *m2m_ctx,
295 return m2m_ctx->is_draining && vbuf == m2m_ctx->last_src_buf;
301 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
304 void v4l2_m2m_last_buffer_done(struct v4l2_m2m_ctx *m2m_ctx,
333 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
336 int v4l2_m2m_reqbufs(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
343 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
348 int v4l2_m2m_querybuf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
356 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
359 int v4l2_m2m_qbuf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
367 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
370 int v4l2_m2m_dqbuf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
378 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
381 int v4l2_m2m_prepare_buf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
389 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
392 int v4l2_m2m_create_bufs(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
400 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
403 int v4l2_m2m_expbuf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
410 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
413 int v4l2_m2m_streamon(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
420 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
423 int v4l2_m2m_streamoff(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
430 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
433 void v4l2_m2m_update_start_streaming_state(struct v4l2_m2m_ctx *m2m_ctx,
440 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
443 void v4l2_m2m_update_stop_streaming_state(struct v4l2_m2m_ctx *m2m_ctx,
450 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
453 int v4l2_m2m_encoder_cmd(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
460 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
463 int v4l2_m2m_decoder_cmd(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
470 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
478 __poll_t v4l2_m2m_poll(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
485 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
495 int v4l2_m2m_mmap(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
555 static inline void v4l2_m2m_set_src_buffered(struct v4l2_m2m_ctx *m2m_ctx,
558 m2m_ctx->out_q_ctx.buffered = buffered;
561 static inline void v4l2_m2m_set_dst_buffered(struct v4l2_m2m_ctx *m2m_ctx,
564 m2m_ctx->cap_q_ctx.buffered = buffered;
570 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
574 void v4l2_m2m_ctx_release(struct v4l2_m2m_ctx *m2m_ctx);
579 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
584 void v4l2_m2m_buf_queue(struct v4l2_m2m_ctx *m2m_ctx,
591 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
594 unsigned int v4l2_m2m_num_src_bufs_ready(struct v4l2_m2m_ctx *m2m_ctx)
599 spin_lock_irqsave(&m2m_ctx->out_q_ctx.rdy_spinlock, flags);
600 num_buf_rdy = m2m_ctx->out_q_ctx.num_rdy;
601 spin_unlock_irqrestore(&m2m_ctx->out_q_ctx.rdy_spinlock, flags);
610 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
613 unsigned int v4l2_m2m_num_dst_bufs_ready(struct v4l2_m2m_ctx *m2m_ctx)
618 spin_lock_irqsave(&m2m_ctx->cap_q_ctx.rdy_spinlock, flags);
619 num_buf_rdy = m2m_ctx->cap_q_ctx.num_rdy;
620 spin_unlock_irqrestore(&m2m_ctx->cap_q_ctx.rdy_spinlock, flags);
636 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
639 v4l2_m2m_next_src_buf(struct v4l2_m2m_ctx *m2m_ctx)
641 return v4l2_m2m_next_buf(&m2m_ctx->out_q_ctx);
648 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
651 v4l2_m2m_next_dst_buf(struct v4l2_m2m_ctx *m2m_ctx)
653 return v4l2_m2m_next_buf(&m2m_ctx->cap_q_ctx);
667 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
670 v4l2_m2m_last_src_buf(struct v4l2_m2m_ctx *m2m_ctx)
672 return v4l2_m2m_last_buf(&m2m_ctx->out_q_ctx);
679 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
682 v4l2_m2m_last_dst_buf(struct v4l2_m2m_ctx *m2m_ctx)
684 return v4l2_m2m_last_buf(&m2m_ctx->cap_q_ctx);
691 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
694 #define v4l2_m2m_for_each_dst_buf(m2m_ctx, b) \
695 list_for_each_entry(b, &m2m_ctx->cap_q_ctx.rdy_queue, list)
700 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
703 #define v4l2_m2m_for_each_src_buf(m2m_ctx, b) \
704 list_for_each_entry(b, &m2m_ctx->out_q_ctx.rdy_queue, list)
710 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
714 #define v4l2_m2m_for_each_dst_buf_safe(m2m_ctx, b, n) \
715 list_for_each_entry_safe(b, n, &m2m_ctx->cap_q_ctx.rdy_queue, list)
721 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
725 #define v4l2_m2m_for_each_src_buf_safe(m2m_ctx, b, n) \
726 list_for_each_entry_safe(b, n, &m2m_ctx->out_q_ctx.rdy_queue, list)
731 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
734 struct vb2_queue *v4l2_m2m_get_src_vq(struct v4l2_m2m_ctx *m2m_ctx)
736 return &m2m_ctx->out_q_ctx.q;
742 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
745 struct vb2_queue *v4l2_m2m_get_dst_vq(struct v4l2_m2m_ctx *m2m_ctx)
747 return &m2m_ctx->cap_q_ctx.q;
762 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
765 v4l2_m2m_src_buf_remove(struct v4l2_m2m_ctx *m2m_ctx)
767 return v4l2_m2m_buf_remove(&m2m_ctx->out_q_ctx);
774 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
777 v4l2_m2m_dst_buf_remove(struct v4l2_m2m_ctx *m2m_ctx)
779 return v4l2_m2m_buf_remove(&m2m_ctx->cap_q_ctx);
796 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
799 static inline void v4l2_m2m_src_buf_remove_by_buf(struct v4l2_m2m_ctx *m2m_ctx,
802 v4l2_m2m_buf_remove_by_buf(&m2m_ctx->out_q_ctx, vbuf);
809 * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
812 static inline void v4l2_m2m_dst_buf_remove_by_buf(struct v4l2_m2m_ctx *m2m_ctx,
815 v4l2_m2m_buf_remove_by_buf(&m2m_ctx->cap_q_ctx, vbuf);
822 v4l2_m2m_src_buf_remove_by_idx(struct v4l2_m2m_ctx *m2m_ctx, unsigned int idx)
824 return v4l2_m2m_buf_remove_by_idx(&m2m_ctx->out_q_ctx, idx);
828 v4l2_m2m_dst_buf_remove_by_idx(struct v4l2_m2m_ctx *m2m_ctx, unsigned int idx)
830 return v4l2_m2m_buf_remove_by_idx(&m2m_ctx->cap_q_ctx, idx);