Lines Matching refs:fh
58 #define fh_to_ctx(__fh) container_of(__fh, struct coda_ctx, fh)
560 src_vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); in coda_try_fmt_vid_cap()
625 vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type); in coda_s_fmt()
704 ret = v4l2_m2m_reqbufs(file, ctx->fh.m2m_ctx, rb); in coda_reqbufs()
723 return v4l2_m2m_qbuf(file, ctx->fh.m2m_ctx, buf); in coda_qbuf()
731 src_vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); in coda_buf_is_end_of_stream()
743 ret = v4l2_m2m_dqbuf(file, ctx->fh.m2m_ctx, buf); in coda_dqbuf()
752 v4l2_event_queue_fh(&ctx->fh, &eos_event); in coda_dqbuf()
758 static int coda_g_selection(struct file *file, void *fh, in coda_g_selection() argument
761 struct coda_ctx *ctx = fh_to_ctx(fh); in coda_g_selection()
802 static int coda_try_decoder_cmd(struct file *file, void *fh, in coda_try_decoder_cmd() argument
817 static int coda_decoder_cmd(struct file *file, void *fh, in coda_decoder_cmd() argument
820 struct coda_ctx *ctx = fh_to_ctx(fh); in coda_decoder_cmd()
823 ret = coda_try_decoder_cmd(file, fh, dc); in coda_decoder_cmd()
834 v4l2_m2m_try_schedule(ctx->fh.m2m_ctx); in coda_decoder_cmd()
839 static int coda_subscribe_event(struct v4l2_fh *fh, in coda_subscribe_event() argument
844 return v4l2_event_subscribe(fh, sub, 0, NULL); in coda_subscribe_event()
846 return v4l2_ctrl_subscribe_event(fh, sub); in coda_subscribe_event()
951 v4l2_m2m_job_finish(ctx->dev->m2m_dev, ctx->fh.m2m_ctx); in coda_pic_run_work()
963 if (!v4l2_m2m_num_src_bufs_ready(ctx->fh.m2m_ctx) && in coda_job_ready()
970 if (!v4l2_m2m_num_dst_bufs_ready(ctx->fh.m2m_ctx)) { in coda_job_ready()
982 if (ctx->hold && !v4l2_m2m_num_src_bufs_ready(ctx->fh.m2m_ctx)) { in coda_job_ready()
996 src_bufs = v4l2_m2m_num_src_bufs_ready(ctx->fh.m2m_ctx); in coda_job_ready()
1006 if (!v4l2_m2m_num_src_bufs_ready(ctx->fh.m2m_ctx) && in coda_job_ready()
1193 v4l2_m2m_buf_queue(ctx->fh.m2m_ctx, vb); in coda_buf_queue()
1198 v4l2_m2m_buf_queue(ctx->fh.m2m_ctx, vb); in coda_buf_queue()
1299 v4l2_m2m_set_src_buffered(ctx->fh.m2m_ctx, true); in coda_start_streaming()
1328 while ((buf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx))) in coda_start_streaming()
1331 while ((buf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx))) in coda_start_streaming()
1355 while ((buf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx))) in coda_stop_streaming()
1365 while ((buf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx))) in coda_stop_streaming()
1681 v4l2_fh_init(&ctx->fh, video_devdata(file)); in coda_open()
1682 file->private_data = &ctx->fh; in coda_open()
1683 v4l2_fh_add(&ctx->fh); in coda_open()
1713 ctx->fh.m2m_ctx = v4l2_m2m_ctx_init(dev->m2m_dev, ctx, in coda_open()
1715 if (IS_ERR(ctx->fh.m2m_ctx)) { in coda_open()
1716 ret = PTR_ERR(ctx->fh.m2m_ctx); in coda_open()
1729 ctx->fh.ctrl_handler = &ctx->ctrls; in coda_open()
1745 v4l2_m2m_ctx_release(ctx->fh.m2m_ctx); in coda_open()
1753 v4l2_fh_del(&ctx->fh); in coda_open()
1754 v4l2_fh_exit(&ctx->fh); in coda_open()
1774 v4l2_m2m_ctx_release(ctx->fh.m2m_ctx); in coda_release()
1793 v4l2_fh_del(&ctx->fh); in coda_release()
1794 v4l2_fh_exit(&ctx->fh); in coda_release()