Lines Matching refs:plane

218 	int plane;  in __vb2_buf_mem_alloc()  local
225 for (plane = 0; plane < vb->num_planes; ++plane) { 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()
235 q->alloc_devs[plane] ? : q->dev, in __vb2_buf_mem_alloc()
244 vb->planes[plane].mem_priv = mem_priv; in __vb2_buf_mem_alloc()
250 for (; plane > 0; --plane) { 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()
263 unsigned int plane; in __vb2_buf_mem_free() local
265 for (plane = 0; plane < vb->num_planes; ++plane) { in __vb2_buf_mem_free()
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()
269 plane, vb->index); in __vb2_buf_mem_free()
279 unsigned int plane; in __vb2_buf_userptr_put() local
281 for (plane = 0; plane < vb->num_planes; ++plane) { in __vb2_buf_userptr_put()
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()
313 unsigned int plane; in __vb2_buf_dmabuf_put() local
315 for (plane = 0; plane < vb->num_planes; ++plane) in __vb2_buf_dmabuf_put()
316 __vb2_plane_dmabuf_put(vb, &vb->planes[plane]); in __vb2_buf_dmabuf_put()
325 unsigned int plane; in __vb2_buf_mem_prepare() local
331 for (plane = 0; plane < vb->num_planes; ++plane) in __vb2_buf_mem_prepare()
332 call_void_memop(vb, prepare, vb->planes[plane].mem_priv); in __vb2_buf_mem_prepare()
341 unsigned int plane; in __vb2_buf_mem_finish() local
347 for (plane = 0; plane < vb->num_planes; ++plane) in __vb2_buf_mem_finish()
348 call_void_memop(vb, finish, vb->planes[plane].mem_priv); in __vb2_buf_mem_finish()
358 unsigned int plane; in __setup_offsets() local
368 for (plane = 0; plane < vb->num_planes; ++plane) { in __setup_offsets()
369 vb->planes[plane].m.offset = off; in __setup_offsets()
372 vb->index, plane, off); in __setup_offsets()
374 off += vb->planes[plane].length; in __setup_offsets()
411 unsigned int buffer, plane; in __vb2_queue_alloc() local
434 for (plane = 0; plane < num_planes; ++plane) { in __vb2_queue_alloc()
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()
619 unsigned int plane; in vb2_buffer_in_use() local
620 for (plane = 0; plane < vb->num_planes; ++plane) { in vb2_buffer_in_use()
621 void *mem_priv = vb->planes[plane].mem_priv; in vb2_buffer_in_use()
1111 unsigned int plane; in __prepare_userptr() local
1122 for (plane = 0; plane < vb->num_planes; ++plane) { 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()
1130 plane); 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()
1137 plane); 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()
1161 q->alloc_devs[plane] ? : q->dev, in __prepare_userptr()
1162 planes[plane].m.userptr, in __prepare_userptr()
1163 planes[plane].length); in __prepare_userptr()
1166 plane); in __prepare_userptr()
1170 vb->planes[plane].mem_priv = mem_priv; in __prepare_userptr()
1177 for (plane = 0; plane < vb->num_planes; ++plane) { 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()
1207 for (plane = 0; plane < vb->num_planes; ++plane) { 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()
1227 unsigned int plane; in __prepare_dmabuf() local
1238 for (plane = 0; plane < vb->num_planes; ++plane) { in __prepare_dmabuf()
1239 struct dma_buf *dbuf = dma_buf_get(planes[plane].m.fd); in __prepare_dmabuf()
1243 plane); 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()
1268 dprintk(q, 3, "buffer for plane %d changed\n", plane); 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()
1286 q->alloc_devs[plane] ? : q->dev, 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()
1305 for (plane = 0; plane < vb->num_planes; ++plane) { 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()
1312 plane); in __prepare_dmabuf()
1315 vb->planes[plane].dbuf_mapped = 1; in __prepare_dmabuf()
1322 for (plane = 0; plane < vb->num_planes; ++plane) { 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()
2165 unsigned int buffer, plane; in __find_plane_by_offset() local
2175 for (plane = 0; plane < vb->num_planes; ++plane) { in __find_plane_by_offset()
2176 if (vb->planes[plane].m.offset == off) { in __find_plane_by_offset()
2178 *_plane = plane; in __find_plane_by_offset()
2188 unsigned int index, unsigned int plane, unsigned int flags) in vb2_core_expbuf() argument
2222 if (plane >= vb->num_planes) { in vb2_core_expbuf()
2232 vb_plane = &vb->planes[plane]; in vb2_core_expbuf()
2240 index, plane); in vb2_core_expbuf()
2247 index, plane, ret); in vb2_core_expbuf()
2253 index, plane, ret); in vb2_core_expbuf()
2264 unsigned int buffer = 0, plane = 0; in vb2_mmap() local
2303 ret = __find_plane_by_offset(q, off, &buffer, &plane); in vb2_mmap()
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()
2336 dprintk(q, 3, "buffer %d, plane %d successfully mapped\n", buffer, plane); in vb2_mmap()
2350 unsigned int buffer, plane; in vb2_get_unmapped_area() local
2362 ret = __find_plane_by_offset(q, off, &buffer, &plane); in vb2_get_unmapped_area()
2368 vaddr = vb2_plane_vaddr(vb, plane); in vb2_get_unmapped_area()