Lines Matching refs:vb
1798 static int check_vb_with_fmt(struct s5p_mfc_fmt *fmt, struct vb2_buffer *vb) in check_vb_with_fmt() argument
1804 if (fmt->num_planes != vb->num_planes) { in check_vb_with_fmt()
1809 dma_addr_t dma = vb2_dma_contig_plane_dma_addr(vb, i); in check_vb_with_fmt()
1815 vb->index, i, &dma); in check_vb_with_fmt()
1876 static int s5p_mfc_buf_init(struct vb2_buffer *vb) in s5p_mfc_buf_init() argument
1878 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); in s5p_mfc_buf_init()
1879 struct vb2_queue *vq = vb->vb2_queue; in s5p_mfc_buf_init()
1885 ret = check_vb_with_fmt(ctx->dst_fmt, vb); in s5p_mfc_buf_init()
1888 i = vb->index; in s5p_mfc_buf_init()
1891 vb2_dma_contig_plane_dma_addr(vb, 0); in s5p_mfc_buf_init()
1894 ret = check_vb_with_fmt(ctx->src_fmt, vb); in s5p_mfc_buf_init()
1897 i = vb->index; in s5p_mfc_buf_init()
1900 vb2_dma_contig_plane_dma_addr(vb, 0); in s5p_mfc_buf_init()
1902 vb2_dma_contig_plane_dma_addr(vb, 1); in s5p_mfc_buf_init()
1911 static int s5p_mfc_buf_prepare(struct vb2_buffer *vb) in s5p_mfc_buf_prepare() argument
1913 struct vb2_queue *vq = vb->vb2_queue; in s5p_mfc_buf_prepare()
1918 ret = check_vb_with_fmt(ctx->dst_fmt, vb); in s5p_mfc_buf_prepare()
1922 vb2_plane_size(vb, 0), ctx->enc_dst_buf_size); in s5p_mfc_buf_prepare()
1923 if (vb2_plane_size(vb, 0) < ctx->enc_dst_buf_size) { in s5p_mfc_buf_prepare()
1928 ret = check_vb_with_fmt(ctx->src_fmt, vb); in s5p_mfc_buf_prepare()
1932 vb2_plane_size(vb, 0), ctx->luma_size); in s5p_mfc_buf_prepare()
1934 vb2_plane_size(vb, 1), ctx->chroma_size); in s5p_mfc_buf_prepare()
1935 if (vb2_plane_size(vb, 0) < ctx->luma_size || in s5p_mfc_buf_prepare()
1936 vb2_plane_size(vb, 1) < ctx->chroma_size) { in s5p_mfc_buf_prepare()
2008 static void s5p_mfc_buf_queue(struct vb2_buffer *vb) in s5p_mfc_buf_queue() argument
2010 struct vb2_queue *vq = vb->vb2_queue; in s5p_mfc_buf_queue()
2017 vb2_buffer_done(vb, VB2_BUF_STATE_ERROR); in s5p_mfc_buf_queue()
2022 mfc_buf = &ctx->dst_bufs[vb->index]; in s5p_mfc_buf_queue()
2030 mfc_buf = &ctx->src_bufs[vb->index]; in s5p_mfc_buf_queue()