Lines Matching refs:vb
1792 static int check_vb_with_fmt(struct s5p_mfc_fmt *fmt, struct vb2_buffer *vb) in check_vb_with_fmt() argument
1798 if (fmt->num_planes != vb->num_planes) { in check_vb_with_fmt()
1803 dma_addr_t dma = vb2_dma_contig_plane_dma_addr(vb, i); in check_vb_with_fmt()
1809 vb->v4l2_buf.index, i, &dma); in check_vb_with_fmt()
1869 static int s5p_mfc_buf_init(struct vb2_buffer *vb) in s5p_mfc_buf_init() argument
1871 struct vb2_queue *vq = vb->vb2_queue; in s5p_mfc_buf_init()
1877 ret = check_vb_with_fmt(ctx->dst_fmt, vb); in s5p_mfc_buf_init()
1880 i = vb->v4l2_buf.index; in s5p_mfc_buf_init()
1881 ctx->dst_bufs[i].b = vb; in s5p_mfc_buf_init()
1883 vb2_dma_contig_plane_dma_addr(vb, 0); in s5p_mfc_buf_init()
1886 ret = check_vb_with_fmt(ctx->src_fmt, vb); in s5p_mfc_buf_init()
1889 i = vb->v4l2_buf.index; in s5p_mfc_buf_init()
1890 ctx->src_bufs[i].b = vb; in s5p_mfc_buf_init()
1892 vb2_dma_contig_plane_dma_addr(vb, 0); in s5p_mfc_buf_init()
1894 vb2_dma_contig_plane_dma_addr(vb, 1); in s5p_mfc_buf_init()
1903 static int s5p_mfc_buf_prepare(struct vb2_buffer *vb) in s5p_mfc_buf_prepare() argument
1905 struct vb2_queue *vq = vb->vb2_queue; in s5p_mfc_buf_prepare()
1910 ret = check_vb_with_fmt(ctx->dst_fmt, vb); in s5p_mfc_buf_prepare()
1914 vb2_plane_size(vb, 0), ctx->enc_dst_buf_size); in s5p_mfc_buf_prepare()
1915 if (vb2_plane_size(vb, 0) < ctx->enc_dst_buf_size) { in s5p_mfc_buf_prepare()
1920 ret = check_vb_with_fmt(ctx->src_fmt, vb); in s5p_mfc_buf_prepare()
1924 vb2_plane_size(vb, 0), ctx->luma_size); in s5p_mfc_buf_prepare()
1926 vb2_plane_size(vb, 1), ctx->chroma_size); in s5p_mfc_buf_prepare()
1927 if (vb2_plane_size(vb, 0) < ctx->luma_size || in s5p_mfc_buf_prepare()
1928 vb2_plane_size(vb, 1) < ctx->chroma_size) { in s5p_mfc_buf_prepare()
2000 static void s5p_mfc_buf_queue(struct vb2_buffer *vb) in s5p_mfc_buf_queue() argument
2002 struct vb2_queue *vq = vb->vb2_queue; in s5p_mfc_buf_queue()
2009 vb2_buffer_done(vb, VB2_BUF_STATE_ERROR); in s5p_mfc_buf_queue()
2014 mfc_buf = &ctx->dst_bufs[vb->v4l2_buf.index]; in s5p_mfc_buf_queue()
2022 mfc_buf = &ctx->src_bufs[vb->v4l2_buf.index]; in s5p_mfc_buf_queue()