Lines Matching full:planes
222 * Allocate memory for all planes in this buffer in __vb2_buf_mem_alloc()
227 unsigned long size = PAGE_ALIGN(vb->planes[plane].length); in __vb2_buf_mem_alloc()
230 if (size < vb->planes[plane].length) in __vb2_buf_mem_alloc()
244 vb->planes[plane].mem_priv = mem_priv; in __vb2_buf_mem_alloc()
251 call_void_memop(vb, put, vb->planes[plane - 1].mem_priv); in __vb2_buf_mem_alloc()
252 vb->planes[plane - 1].mem_priv = NULL; in __vb2_buf_mem_alloc()
266 call_void_memop(vb, put, vb->planes[plane].mem_priv); in __vb2_buf_mem_free()
267 vb->planes[plane].mem_priv = NULL; in __vb2_buf_mem_free()
282 if (vb->planes[plane].mem_priv) in __vb2_buf_userptr_put()
283 call_void_memop(vb, put_userptr, vb->planes[plane].mem_priv); in __vb2_buf_userptr_put()
284 vb->planes[plane].mem_priv = NULL; in __vb2_buf_userptr_put()
316 __vb2_plane_dmabuf_put(vb, &vb->planes[plane]); in __vb2_buf_dmabuf_put()
332 call_void_memop(vb, prepare, vb->planes[plane].mem_priv); in __vb2_buf_mem_prepare()
348 call_void_memop(vb, finish, vb->planes[plane].mem_priv); in __vb2_buf_mem_finish()
363 struct vb2_plane *p = &prev->planes[prev->num_planes - 1]; in __setup_offsets()
369 vb->planes[plane].m.offset = off; in __setup_offsets()
374 off += vb->planes[plane].length; in __setup_offsets()
402 * video buffer memory for all buffers/planes on the queue and initializes the
435 vb->planes[plane].length = plane_sizes[plane]; in __vb2_queue_alloc()
436 vb->planes[plane].min_length = plane_sizes[plane]; in __vb2_queue_alloc()
532 if (vb && vb->planes[0].mem_priv) in __vb2_queue_free()
621 void *mem_priv = vb->planes[plane].mem_priv; in vb2_buffer_in_use()
826 * Ask the driver how many buffers and planes per buffer it requires. in vb2_core_reqbufs()
967 * Ask the driver, whether the requested number of buffers, planes per in vb2_core_create_bufs()
1041 if (plane_no >= vb->num_planes || !vb->planes[plane_no].mem_priv) in vb2_plane_vaddr()
1044 return call_ptr_memop(vaddr, vb, vb->planes[plane_no].mem_priv); in vb2_plane_vaddr()
1051 if (plane_no >= vb->num_planes || !vb->planes[plane_no].mem_priv) in vb2_plane_cookie()
1054 return call_ptr_memop(cookie, vb, vb->planes[plane_no].mem_priv); in vb2_plane_cookie()
1134 vb, vb->planes); in __prepare_mmap()
1143 struct vb2_plane planes[VB2_MAX_PLANES]; in __prepare_userptr() local
1148 bool reacquired = vb->planes[0].mem_priv == NULL; in __prepare_userptr()
1150 memset(planes, 0, sizeof(planes[0]) * vb->num_planes); in __prepare_userptr()
1153 vb, planes); in __prepare_userptr()
1159 if (vb->planes[plane].m.userptr && in __prepare_userptr()
1160 vb->planes[plane].m.userptr == planes[plane].m.userptr in __prepare_userptr()
1161 && vb->planes[plane].length == planes[plane].length) in __prepare_userptr()
1168 if (planes[plane].length < vb->planes[plane].min_length) { in __prepare_userptr()
1170 planes[plane].length, in __prepare_userptr()
1171 vb->planes[plane].min_length, in __prepare_userptr()
1178 if (vb->planes[plane].mem_priv) { in __prepare_userptr()
1184 call_void_memop(vb, put_userptr, vb->planes[plane].mem_priv); in __prepare_userptr()
1187 vb->planes[plane].mem_priv = NULL; in __prepare_userptr()
1188 vb->planes[plane].bytesused = 0; in __prepare_userptr()
1189 vb->planes[plane].length = 0; in __prepare_userptr()
1190 vb->planes[plane].m.userptr = 0; in __prepare_userptr()
1191 vb->planes[plane].data_offset = 0; in __prepare_userptr()
1197 planes[plane].m.userptr, in __prepare_userptr()
1198 planes[plane].length); in __prepare_userptr()
1205 vb->planes[plane].mem_priv = mem_priv; in __prepare_userptr()
1213 vb->planes[plane].bytesused = planes[plane].bytesused; in __prepare_userptr()
1214 vb->planes[plane].length = planes[plane].length; in __prepare_userptr()
1215 vb->planes[plane].m.userptr = planes[plane].m.userptr; in __prepare_userptr()
1216 vb->planes[plane].data_offset = planes[plane].data_offset; in __prepare_userptr()
1221 * One or more planes changed, so we must call buf_init to do in __prepare_userptr()
1241 /* In case of errors, release planes that were already acquired */ in __prepare_userptr()
1243 if (vb->planes[plane].mem_priv) in __prepare_userptr()
1245 vb->planes[plane].mem_priv); in __prepare_userptr()
1246 vb->planes[plane].mem_priv = NULL; in __prepare_userptr()
1247 vb->planes[plane].m.userptr = 0; in __prepare_userptr()
1248 vb->planes[plane].length = 0; in __prepare_userptr()
1259 struct vb2_plane planes[VB2_MAX_PLANES]; in __prepare_dmabuf() local
1264 bool reacquired = vb->planes[0].mem_priv == NULL; in __prepare_dmabuf()
1266 memset(planes, 0, sizeof(planes[0]) * vb->num_planes); in __prepare_dmabuf()
1269 vb, planes); in __prepare_dmabuf()
1274 struct dma_buf *dbuf = dma_buf_get(planes[plane].m.fd); in __prepare_dmabuf()
1284 if (planes[plane].length == 0) in __prepare_dmabuf()
1285 planes[plane].length = dbuf->size; in __prepare_dmabuf()
1287 if (planes[plane].length < vb->planes[plane].min_length) { in __prepare_dmabuf()
1289 planes[plane].length, plane, in __prepare_dmabuf()
1290 vb->planes[plane].min_length); in __prepare_dmabuf()
1297 if (dbuf == vb->planes[plane].dbuf && in __prepare_dmabuf()
1298 vb->planes[plane].length == planes[plane].length) { in __prepare_dmabuf()
1312 __vb2_plane_dmabuf_put(vb, &vb->planes[plane]); in __prepare_dmabuf()
1313 vb->planes[plane].bytesused = 0; in __prepare_dmabuf()
1314 vb->planes[plane].length = 0; in __prepare_dmabuf()
1315 vb->planes[plane].m.fd = 0; in __prepare_dmabuf()
1316 vb->planes[plane].data_offset = 0; in __prepare_dmabuf()
1323 planes[plane].length); in __prepare_dmabuf()
1331 vb->planes[plane].dbuf = dbuf; in __prepare_dmabuf()
1332 vb->planes[plane].mem_priv = mem_priv; in __prepare_dmabuf()
1341 if (vb->planes[plane].dbuf_mapped) in __prepare_dmabuf()
1344 ret = call_memop(vb, map_dmabuf, vb->planes[plane].mem_priv); in __prepare_dmabuf()
1350 vb->planes[plane].dbuf_mapped = 1; in __prepare_dmabuf()
1358 vb->planes[plane].bytesused = planes[plane].bytesused; in __prepare_dmabuf()
1359 vb->planes[plane].length = planes[plane].length; in __prepare_dmabuf()
1360 vb->planes[plane].m.fd = planes[plane].m.fd; in __prepare_dmabuf()
1361 vb->planes[plane].data_offset = planes[plane].data_offset; in __prepare_dmabuf()
1385 /* In case of errors, release planes that were already acquired */ in __prepare_dmabuf()
1912 * Only remove the buffer from done_list if all planes can be in __vb2_get_done_vb()
2219 * Go over all buffers and their planes, comparing the given offset in __find_plane_by_offset()
2227 if (vb->planes[plane].m.offset == off) { in __find_plane_by_offset()
2283 vb_plane = &vb->planes[plane]; in vb2_core_expbuf()
2355 length = PAGE_ALIGN(vb->planes[plane].length); in vb2_mmap()
2370 ret = call_memop(vb, mmap, vb->planes[plane].mem_priv, vma); in vb2_mmap()
2841 b->planes[0].data_offset < buf->size) { in __vb2_perform_fileio()
2842 buf->pos = b->planes[0].data_offset; in __vb2_perform_fileio()
2894 b->planes[0].bytesused = buf->pos; in __vb2_perform_fileio()