Lines Matching refs:planes

196 	 * Allocate memory for all planes in this buffer
208 vb->planes[plane].mem_priv = mem_priv;
216 call_void_memop(vb, put, vb->planes[plane - 1].mem_priv);
217 vb->planes[plane - 1].mem_priv = NULL;
231 call_void_memop(vb, put, vb->planes[plane].mem_priv);
232 vb->planes[plane].mem_priv = NULL;
247 if (vb->planes[plane].mem_priv)
248 call_void_memop(vb, put_userptr, vb->planes[plane].mem_priv);
249 vb->planes[plane].mem_priv = NULL;
279 __vb2_plane_dmabuf_put(vb, &vb->planes[plane]);
339 * video buffer memory for all buffers/planes on the queue and initializes the
359 /* Length stores number of planes for multiplanar buffers */
463 if (vb && vb->planes[0].mem_priv)
548 * __verify_planes_array() - verify that the planes array passed in struct
557 if (NULL == b->m.planes) {
559 "planes array not provided\n");
564 dprintk(1, "incorrect planes array length, "
589 ? b->m.planes[plane].length
591 bytesused = b->m.planes[plane].bytesused
592 ? b->m.planes[plane].bytesused : length;
594 if (b->m.planes[plane].bytesused > length)
597 if (b->m.planes[plane].data_offset > 0 &&
598 b->m.planes[plane].data_offset >= bytesused)
621 void *mem_priv = vb->planes[plane].mem_priv;
667 memcpy(b->m.planes, vb->v4l2_planes,
856 * 3) negotiates number of buffers and planes per buffer with the driver
921 * Ask the driver how many buffers and planes per buffer it requires.
1034 * Ask the driver, whether the requested number of buffers, planes per
1123 if (plane_no > vb->num_planes || !vb->planes[plane_no].mem_priv)
1126 return call_ptr_memop(vb, vaddr, vb->planes[plane_no].mem_priv);
1144 if (plane_no >= vb->num_planes || !vb->planes[plane_no].mem_priv)
1147 return call_ptr_memop(vb, cookie, vb->planes[plane_no].mem_priv);
1196 call_void_memop(vb, finish, vb->planes[plane].mem_priv);
1241 * v4l2_buffer has a valid number of planes.
1252 b->m.planes[plane].m.userptr;
1254 b->m.planes[plane].length;
1260 b->m.planes[plane].m.fd;
1262 b->m.planes[plane].length;
1270 * accepting variable number of planes.
1280 struct v4l2_plane *psrc = &b->m.planes[plane];
1289 * Single-planar buffers do not use planes array,
1356 struct v4l2_plane planes[VIDEO_MAX_PLANES];
1362 bool reacquired = vb->planes[0].mem_priv == NULL;
1364 memset(planes, 0, sizeof(planes[0]) * vb->num_planes);
1366 __fill_vb2_buffer(vb, b, planes);
1371 vb->v4l2_planes[plane].m.userptr == planes[plane].m.userptr
1372 && vb->v4l2_planes[plane].length == planes[plane].length)
1379 if (planes[plane].length < q->plane_sizes[plane]) {
1382 planes[plane].length,
1389 if (vb->planes[plane].mem_priv) {
1394 call_void_memop(vb, put_userptr, vb->planes[plane].mem_priv);
1397 vb->planes[plane].mem_priv = NULL;
1402 planes[plane].m.userptr,
1403 planes[plane].length, write);
1410 vb->planes[plane].mem_priv = mem_priv;
1418 vb->v4l2_planes[plane] = planes[plane];
1422 * One or more planes changed, so we must call buf_init to do
1442 /* In case of errors, release planes that were already acquired */
1444 if (vb->planes[plane].mem_priv)
1445 call_void_memop(vb, put_userptr, vb->planes[plane].mem_priv);
1446 vb->planes[plane].mem_priv = NULL;
1459 struct v4l2_plane planes[VIDEO_MAX_PLANES];
1465 bool reacquired = vb->planes[0].mem_priv == NULL;
1467 memset(planes, 0, sizeof(planes[0]) * vb->num_planes);
1469 __fill_vb2_buffer(vb, b, planes);
1472 struct dma_buf *dbuf = dma_buf_get(planes[plane].m.fd);
1482 if (planes[plane].length == 0)
1483 planes[plane].length = dbuf->size;
1485 if (planes[plane].length < q->plane_sizes[plane]) {
1493 if (dbuf == vb->planes[plane].dbuf &&
1494 vb->v4l2_planes[plane].length == planes[plane].length) {
1507 __vb2_plane_dmabuf_put(vb, &vb->planes[plane]);
1512 dbuf, planes[plane].length, write);
1520 vb->planes[plane].dbuf = dbuf;
1521 vb->planes[plane].mem_priv = mem_priv;
1529 ret = call_memop(vb, map_dmabuf, vb->planes[plane].mem_priv);
1535 vb->planes[plane].dbuf_mapped = 1;
1543 vb->v4l2_planes[plane] = planes[plane];
1566 /* In case of errors, release planes that were already acquired */
1585 call_void_memop(vb, prepare, vb->planes[plane].mem_priv);
1984 * the planes.
2033 if (!vb->planes[i].dbuf_mapped)
2035 call_void_memop(vb, unmap_dmabuf, vb->planes[i].mem_priv);
2036 vb->planes[i].dbuf_mapped = 0;
2325 * Go over all buffers and their planes, comparing the given offset
2397 vb_plane = &vb->planes[eb->plane];
2499 ret = call_memop(vb, mmap, vb->planes[plane].mem_priv, vma);
2855 b->m.planes = &fileio->p;
2967 fileio->b.m.planes = &fileio->p;
2988 fileio->b.m.planes[0].data_offset < buf->size) {
2989 buf->pos = fileio->b.m.planes[0].data_offset;
3049 fileio->b.m.planes = &fileio->p;