Lines Matching full:planes

61  * __verify_planes_array() - verify that the planes array passed in struct
70 if (b->m.planes == NULL) { in __verify_planes_array()
72 "multi-planar buffer passed but planes array not provided\n"); in __verify_planes_array()
78 "incorrect planes array length, expected %d, got %d\n", in __verify_planes_array()
108 ? b->m.planes[plane].length in __verify_length()
109 : vb->planes[plane].length; in __verify_length()
110 bytesused = b->m.planes[plane].bytesused in __verify_length()
111 ? b->m.planes[plane].bytesused : length; in __verify_length()
113 if (b->m.planes[plane].bytesused > length) in __verify_length()
116 if (b->m.planes[plane].data_offset > 0 && in __verify_length()
117 b->m.planes[plane].data_offset >= bytesused) in __verify_length()
122 ? b->length : vb->planes[0].length; in __verify_length()
180 struct vb2_plane *planes = vbuf->planes; in vb2_fill_vb2_v4l2_buffer() local
210 planes[plane].m.userptr = in vb2_fill_vb2_v4l2_buffer()
211 b->m.planes[plane].m.userptr; in vb2_fill_vb2_v4l2_buffer()
212 planes[plane].length = in vb2_fill_vb2_v4l2_buffer()
213 b->m.planes[plane].length; in vb2_fill_vb2_v4l2_buffer()
218 planes[plane].m.fd = in vb2_fill_vb2_v4l2_buffer()
219 b->m.planes[plane].m.fd; in vb2_fill_vb2_v4l2_buffer()
220 planes[plane].length = in vb2_fill_vb2_v4l2_buffer()
221 b->m.planes[plane].length; in vb2_fill_vb2_v4l2_buffer()
226 planes[plane].m.offset = in vb2_fill_vb2_v4l2_buffer()
227 vb->planes[plane].m.offset; in vb2_fill_vb2_v4l2_buffer()
228 planes[plane].length = in vb2_fill_vb2_v4l2_buffer()
229 vb->planes[plane].length; in vb2_fill_vb2_v4l2_buffer()
238 * accepting variable number of planes. in vb2_fill_vb2_v4l2_buffer()
253 struct vb2_plane *pdst = &planes[plane]; in vb2_fill_vb2_v4l2_buffer()
254 struct v4l2_plane *psrc = &b->m.planes[plane]; in vb2_fill_vb2_v4l2_buffer()
269 * Single-planar buffers do not use planes array, in vb2_fill_vb2_v4l2_buffer()
284 planes[0].m.userptr = b->m.userptr; in vb2_fill_vb2_v4l2_buffer()
285 planes[0].length = b->length; in vb2_fill_vb2_v4l2_buffer()
288 planes[0].m.fd = b->m.fd; in vb2_fill_vb2_v4l2_buffer()
289 planes[0].length = b->length; in vb2_fill_vb2_v4l2_buffer()
292 planes[0].m.offset = vb->planes[0].m.offset; in vb2_fill_vb2_v4l2_buffer()
293 planes[0].length = vb->planes[0].length; in vb2_fill_vb2_v4l2_buffer()
297 planes[0].data_offset = 0; in vb2_fill_vb2_v4l2_buffer()
303 planes[0].bytesused = b->bytesused; in vb2_fill_vb2_v4l2_buffer()
305 planes[0].bytesused = b->bytesused ? in vb2_fill_vb2_v4l2_buffer()
306 b->bytesused : planes[0].length; in vb2_fill_vb2_v4l2_buffer()
308 planes[0].bytesused = 0; in vb2_fill_vb2_v4l2_buffer()
399 memset(vbuf->planes, 0, in vb2_queue_or_prepare_buf()
400 sizeof(vbuf->planes[0]) * vb->num_planes); in vb2_queue_or_prepare_buf()
507 struct v4l2_plane *pdst = &b->m.planes[plane]; in __fill_v4l2_buffer()
508 struct vb2_plane *psrc = &vb->planes[plane]; in __fill_v4l2_buffer()
526 b->length = vb->planes[0].length; in __fill_v4l2_buffer()
527 b->bytesused = vb->planes[0].bytesused; in __fill_v4l2_buffer()
529 b->m.offset = vb->planes[0].m.offset; in __fill_v4l2_buffer()
531 b->m.userptr = vb->planes[0].m.userptr; in __fill_v4l2_buffer()
533 b->m.fd = vb->planes[0].m.fd; in __fill_v4l2_buffer()
586 * v4l2_buffer has a valid number of planes.
588 static int __fill_vb2_buffer(struct vb2_buffer *vb, struct vb2_plane *planes) in __fill_vb2_buffer() argument
598 planes[plane].m = vbuf->planes[plane].m; in __fill_vb2_buffer()
599 planes[plane].length = vbuf->planes[plane].length; in __fill_vb2_buffer()
601 planes[plane].bytesused = vbuf->planes[plane].bytesused; in __fill_vb2_buffer()
602 planes[plane].data_offset = vbuf->planes[plane].data_offset; in __fill_vb2_buffer()