Lines Matching refs:planes
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()
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()
1006 if (plane_no >= vb->num_planes || !vb->planes[plane_no].mem_priv) in vb2_plane_vaddr()
1009 return call_ptr_memop(vaddr, vb, vb->planes[plane_no].mem_priv); in vb2_plane_vaddr()
1016 if (plane_no >= vb->num_planes || !vb->planes[plane_no].mem_priv) in vb2_plane_cookie()
1019 return call_ptr_memop(cookie, vb, vb->planes[plane_no].mem_priv); in vb2_plane_cookie()
1099 vb, vb->planes); in __prepare_mmap()
1108 struct vb2_plane planes[VB2_MAX_PLANES]; in __prepare_userptr() local
1113 bool reacquired = vb->planes[0].mem_priv == NULL; in __prepare_userptr()
1115 memset(planes, 0, sizeof(planes[0]) * vb->num_planes); in __prepare_userptr()
1118 vb, planes); in __prepare_userptr()
1124 if (vb->planes[plane].m.userptr && in __prepare_userptr()
1125 vb->planes[plane].m.userptr == planes[plane].m.userptr in __prepare_userptr()
1126 && vb->planes[plane].length == planes[plane].length) in __prepare_userptr()
1133 if (planes[plane].length < vb->planes[plane].min_length) { in __prepare_userptr()
1135 planes[plane].length, in __prepare_userptr()
1136 vb->planes[plane].min_length, in __prepare_userptr()
1143 if (vb->planes[plane].mem_priv) { in __prepare_userptr()
1149 call_void_memop(vb, put_userptr, vb->planes[plane].mem_priv); in __prepare_userptr()
1152 vb->planes[plane].mem_priv = NULL; in __prepare_userptr()
1153 vb->planes[plane].bytesused = 0; in __prepare_userptr()
1154 vb->planes[plane].length = 0; in __prepare_userptr()
1155 vb->planes[plane].m.userptr = 0; in __prepare_userptr()
1156 vb->planes[plane].data_offset = 0; in __prepare_userptr()
1162 planes[plane].m.userptr, in __prepare_userptr()
1163 planes[plane].length); in __prepare_userptr()
1170 vb->planes[plane].mem_priv = mem_priv; in __prepare_userptr()
1178 vb->planes[plane].bytesused = planes[plane].bytesused; in __prepare_userptr()
1179 vb->planes[plane].length = planes[plane].length; in __prepare_userptr()
1180 vb->planes[plane].m.userptr = planes[plane].m.userptr; in __prepare_userptr()
1181 vb->planes[plane].data_offset = planes[plane].data_offset; in __prepare_userptr()
1208 if (vb->planes[plane].mem_priv) in __prepare_userptr()
1210 vb->planes[plane].mem_priv); in __prepare_userptr()
1211 vb->planes[plane].mem_priv = NULL; in __prepare_userptr()
1212 vb->planes[plane].m.userptr = 0; in __prepare_userptr()
1213 vb->planes[plane].length = 0; in __prepare_userptr()
1224 struct vb2_plane planes[VB2_MAX_PLANES]; in __prepare_dmabuf() local
1229 bool reacquired = vb->planes[0].mem_priv == NULL; in __prepare_dmabuf()
1231 memset(planes, 0, sizeof(planes[0]) * vb->num_planes); in __prepare_dmabuf()
1234 vb, planes); in __prepare_dmabuf()
1239 struct dma_buf *dbuf = dma_buf_get(planes[plane].m.fd); in __prepare_dmabuf()
1249 if (planes[plane].length == 0) in __prepare_dmabuf()
1250 planes[plane].length = dbuf->size; in __prepare_dmabuf()
1252 if (planes[plane].length < vb->planes[plane].min_length) { in __prepare_dmabuf()
1254 planes[plane].length, plane, in __prepare_dmabuf()
1255 vb->planes[plane].min_length); in __prepare_dmabuf()
1262 if (dbuf == vb->planes[plane].dbuf && in __prepare_dmabuf()
1263 vb->planes[plane].length == planes[plane].length) { in __prepare_dmabuf()
1277 __vb2_plane_dmabuf_put(vb, &vb->planes[plane]); in __prepare_dmabuf()
1278 vb->planes[plane].bytesused = 0; in __prepare_dmabuf()
1279 vb->planes[plane].length = 0; in __prepare_dmabuf()
1280 vb->planes[plane].m.fd = 0; in __prepare_dmabuf()
1281 vb->planes[plane].data_offset = 0; in __prepare_dmabuf()
1288 planes[plane].length); in __prepare_dmabuf()
1296 vb->planes[plane].dbuf = dbuf; in __prepare_dmabuf()
1297 vb->planes[plane].mem_priv = mem_priv; in __prepare_dmabuf()
1306 if (vb->planes[plane].dbuf_mapped) in __prepare_dmabuf()
1309 ret = call_memop(vb, map_dmabuf, vb->planes[plane].mem_priv); in __prepare_dmabuf()
1315 vb->planes[plane].dbuf_mapped = 1; in __prepare_dmabuf()
1323 vb->planes[plane].bytesused = planes[plane].bytesused; in __prepare_dmabuf()
1324 vb->planes[plane].length = planes[plane].length; in __prepare_dmabuf()
1325 vb->planes[plane].m.fd = planes[plane].m.fd; in __prepare_dmabuf()
1326 vb->planes[plane].data_offset = planes[plane].data_offset; in __prepare_dmabuf()
2176 if (vb->planes[plane].m.offset == off) { in __find_plane_by_offset()
2232 vb_plane = &vb->planes[plane]; in vb2_core_expbuf()
2314 length = PAGE_ALIGN(vb->planes[plane].length); in vb2_mmap()
2329 ret = call_memop(vb, mmap, vb->planes[plane].mem_priv, vma); in vb2_mmap()
2797 b->planes[0].data_offset < buf->size) { in __vb2_perform_fileio()
2798 buf->pos = b->planes[0].data_offset; in __vb2_perform_fileio()
2850 b->planes[0].bytesused = buf->pos; in __vb2_perform_fileio()