Lines Matching refs:vdev
1399 static inline bool vb2_queue_is_busy(struct video_device *vdev, struct file *file) in vb2_queue_is_busy() argument
1401 return vdev->queue->owner && vdev->queue->owner != file->private_data; in vb2_queue_is_busy()
1409 struct video_device *vdev = video_devdata(file); in vb2_ioctl_reqbufs() local
1410 int res = vb2_verify_memory_type(vdev->queue, p->memory, p->type); in vb2_ioctl_reqbufs()
1414 if (vb2_queue_is_busy(vdev, file)) in vb2_ioctl_reqbufs()
1416 res = vb2_core_reqbufs(vdev->queue, p->memory, &p->count); in vb2_ioctl_reqbufs()
1420 vdev->queue->owner = p->count ? file->private_data : NULL; in vb2_ioctl_reqbufs()
1428 struct video_device *vdev = video_devdata(file); in vb2_ioctl_create_bufs() local
1429 int res = vb2_verify_memory_type(vdev->queue, p->memory, in vb2_ioctl_create_bufs()
1432 p->index = vdev->queue->num_buffers; in vb2_ioctl_create_bufs()
1441 if (vb2_queue_is_busy(vdev, file)) in vb2_ioctl_create_bufs()
1443 res = vb2_core_create_bufs(vdev->queue, p->memory, &p->count, in vb2_ioctl_create_bufs()
1446 vdev->queue->owner = file->private_data; in vb2_ioctl_create_bufs()
1454 struct video_device *vdev = video_devdata(file); in vb2_ioctl_prepare_buf() local
1456 if (vb2_queue_is_busy(vdev, file)) in vb2_ioctl_prepare_buf()
1458 return vb2_prepare_buf(vdev->queue, p); in vb2_ioctl_prepare_buf()
1464 struct video_device *vdev = video_devdata(file); in vb2_ioctl_querybuf() local
1467 return vb2_querybuf(vdev->queue, p); in vb2_ioctl_querybuf()
1473 struct video_device *vdev = video_devdata(file); in vb2_ioctl_qbuf() local
1475 if (vb2_queue_is_busy(vdev, file)) in vb2_ioctl_qbuf()
1477 return vb2_qbuf(vdev->queue, p); in vb2_ioctl_qbuf()
1483 struct video_device *vdev = video_devdata(file); in vb2_ioctl_dqbuf() local
1485 if (vb2_queue_is_busy(vdev, file)) in vb2_ioctl_dqbuf()
1487 return vb2_dqbuf(vdev->queue, p, file->f_flags & O_NONBLOCK); in vb2_ioctl_dqbuf()
1493 struct video_device *vdev = video_devdata(file); in vb2_ioctl_streamon() local
1495 if (vb2_queue_is_busy(vdev, file)) in vb2_ioctl_streamon()
1497 return vb2_streamon(vdev->queue, i); in vb2_ioctl_streamon()
1503 struct video_device *vdev = video_devdata(file); in vb2_ioctl_streamoff() local
1505 if (vb2_queue_is_busy(vdev, file)) in vb2_ioctl_streamoff()
1507 return vb2_streamoff(vdev->queue, i); in vb2_ioctl_streamoff()
1513 struct video_device *vdev = video_devdata(file); in vb2_ioctl_expbuf() local
1515 if (vb2_queue_is_busy(vdev, file)) in vb2_ioctl_expbuf()
1517 return vb2_expbuf(vdev->queue, p); in vb2_ioctl_expbuf()
1525 struct video_device *vdev = video_devdata(file); in vb2_fop_mmap() local
1527 return vb2_mmap(vdev->queue, vma); in vb2_fop_mmap()
1533 struct video_device *vdev = video_devdata(file); in _vb2_fop_release() local
1537 if (file->private_data == vdev->queue->owner) { in _vb2_fop_release()
1538 vb2_queue_release(vdev->queue); in _vb2_fop_release()
1539 vdev->queue->owner = NULL; in _vb2_fop_release()
1549 struct video_device *vdev = video_devdata(file); in vb2_fop_release() local
1550 struct mutex *lock = vdev->queue->lock ? vdev->queue->lock : vdev->lock; in vb2_fop_release()
1559 struct video_device *vdev = video_devdata(file); in vb2_fop_write() local
1560 struct mutex *lock = vdev->queue->lock ? vdev->queue->lock : vdev->lock; in vb2_fop_write()
1563 if (!(vdev->queue->io_modes & VB2_WRITE)) in vb2_fop_write()
1567 if (vb2_queue_is_busy(vdev, file)) in vb2_fop_write()
1569 err = vb2_write(vdev->queue, buf, count, ppos, in vb2_fop_write()
1571 if (vdev->queue->fileio) in vb2_fop_write()
1572 vdev->queue->owner = file->private_data; in vb2_fop_write()
1583 struct video_device *vdev = video_devdata(file); in vb2_fop_read() local
1584 struct mutex *lock = vdev->queue->lock ? vdev->queue->lock : vdev->lock; in vb2_fop_read()
1587 if (!(vdev->queue->io_modes & VB2_READ)) in vb2_fop_read()
1591 if (vb2_queue_is_busy(vdev, file)) in vb2_fop_read()
1593 err = vb2_read(vdev->queue, buf, count, ppos, in vb2_fop_read()
1595 if (vdev->queue->fileio) in vb2_fop_read()
1596 vdev->queue->owner = file->private_data; in vb2_fop_read()
1606 struct video_device *vdev = video_devdata(file); in vb2_fop_poll() local
1607 struct vb2_queue *q = vdev->queue; in vb2_fop_poll()
1608 struct mutex *lock = q->lock ? q->lock : vdev->lock; in vb2_fop_poll()
1623 res = vb2_poll(vdev->queue, file, wait); in vb2_fop_poll()
1638 struct video_device *vdev = video_devdata(file); in vb2_fop_get_unmapped_area() local
1640 return vb2_get_unmapped_area(vdev->queue, addr, len, pgoff, flags); in vb2_fop_get_unmapped_area()