Lines Matching refs:fh
59 #define fh_to_ctx(__fh) container_of(__fh, struct coda_ctx, fh)
504 src_vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); in coda_try_fmt_vid_cap()
569 vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type); in coda_s_fmt()
664 ret = v4l2_m2m_reqbufs(file, ctx->fh.m2m_ctx, rb); in coda_reqbufs()
683 return v4l2_m2m_qbuf(file, ctx->fh.m2m_ctx, buf); in coda_qbuf()
691 src_vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); in coda_buf_is_end_of_stream()
707 v4l2_event_queue_fh(&ctx->fh, &eos_event); in coda_m2m_buf_done()
713 static int coda_g_selection(struct file *file, void *fh, in coda_g_selection() argument
716 struct coda_ctx *ctx = fh_to_ctx(fh); in coda_g_selection()
757 static int coda_try_decoder_cmd(struct file *file, void *fh, in coda_try_decoder_cmd() argument
772 static int coda_decoder_cmd(struct file *file, void *fh, in coda_decoder_cmd() argument
775 struct coda_ctx *ctx = fh_to_ctx(fh); in coda_decoder_cmd()
778 ret = coda_try_decoder_cmd(file, fh, dc); in coda_decoder_cmd()
789 v4l2_m2m_try_schedule(ctx->fh.m2m_ctx); in coda_decoder_cmd()
794 static int coda_g_parm(struct file *file, void *fh, struct v4l2_streamparm *a) in coda_g_parm() argument
796 struct coda_ctx *ctx = fh_to_ctx(fh); in coda_g_parm()
877 static int coda_s_parm(struct file *file, void *fh, struct v4l2_streamparm *a) in coda_s_parm() argument
879 struct coda_ctx *ctx = fh_to_ctx(fh); in coda_s_parm()
892 static int coda_subscribe_event(struct v4l2_fh *fh, in coda_subscribe_event() argument
897 return v4l2_event_subscribe(fh, sub, 0, NULL); in coda_subscribe_event()
899 return v4l2_ctrl_subscribe_event(fh, sub); in coda_subscribe_event()
986 v4l2_m2m_job_finish(ctx->dev->m2m_dev, ctx->fh.m2m_ctx); in coda_pic_run_work()
992 int src_bufs = v4l2_m2m_num_src_bufs_ready(ctx->fh.m2m_ctx); in coda_job_ready()
1005 if (!v4l2_m2m_num_dst_bufs_ready(ctx->fh.m2m_ctx)) { in coda_job_ready()
1196 v4l2_m2m_buf_queue(ctx->fh.m2m_ctx, vbuf); in coda_buf_queue()
1201 v4l2_m2m_buf_queue(ctx->fh.m2m_ctx, vbuf); in coda_buf_queue()
1300 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()
1356 while ((buf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx))) in coda_stop_streaming()
1366 while ((buf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx))) in coda_stop_streaming()
1699 v4l2_fh_init(&ctx->fh, video_devdata(file)); in coda_open()
1700 file->private_data = &ctx->fh; in coda_open()
1701 v4l2_fh_add(&ctx->fh); in coda_open()
1731 ctx->fh.m2m_ctx = v4l2_m2m_ctx_init(dev->m2m_dev, ctx, in coda_open()
1733 if (IS_ERR(ctx->fh.m2m_ctx)) { in coda_open()
1734 ret = PTR_ERR(ctx->fh.m2m_ctx); in coda_open()
1747 ctx->fh.ctrl_handler = &ctx->ctrls; in coda_open()
1764 v4l2_m2m_ctx_release(ctx->fh.m2m_ctx); in coda_open()
1772 v4l2_fh_del(&ctx->fh); in coda_open()
1773 v4l2_fh_exit(&ctx->fh); in coda_open()
1793 v4l2_m2m_ctx_release(ctx->fh.m2m_ctx); in coda_release()
1812 v4l2_fh_del(&ctx->fh); in coda_release()
1813 v4l2_fh_exit(&ctx->fh); in coda_release()