Lines Matching refs:fh

36 #define fh_to_ctx(__fh) container_of(__fh, struct bdisp_ctx, fh)
185 if (WARN(!ctx || !ctx->fh.m2m_ctx, "Null hardware context\n")) in bdisp_job_finish()
190 src_vb = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx); in bdisp_job_finish()
191 dst_vb = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx); in bdisp_job_finish()
204 ctx->fh.m2m_ctx); in bdisp_job_finish()
290 src_vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx); in bdisp_get_bufs()
295 dst_vb = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx); in bdisp_get_bufs()
497 if (ctx->fh.m2m_ctx) in bdisp_buf_queue()
498 v4l2_m2m_buf_queue(ctx->fh.m2m_ctx, vbuf); in bdisp_buf_queue()
511 while ((buf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx))) in bdisp_start_streaming()
514 while ((buf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx))) in bdisp_start_streaming()
599 v4l2_fh_init(&ctx->fh, bdisp->m2m.vdev); in bdisp_open()
608 ctx->fh.ctrl_handler = &ctx->ctrl_handler; in bdisp_open()
609 file->private_data = &ctx->fh; in bdisp_open()
610 v4l2_fh_add(&ctx->fh); in bdisp_open()
617 ctx->fh.m2m_ctx = v4l2_m2m_ctx_init(bdisp->m2m.m2m_dev, ctx, in bdisp_open()
619 if (IS_ERR(ctx->fh.m2m_ctx)) { in bdisp_open()
621 ret = PTR_ERR(ctx->fh.m2m_ctx); in bdisp_open()
637 v4l2_fh_del(&ctx->fh); in bdisp_open()
638 v4l2_fh_exit(&ctx->fh); in bdisp_open()
658 v4l2_m2m_ctx_release(ctx->fh.m2m_ctx); in bdisp_release()
662 v4l2_fh_del(&ctx->fh); in bdisp_release()
663 v4l2_fh_exit(&ctx->fh); in bdisp_release()
686 static int bdisp_querycap(struct file *file, void *fh, in bdisp_querycap() argument
689 struct bdisp_ctx *ctx = fh_to_ctx(fh); in bdisp_querycap()
704 static int bdisp_enum_fmt(struct file *file, void *fh, struct v4l2_fmtdesc *f) in bdisp_enum_fmt() argument
706 struct bdisp_ctx *ctx = fh_to_ctx(fh); in bdisp_enum_fmt()
724 static int bdisp_g_fmt(struct file *file, void *fh, struct v4l2_format *f) in bdisp_g_fmt() argument
726 struct bdisp_ctx *ctx = fh_to_ctx(fh); in bdisp_g_fmt()
748 static int bdisp_try_fmt(struct file *file, void *fh, struct v4l2_format *f) in bdisp_try_fmt() argument
750 struct bdisp_ctx *ctx = fh_to_ctx(fh); in bdisp_try_fmt()
798 static int bdisp_s_fmt(struct file *file, void *fh, struct v4l2_format *f) in bdisp_s_fmt() argument
800 struct bdisp_ctx *ctx = fh_to_ctx(fh); in bdisp_s_fmt()
807 ret = bdisp_try_fmt(file, fh, f); in bdisp_s_fmt()
813 vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type); in bdisp_s_fmt()
850 static int bdisp_g_selection(struct file *file, void *fh, in bdisp_g_selection() argument
854 struct bdisp_ctx *ctx = fh_to_ctx(fh); in bdisp_g_selection()
928 static int bdisp_s_selection(struct file *file, void *fh, in bdisp_s_selection() argument
932 struct bdisp_ctx *ctx = fh_to_ctx(fh); in bdisp_s_selection()
1007 static int bdisp_streamon(struct file *file, void *fh, enum v4l2_buf_type type) in bdisp_streamon() argument
1009 struct bdisp_ctx *ctx = fh_to_ctx(fh); in bdisp_streamon()
1023 return v4l2_m2m_streamon(file, ctx->fh.m2m_ctx, type); in bdisp_streamon()
1118 if (!ctx || !ctx->fh.m2m_ctx) in bdisp_irq_thread()