Lines Matching defs:vb
815 hantro_buf_plane_check(struct vb2_buffer *vb,
824 i, vb2_plane_size(vb, i), sz);
825 if (vb2_plane_size(vb, i) < sz) {
833 static int hantro_buf_prepare(struct vb2_buffer *vb)
835 struct vb2_queue *vq = vb->vb2_queue;
844 ret = hantro_buf_plane_check(vb, pix_fmt);
854 vb2_set_plane_payload(vb, 0, 0);
856 vb2_set_plane_payload(vb, 0, pix_fmt->plane_fmt[0].sizeimage);
862 static void hantro_buf_queue(struct vb2_buffer *vb)
864 struct hantro_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue);
865 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);
867 if (V4L2_TYPE_IS_CAPTURE(vb->vb2_queue->type) &&
868 vb2_is_streaming(vb->vb2_queue) &&
872 for (i = 0; i < vb->num_planes; i++)
873 vb2_set_plane_payload(vb, i, 0);
980 static void hantro_buf_request_complete(struct vb2_buffer *vb)
982 struct hantro_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue);
984 v4l2_ctrl_request_complete(vb->req_obj.req, &ctx->ctrl_handler);
987 static int hantro_buf_out_validate(struct vb2_buffer *vb)
989 struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);