Lines Matching refs:fh
357 struct omap24xxcam_fh *fh = in omap24xxcam_vbq_alloc_mmap_buffers() local
366 dev_dbg(fh->cam->dev, "sglen is %d for buffer %d\n", in omap24xxcam_vbq_alloc_mmap_buffers()
393 struct omap24xxcam_fh *fh = cam->streaming->private_data; in omap24xxcam_vbq_complete() local
406 vb->field_count = atomic_add_return(2, &fh->field_count); in omap24xxcam_vbq_complete()
409 if (!atomic_read(&fh->cam->in_reset)) { in omap24xxcam_vbq_complete()
445 struct omap24xxcam_fh *fh = vbq->priv_data; in omap24xxcam_vbq_setup() local
453 *size = fh->pix.sizeimage; in omap24xxcam_vbq_setup()
456 if (*size * *cnt > fh->cam->capture_mem) in omap24xxcam_vbq_setup()
457 *cnt = fh->cam->capture_mem / *size; in omap24xxcam_vbq_setup()
482 struct omap24xxcam_fh *fh = vbq->priv_data; in omap24xxcam_vbq_prepare() local
491 if (fh->pix.sizeimage > vb->bsize) { in omap24xxcam_vbq_prepare()
495 vb->size = fh->pix.sizeimage; in omap24xxcam_vbq_prepare()
502 if (fh->pix.sizeimage > vb->size) { in omap24xxcam_vbq_prepare()
510 vb->size = fh->pix.sizeimage; in omap24xxcam_vbq_prepare()
514 vb->size = fh->pix.sizeimage; in omap24xxcam_vbq_prepare()
521 vb->width = fh->pix.width; in omap24xxcam_vbq_prepare()
522 vb->height = fh->pix.height; in omap24xxcam_vbq_prepare()
547 struct omap24xxcam_fh *fh = vbq->priv_data; in omap24xxcam_vbq_queue() local
548 struct omap24xxcam_device *cam = fh->cam; in omap24xxcam_vbq_queue()
560 err = omap24xxcam_sgdma_queue(&fh->cam->sgdma, in omap24xxcam_vbq_queue()
988 static int vidioc_querycap(struct file *file, void *fh, in vidioc_querycap() argument
991 struct omap24xxcam_fh *ofh = fh; in vidioc_querycap()
1001 static int vidioc_enum_fmt_vid_cap(struct file *file, void *fh, in vidioc_enum_fmt_vid_cap() argument
1004 struct omap24xxcam_fh *ofh = fh; in vidioc_enum_fmt_vid_cap()
1013 static int vidioc_g_fmt_vid_cap(struct file *file, void *fh, in vidioc_g_fmt_vid_cap() argument
1016 struct omap24xxcam_fh *ofh = fh; in vidioc_g_fmt_vid_cap()
1027 static int vidioc_s_fmt_vid_cap(struct file *file, void *fh, in vidioc_s_fmt_vid_cap() argument
1030 struct omap24xxcam_fh *ofh = fh; in vidioc_s_fmt_vid_cap()
1052 vidioc_g_fmt_vid_cap(file, fh, f); in vidioc_s_fmt_vid_cap()
1057 static int vidioc_try_fmt_vid_cap(struct file *file, void *fh, in vidioc_try_fmt_vid_cap() argument
1060 struct omap24xxcam_fh *ofh = fh; in vidioc_try_fmt_vid_cap()
1071 static int vidioc_reqbufs(struct file *file, void *fh, in vidioc_reqbufs() argument
1074 struct omap24xxcam_fh *ofh = fh; in vidioc_reqbufs()
1104 static int vidioc_querybuf(struct file *file, void *fh, in vidioc_querybuf() argument
1107 struct omap24xxcam_fh *ofh = fh; in vidioc_querybuf()
1112 static int vidioc_qbuf(struct file *file, void *fh, struct v4l2_buffer *b) in vidioc_qbuf() argument
1114 struct omap24xxcam_fh *ofh = fh; in vidioc_qbuf()
1119 static int vidioc_dqbuf(struct file *file, void *fh, struct v4l2_buffer *b) in vidioc_dqbuf() argument
1121 struct omap24xxcam_fh *ofh = fh; in vidioc_dqbuf()
1162 static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i) in vidioc_streamon() argument
1164 struct omap24xxcam_fh *ofh = fh; in vidioc_streamon()
1192 static int vidioc_streamoff(struct file *file, void *fh, enum v4l2_buf_type i) in vidioc_streamoff() argument
1194 struct omap24xxcam_fh *ofh = fh; in vidioc_streamoff()
1216 static int vidioc_enum_input(struct file *file, void *fh, in vidioc_enum_input() argument
1228 static int vidioc_g_input(struct file *file, void *fh, unsigned int *i) in vidioc_g_input() argument
1235 static int vidioc_s_input(struct file *file, void *fh, unsigned int i) in vidioc_s_input() argument
1243 static int vidioc_queryctrl(struct file *file, void *fh, in vidioc_queryctrl() argument
1246 struct omap24xxcam_fh *ofh = fh; in vidioc_queryctrl()
1255 static int vidioc_g_ctrl(struct file *file, void *fh, in vidioc_g_ctrl() argument
1258 struct omap24xxcam_fh *ofh = fh; in vidioc_g_ctrl()
1269 static int vidioc_s_ctrl(struct file *file, void *fh, in vidioc_s_ctrl() argument
1272 struct omap24xxcam_fh *ofh = fh; in vidioc_s_ctrl()
1283 static int vidioc_g_parm(struct file *file, void *fh, in vidioc_g_parm() argument
1285 struct omap24xxcam_fh *ofh = fh; in vidioc_g_parm()
1296 static int vidioc_s_parm(struct file *file, void *fh, in vidioc_s_parm() argument
1299 struct omap24xxcam_fh *ofh = fh; in vidioc_s_parm()
1342 struct omap24xxcam_fh *fh = file->private_data; in omap24xxcam_poll() local
1343 struct omap24xxcam_device *cam = fh->cam; in omap24xxcam_poll()
1353 mutex_lock(&fh->vbq.vb_lock); in omap24xxcam_poll()
1354 if (list_empty(&fh->vbq.stream)) { in omap24xxcam_poll()
1355 mutex_unlock(&fh->vbq.vb_lock); in omap24xxcam_poll()
1358 vb = list_entry(fh->vbq.stream.next, struct videobuf_buffer, stream); in omap24xxcam_poll()
1359 mutex_unlock(&fh->vbq.vb_lock); in omap24xxcam_poll()
1372 struct omap24xxcam_fh *fh = file->private_data; in omap24xxcam_mmap_buffers() local
1373 struct omap24xxcam_device *cam = fh->cam; in omap24xxcam_mmap_buffers()
1374 struct videobuf_queue *vbq = &fh->vbq; in omap24xxcam_mmap_buffers()
1430 struct omap24xxcam_fh *fh = file->private_data; in omap24xxcam_mmap() local
1434 rval = videobuf_mmap_mapper(&fh->vbq, vma); in omap24xxcam_mmap()
1455 struct omap24xxcam_fh *fh; in omap24xxcam_open() local
1461 fh = kzalloc(sizeof(*fh), GFP_KERNEL); in omap24xxcam_open()
1462 if (fh == NULL) in omap24xxcam_open()
1480 fh->cam = cam; in omap24xxcam_open()
1485 fh->pix = format.fmt.pix; in omap24xxcam_open()
1487 file->private_data = fh; in omap24xxcam_open()
1489 spin_lock_init(&fh->vbq_lock); in omap24xxcam_open()
1491 videobuf_queue_sg_init(&fh->vbq, &omap24xxcam_vbq_ops, NULL, in omap24xxcam_open()
1492 &fh->vbq_lock, V4L2_BUF_TYPE_VIDEO_CAPTURE, in omap24xxcam_open()
1494 sizeof(struct videobuf_buffer), fh, NULL); in omap24xxcam_open()
1503 kfree(fh); in omap24xxcam_open()
1510 struct omap24xxcam_fh *fh = file->private_data; in omap24xxcam_release() local
1511 struct omap24xxcam_device *cam = fh->cam; in omap24xxcam_release()
1518 videobuf_streamoff(&fh->vbq); in omap24xxcam_release()
1531 omap24xxcam_vbq_free_mmap_buffers(&fh->vbq); in omap24xxcam_release()
1551 kfree(fh); in omap24xxcam_release()