Lines Matching refs:vb
92 vb.queue); in cx25821_video_wakeup()
100 v4l2_get_timestamp(&buf->vb.ts); in cx25821_video_wakeup()
101 buf->vb.state = VIDEOBUF_DONE; in cx25821_video_wakeup()
102 list_del(&buf->vb.queue); in cx25821_video_wakeup()
103 wake_up(&buf->vb.done); in cx25821_video_wakeup()
151 vb.queue); in cx25821_restart_video_queue()
156 buf = list_entry(item, struct cx25821_buffer, vb.queue); in cx25821_restart_video_queue()
170 vb.queue); in cx25821_restart_video_queue()
173 list_move_tail(&buf->vb.queue, &q->active); in cx25821_restart_video_queue()
175 buf->vb.state = VIDEOBUF_ACTIVE; in cx25821_restart_video_queue()
178 } else if (prev->vb.width == buf->vb.width && in cx25821_restart_video_queue()
179 prev->vb.height == buf->vb.height && in cx25821_restart_video_queue()
181 list_move_tail(&buf->vb.queue, &q->active); in cx25821_restart_video_queue()
182 buf->vb.state = VIDEOBUF_ACTIVE; in cx25821_restart_video_queue()
208 vb.queue); in cx25821_vid_timeout()
209 list_del(&buf->vb.queue); in cx25821_vid_timeout()
211 buf->vb.state = VIDEOBUF_ERROR; in cx25821_vid_timeout()
212 wake_up(&buf->vb.done); in cx25821_vid_timeout()
278 static int cx25821_buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb, in cx25821_buffer_prepare() argument
284 container_of(vb, struct cx25821_buffer, vb); in cx25821_buffer_prepare()
287 struct videobuf_dmabuf *dma = videobuf_to_dma(&buf->vb); in cx25821_buffer_prepare()
295 buf->vb.size = (chan->width * chan->height * chan->fmt->depth) >> 3; in cx25821_buffer_prepare()
297 if (0 != buf->vb.baddr && buf->vb.bsize < buf->vb.size) in cx25821_buffer_prepare()
301 buf->vb.width != chan->width || in cx25821_buffer_prepare()
302 buf->vb.height != chan->height || buf->vb.field != field) { in cx25821_buffer_prepare()
304 buf->vb.width = chan->width; in cx25821_buffer_prepare()
305 buf->vb.height = chan->height; in cx25821_buffer_prepare()
306 buf->vb.field = field; in cx25821_buffer_prepare()
310 if (VIDEOBUF_NEEDS_INIT == buf->vb.state) { in cx25821_buffer_prepare()
312 rc = videobuf_iolock(q, &buf->vb, NULL); in cx25821_buffer_prepare()
323 buf->bpl = (buf->fmt->depth * buf->vb.width) >> 3; in cx25821_buffer_prepare()
325 buf->bpl = (buf->fmt->depth >> 3) * (buf->vb.width); in cx25821_buffer_prepare()
340 switch (buf->vb.field) { in cx25821_buffer_prepare()
344 buf->bpl, 0, buf->vb.height); in cx25821_buffer_prepare()
349 buf->bpl, 0, buf->vb.height); in cx25821_buffer_prepare()
359 buf->vb.height >> 1); in cx25821_buffer_prepare()
364 0, buf->bpl * (buf->vb.height >> 1), in cx25821_buffer_prepare()
365 buf->bpl, 0, buf->vb.height >> 1); in cx25821_buffer_prepare()
370 buf->bpl * (buf->vb.height >> 1), 0, in cx25821_buffer_prepare()
371 buf->bpl, 0, buf->vb.height >> 1); in cx25821_buffer_prepare()
379 buf, buf->vb.i, chan->width, chan->height, chan->fmt->depth, in cx25821_buffer_prepare()
382 buf->vb.state = VIDEOBUF_PREPARED; in cx25821_buffer_prepare()
392 struct videobuf_buffer *vb) in cx25821_buffer_release() argument
395 container_of(vb, struct cx25821_buffer, vb); in cx25821_buffer_release()
408 static void buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb) in buffer_queue() argument
411 container_of(vb, struct cx25821_buffer, vb); in buffer_queue()
425 list_add_tail(&buf->vb.queue, &q->queued); in buffer_queue()
426 buf->vb.state = VIDEOBUF_QUEUED; in buffer_queue()
428 buf->vb.i); in buffer_queue()
431 list_add_tail(&buf->vb.queue, &q->active); in buffer_queue()
433 buf->vb.state = VIDEOBUF_ACTIVE; in buffer_queue()
437 buf, buf->vb.i, buf->count, q->count); in buffer_queue()
440 vb.queue); in buffer_queue()
441 if (prev->vb.width == buf->vb.width in buffer_queue()
442 && prev->vb.height == buf->vb.height in buffer_queue()
444 list_add_tail(&buf->vb.queue, &q->active); in buffer_queue()
445 buf->vb.state = VIDEOBUF_ACTIVE; in buffer_queue()
452 buf, buf->vb.i, buf->count); in buffer_queue()
455 list_add_tail(&buf->vb.queue, &q->queued); in buffer_queue()
456 buf->vb.state = VIDEOBUF_QUEUED; in buffer_queue()
458 buf->vb.i); in buffer_queue()