Lines Matching refs:m2m_ctx

150 	struct v4l2_m2m_ctx *m2m_ctx = inst->v4l2_fh.m2m_ctx;  in start_encode()  local
163 dst_buf = v4l2_m2m_next_dst_buf(m2m_ctx); in start_encode()
174 src_buf = v4l2_m2m_next_src_buf(m2m_ctx); in start_encode()
177 if (m2m_ctx->is_draining) in start_encode()
215 src_buf = v4l2_m2m_src_buf_remove(m2m_ctx); in start_encode()
222 dst_buf = v4l2_m2m_dst_buf_remove(m2m_ctx); in start_encode()
242 v4l2_m2m_src_buf_remove_by_idx(m2m_ctx, src_buf->vb2_buf.index); in start_encode()
250 struct v4l2_m2m_ctx *m2m_ctx = inst->v4l2_fh.m2m_ctx; in wave5_vpu_enc_finish_encode() local
275 struct vb2_buffer *vb = vb2_get_buffer(v4l2_m2m_get_src_vq(m2m_ctx), in wave5_vpu_enc_finish_encode()
293 dst_buf = v4l2_m2m_dst_buf_remove(m2m_ctx); in wave5_vpu_enc_finish_encode()
302 v4l2_m2m_last_buffer_done(m2m_ctx, dst_buf); in wave5_vpu_enc_finish_encode()
307 v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx); in wave5_vpu_enc_finish_encode()
311 v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx); in wave5_vpu_enc_finish_encode()
336 v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx); in wave5_vpu_enc_finish_encode()
623 struct v4l2_m2m_ctx *m2m_ctx = inst->v4l2_fh.m2m_ctx; in wave5_vpu_enc_encoder_cmd() local
635 if (m2m_ctx->is_draining) in wave5_vpu_enc_encoder_cmd()
638 if (m2m_ctx->has_stopped) in wave5_vpu_enc_encoder_cmd()
641 m2m_ctx->last_src_buf = v4l2_m2m_last_src_buf(m2m_ctx); in wave5_vpu_enc_encoder_cmd()
642 m2m_ctx->is_draining = true; in wave5_vpu_enc_encoder_cmd()
1114 struct v4l2_m2m_ctx *m2m_ctx = inst->v4l2_fh.m2m_ctx; in wave5_vpu_enc_buf_queue() local
1125 v4l2_m2m_buf_queue(m2m_ctx, vbuf); in wave5_vpu_enc_buf_queue()
1306 struct v4l2_m2m_ctx *m2m_ctx = inst->v4l2_fh.m2m_ctx; in wave5_vpu_enc_start_streaming() local
1309 v4l2_m2m_update_start_streaming_state(m2m_ctx, q); in wave5_vpu_enc_start_streaming()
1339 if (inst->state == VPU_INST_STATE_OPEN && m2m_ctx->cap_q_ctx.q.streaming) { in wave5_vpu_enc_start_streaming()
1371 struct v4l2_m2m_ctx *m2m_ctx = inst->v4l2_fh.m2m_ctx; in streamoff_output() local
1374 while ((buf = v4l2_m2m_src_buf_remove(m2m_ctx))) { in streamoff_output()
1383 struct v4l2_m2m_ctx *m2m_ctx = inst->v4l2_fh.m2m_ctx; in streamoff_capture() local
1386 while ((buf = v4l2_m2m_dst_buf_remove(m2m_ctx))) { in streamoff_capture()
1393 v4l2_m2m_clear_state(m2m_ctx); in streamoff_capture()
1473 struct v4l2_m2m_ctx *m2m_ctx = inst->v4l2_fh.m2m_ctx; in wave5_vpu_enc_device_run() local
1484 m2m_ctx, ret, fail_res); in wave5_vpu_enc_device_run()
1497 v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx); in wave5_vpu_enc_device_run()
1503 struct v4l2_m2m_ctx *m2m_ctx = inst->v4l2_fh.m2m_ctx; in wave5_vpu_enc_job_ready() local
1510 if (m2m_ctx->is_draining || v4l2_m2m_num_src_bufs_ready(m2m_ctx)) { in wave5_vpu_enc_job_ready()
1519 state_to_str(inst->state), m2m_ctx->is_draining ? "is" : "is not", in wave5_vpu_enc_job_ready()
1520 v4l2_m2m_num_src_bufs_ready(m2m_ctx)); in wave5_vpu_enc_job_ready()
1559 inst->v4l2_fh.m2m_ctx = in wave5_vpu_open_enc()
1561 if (IS_ERR(inst->v4l2_fh.m2m_ctx)) { in wave5_vpu_open_enc()
1562 ret = PTR_ERR(inst->v4l2_fh.m2m_ctx); in wave5_vpu_open_enc()
1565 v4l2_m2m_set_src_buffered(inst->v4l2_fh.m2m_ctx, true); in wave5_vpu_open_enc()