Lines Matching refs:vdev

3294 static inline bool vb2_queue_is_busy(struct video_device *vdev, struct file *file)  in vb2_queue_is_busy()  argument
3296 return vdev->queue->owner && vdev->queue->owner != file->private_data; in vb2_queue_is_busy()
3304 struct video_device *vdev = video_devdata(file); in vb2_ioctl_reqbufs() local
3305 int res = __verify_memory_type(vdev->queue, p->memory, p->type); in vb2_ioctl_reqbufs()
3309 if (vb2_queue_is_busy(vdev, file)) in vb2_ioctl_reqbufs()
3311 res = __reqbufs(vdev->queue, p); in vb2_ioctl_reqbufs()
3315 vdev->queue->owner = p->count ? file->private_data : NULL; in vb2_ioctl_reqbufs()
3323 struct video_device *vdev = video_devdata(file); in vb2_ioctl_create_bufs() local
3324 int res = __verify_memory_type(vdev->queue, p->memory, p->format.type); in vb2_ioctl_create_bufs()
3326 p->index = vdev->queue->num_buffers; in vb2_ioctl_create_bufs()
3333 if (vb2_queue_is_busy(vdev, file)) in vb2_ioctl_create_bufs()
3335 res = __create_bufs(vdev->queue, p); in vb2_ioctl_create_bufs()
3337 vdev->queue->owner = file->private_data; in vb2_ioctl_create_bufs()
3345 struct video_device *vdev = video_devdata(file); in vb2_ioctl_prepare_buf() local
3347 if (vb2_queue_is_busy(vdev, file)) in vb2_ioctl_prepare_buf()
3349 return vb2_prepare_buf(vdev->queue, p); in vb2_ioctl_prepare_buf()
3355 struct video_device *vdev = video_devdata(file); in vb2_ioctl_querybuf() local
3358 return vb2_querybuf(vdev->queue, p); in vb2_ioctl_querybuf()
3364 struct video_device *vdev = video_devdata(file); in vb2_ioctl_qbuf() local
3366 if (vb2_queue_is_busy(vdev, file)) in vb2_ioctl_qbuf()
3368 return vb2_qbuf(vdev->queue, p); in vb2_ioctl_qbuf()
3374 struct video_device *vdev = video_devdata(file); in vb2_ioctl_dqbuf() local
3376 if (vb2_queue_is_busy(vdev, file)) in vb2_ioctl_dqbuf()
3378 return vb2_dqbuf(vdev->queue, p, file->f_flags & O_NONBLOCK); in vb2_ioctl_dqbuf()
3384 struct video_device *vdev = video_devdata(file); in vb2_ioctl_streamon() local
3386 if (vb2_queue_is_busy(vdev, file)) in vb2_ioctl_streamon()
3388 return vb2_streamon(vdev->queue, i); in vb2_ioctl_streamon()
3394 struct video_device *vdev = video_devdata(file); in vb2_ioctl_streamoff() local
3396 if (vb2_queue_is_busy(vdev, file)) in vb2_ioctl_streamoff()
3398 return vb2_streamoff(vdev->queue, i); in vb2_ioctl_streamoff()
3404 struct video_device *vdev = video_devdata(file); in vb2_ioctl_expbuf() local
3406 if (vb2_queue_is_busy(vdev, file)) in vb2_ioctl_expbuf()
3408 return vb2_expbuf(vdev->queue, p); in vb2_ioctl_expbuf()
3416 struct video_device *vdev = video_devdata(file); in vb2_fop_mmap() local
3418 return vb2_mmap(vdev->queue, vma); in vb2_fop_mmap()
3424 struct video_device *vdev = video_devdata(file); in _vb2_fop_release() local
3428 if (file->private_data == vdev->queue->owner) { in _vb2_fop_release()
3429 vb2_queue_release(vdev->queue); in _vb2_fop_release()
3430 vdev->queue->owner = NULL; in _vb2_fop_release()
3440 struct video_device *vdev = video_devdata(file); in vb2_fop_release() local
3441 struct mutex *lock = vdev->queue->lock ? vdev->queue->lock : vdev->lock; in vb2_fop_release()
3450 struct video_device *vdev = video_devdata(file); in vb2_fop_write() local
3451 struct mutex *lock = vdev->queue->lock ? vdev->queue->lock : vdev->lock; in vb2_fop_write()
3454 if (!(vdev->queue->io_modes & VB2_WRITE)) in vb2_fop_write()
3458 if (vb2_queue_is_busy(vdev, file)) in vb2_fop_write()
3460 err = vb2_write(vdev->queue, buf, count, ppos, in vb2_fop_write()
3462 if (vdev->queue->fileio) in vb2_fop_write()
3463 vdev->queue->owner = file->private_data; in vb2_fop_write()
3474 struct video_device *vdev = video_devdata(file); in vb2_fop_read() local
3475 struct mutex *lock = vdev->queue->lock ? vdev->queue->lock : vdev->lock; in vb2_fop_read()
3478 if (!(vdev->queue->io_modes & VB2_READ)) in vb2_fop_read()
3482 if (vb2_queue_is_busy(vdev, file)) in vb2_fop_read()
3484 err = vb2_read(vdev->queue, buf, count, ppos, in vb2_fop_read()
3486 if (vdev->queue->fileio) in vb2_fop_read()
3487 vdev->queue->owner = file->private_data; in vb2_fop_read()
3497 struct video_device *vdev = video_devdata(file); in vb2_fop_poll() local
3498 struct vb2_queue *q = vdev->queue; in vb2_fop_poll()
3499 struct mutex *lock = q->lock ? q->lock : vdev->lock; in vb2_fop_poll()
3514 res = vb2_poll(vdev->queue, file, wait); in vb2_fop_poll()
3529 struct video_device *vdev = video_devdata(file); in vb2_fop_get_unmapped_area() local
3531 return vb2_get_unmapped_area(vdev->queue, addr, len, pgoff, flags); in vb2_fop_get_unmapped_area()