public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@infradead.org>
To: Brandon Philips <bphilips@suse.de>
Cc: v4l <video4linux-list@redhat.com>
Subject: Re: [PATCH 6 of 9] videobuf-vmalloc.c: Fix hack of postponing mmap on remap failure
Date: Tue, 8 Apr 2008 15:40:46 -0300	[thread overview]
Message-ID: <20080408154046.36766131@gaivota> (raw)
In-Reply-To: <20080408152238.GA8438@plankton.public.utexas.edu>

[-- Attachment #1: Type: text/plain, Size: 4177 bytes --]

On Tue, 8 Apr 2008 08:22:38 -0700
Brandon Philips <bphilips@suse.de> wrote:

> On 18:32 Mon 07 Apr 2008, Mauro Carvalho Chehab wrote:
> > Hi Brandon,
> > 
> > On Sun, 6 Apr 2008 01:00:11 -0700
> > Brandon Philips <bphilips@suse.de> wrote:
> > 
> > > > If I don't revert this patch, mmap() stops working. Reverting it fixed the issue.
> > > 
> > > How does it stop working?  I don't see anything obvious.
> > 
> > I've revisited videobuf-vmalloc. I've discovered why remap were not properly
> > working at videobuf_mapper function. I've fixed it on:
> > 	http://linuxtv.org/hg/~mchehab/em28xx-vb/rev/ab0ca0f1f093
> > 
> > I think that the approach of the above patch is much cleaner and seems to be correct.
> > 
> > So, if it is ok for you, I think the better is to revert patch 6/9, and
> > applying this one, instead, at v4l/dvb. What do you think?
> 
> I don't think it quite works right and I think making the allocation in
> reqbufs, as 6/9 did, is the right thing to do.

With 6/9 or with this patch, the allocation will happen when you try to use an
mmap command. This can happen on streamon, reqbufs, dqbuf, qbuf or reqbuf.

Sorry, but I think I missed your point.

> > One interesting thing is that tvtime behavior has changed after this patch.
> > Yet, it is not working. However, before this patch, the buffers weren't
> > mmapped. Now, this part occurred successfully.
> 
> Does this really work?

Yes, it works.

> > +	case V4L2_MEMORY_USERPTR:
> > +	{
> 
> Why are you adding braces here?
> 
> > +		int pages = PAGE_ALIGN(vb->size);

To declare pages var on above code. without braces, a warning is generated.

> > @@ -218,46 +250,55 @@ static int __videobuf_mmap_mapper(struct
> >  	}
> >  
> >  	/* create mapping + update buffer list */
> > -	map = q->bufs[first]->map = kzalloc(sizeof(struct videobuf_mapping),GFP_KERNEL);
> > +	map = kzalloc(sizeof(struct videobuf_mapping), GFP_KERNEL);
> >  	if (NULL == map)
> >  		return -ENOMEM;
> >  
> > +	q->bufs[first]->map = map;
> >  	map->start = vma->vm_start;
> >  	map->end   = vma->vm_end;
> >  	map->q     = q;
> >  
> >  	q->bufs[first]->baddr = vma->vm_start;
> >  
> > +	mem = q->bufs[first]->priv;
> > +	BUG_ON(!mem);
> > +	MAGIC_CHECK(mem->magic, MAGIC_VMAL_MEM);
> > +
> > +	pages = PAGE_ALIGN(vma->vm_end - vma->vm_start);
> > +	mem->vmalloc = vmalloc_user(pages);
> 
> What happens when an application unmaps then remaps?  The memory backing
> that drivers depend on will be freed on vm_close then come back on mmap.

Are you thinking on an userspace application explicitly calling munmap()? 

Hmm... Interesting. Test attached. 

Basically, this worked as expected.

Probably, in this case, we may have some troubles, due to vfree() if we get an
interrupt between:
	vfree(mem->vmalloc)
		and
	mem->vmalloc=NULL.

A fix could be to disable IRQ during that interval of time, and/or protecting
with a spinlock.

I can't see any other issues. Btw, the same kind of code is also used on
videobuf-dma-sg, cafe-ccic, and several other USB drivers.

> Really, I think the allocation should happen in REQBUF as I did.

By looking on your code, it didn't work previously, due to a bug on this line:

	retval=remap_vmalloc_range(vma, mem->vmalloc,0);

This bug were present on the previous version, and were corrected by this patch.

Also, all userspace clients already do something like this, on buffer_prepare:

        if (VIDEOBUF_NEEDS_INIT == buf->vb.state) {
                rc = videobuf_iolock(vq, &buf->vb, NULL);
                if (rc < 0)
                        goto fail;
        }

Btw, I think that this flag should be set automatically by videobuf_vmalloc_free().

Cheers,
Mauro

---

I'm enclosing two files:

1) A diff file, against em28xx-vb tree, with some additional printk's and a
patch for capture_example.c. The patch basically captures 5 frames, stops,
unmaps, request buffers, and captures 5 more frames;

2) the dmesg output of running capture_example, with vivi.

All seemed to work fine.

I also tested this (increasing the second capture to 50 frames, in order to see more):

./capture_example -o | mplayer -demuxer 26 -rawvideo w=640:h=480:format=yuy2 -

Also worked perfectly.

[-- Attachment #2: dmesg --]
[-- Type: application/octet-stream, Size: 42613 bytes --]

Apr  8 15:30:55 gaivota kernel: [ 7194.057735] Linux video capture interface: v2.00
Apr  8 15:30:55 gaivota kernel: [ 7194.075505] Video Technology Magazine Virtual Video Capture Board successfully loaded.
Apr  8 15:30:57 gaivota kernel: [ 7196.106675] vivi: open called (minor=0)
Apr  8 15:30:57 gaivota kernel: [ 7196.106685] vivi: open minor=0 type=video-cap users=1
Apr  8 15:30:57 gaivota kernel: [ 7196.106691] vivi: vivi_start_thread
Apr  8 15:30:57 gaivota kernel: [ 7196.107195] vivi: returning from vivi_start_thread
Apr  8 15:30:57 gaivota kernel: [ 7196.107208] vivi (0): v4l2 ioctl VIDIOC_QUERYCAP, dir=r- (0x80685600)
Apr  8 15:30:57 gaivota kernel: [ 7196.107214] vivi (0): driver=vivi, card=vivi, bus=, version=0x00000400, capabilities=0x05000001
Apr  8 15:30:57 gaivota kernel: [ 7196.107220] vivi (0): v4l2 ioctl VIDIOC_CROPCAP, dir=rw (0xc02c563a)
Apr  8 15:30:57 gaivota kernel: [ 7196.107230] vivi (0): v4l2 ioctl VIDIOC_S_FMT, dir=rw (0xc0d05605)
Apr  8 15:30:57 gaivota kernel: [ 7196.107234] vivi (0): type=video-cap
Apr  8 15:30:57 gaivota kernel: [ 7196.107237] vivi (0): width=640, height=480, format=YUYV, field=interlaced, bytesperline=0 sizeimage=0, colorspace=0
Apr  8 15:30:57 gaivota kernel: [ 7196.107244] vivi: buffer_setup, count=4, size=614400
Apr  8 15:30:57 gaivota kernel: [ 7196.107248] vbuf: reqbufs: bufs=4, size=0x96000 [600 pages total]
Apr  8 15:30:57 gaivota kernel: [ 7196.107250] vbuf: __videobuf_mmap_setup called
Apr  8 15:30:57 gaivota kernel: [ 7196.107253] vbuf-vmalloc: __videobuf_mmap_free
Apr  8 15:30:57 gaivota kernel: [ 7196.107257] vbuf-vmalloc: __videobuf_alloc: allocated at ffff810076cc5600(232+8) & ffff810076cc56f0(24)
Apr  8 15:30:57 gaivota kernel: [ 7196.107261] vbuf-vmalloc: __videobuf_alloc: allocated at ffff810077012c00(232+8) & ffff810077012cf0(24)
Apr  8 15:30:57 gaivota kernel: [ 7196.107266] vbuf-vmalloc: __videobuf_alloc: allocated at ffff8100771fac00(232+8) & ffff8100771facf0(24)
Apr  8 15:30:57 gaivota kernel: [ 7196.107270] vbuf-vmalloc: __videobuf_alloc: allocated at ffff8100593fb000(232+8) & ffff8100593fb0f0(24)
Apr  8 15:30:57 gaivota kernel: [ 7196.107273] vbuf: mmap setup: 4 buffers, 614400 bytes each
Apr  8 15:30:57 gaivota kernel: [ 7196.107276] vivi (0): v4l2 ioctl VIDIOC_REQBUFS, dir=rw (0xc0145608)
Apr  8 15:30:57 gaivota kernel: [ 7196.107279] vivi (0): count=4, type=video-cap, memory=mmap
Apr  8 15:30:57 gaivota kernel: [ 7196.107372] vivi (0): v4l2 ioctl VIDIOC_QUERYBUF, dir=rw (0xc0585609)
Apr  8 15:30:57 gaivota kernel: [ 7196.107379] vivi (0): 00:00:00.00000000 index=0, type=video-cap, bytesused=0, flags=0x00000000, field=0, sequence=0, memory=mmap, offset/userptr=0x00000000, length=614400
Apr  8 15:30:57 gaivota kernel: [ 7196.107383] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:57 gaivota kernel: [ 7196.107394] vivi: mmap called, vma=0xffff81006180e288
Apr  8 15:30:57 gaivota kernel: [ 7196.107397] vbuf-vmalloc: __videobuf_mmap_mapper
Apr  8 15:30:57 gaivota kernel: [ 7196.107773] vbuf-vmalloc: vmalloc is at addr ffffc20001418000 (614400 pages)
Apr  8 15:30:57 gaivota kernel: [ 7196.107859] vbuf-vmalloc: mmap ffff81005b3eedc0: q=ffff8100729bcc18 2b021bf6b000-2b021c001000 (96000) pgoff 00000000 buf 0
Apr  8 15:30:57 gaivota kernel: [ 7196.107863] vivi: vma start=0x2b021bf6b000, size=614400, ret=0
Apr  8 15:30:57 gaivota kernel: [ 7196.107873] vivi (0): v4l2 ioctl VIDIOC_QUERYBUF, dir=rw (0xc0585609)
Apr  8 15:30:57 gaivota kernel: [ 7196.107880] vivi (0): 00:00:00.00000000 index=1, type=video-cap, bytesused=0, flags=0x00000000, field=0, sequence=0, memory=mmap, offset/userptr=0x00096000, length=614400
Apr  8 15:30:57 gaivota kernel: [ 7196.107885] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:57 gaivota kernel: [ 7196.107890] vivi: mmap called, vma=0xffff810061b463d8
Apr  8 15:30:57 gaivota kernel: [ 7196.107893] vbuf-vmalloc: __videobuf_mmap_mapper
Apr  8 15:30:57 gaivota kernel: [ 7196.108325] vbuf-vmalloc: vmalloc is at addr ffffc200014af000 (614400 pages)
Apr  8 15:30:57 gaivota kernel: [ 7196.108403] vbuf-vmalloc: mmap ffff81005b2f8640: q=ffff8100729bcc18 2b021c001000-2b021c097000 (96000) pgoff 00000096 buf 1
Apr  8 15:30:57 gaivota kernel: [ 7196.108407] vivi: vma start=0x2b021c001000, size=614400, ret=0
Apr  8 15:30:57 gaivota kernel: [ 7196.108415] vivi (0): v4l2 ioctl VIDIOC_QUERYBUF, dir=rw (0xc0585609)
Apr  8 15:30:57 gaivota kernel: [ 7196.108421] vivi (0): 00:00:00.00000000 index=2, type=video-cap, bytesused=0, flags=0x00000000, field=0, sequence=0, memory=mmap, offset/userptr=0x0012c000, length=614400
Apr  8 15:30:57 gaivota kernel: [ 7196.108426] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:57 gaivota kernel: [ 7196.108432] vivi: mmap called, vma=0xffff810065068c60
Apr  8 15:30:57 gaivota kernel: [ 7196.108435] vbuf-vmalloc: __videobuf_mmap_mapper
Apr  8 15:30:57 gaivota kernel: [ 7196.108851] vbuf-vmalloc: vmalloc is at addr ffffc20001546000 (614400 pages)
Apr  8 15:30:57 gaivota kernel: [ 7196.108928] vbuf-vmalloc: mmap ffff81005b2f8700: q=ffff8100729bcc18 2b021c097000-2b021c12d000 (96000) pgoff 0000012c buf 2
Apr  8 15:30:57 gaivota kernel: [ 7196.108932] vivi: vma start=0x2b021c097000, size=614400, ret=0
Apr  8 15:30:57 gaivota kernel: [ 7196.108941] vivi (0): v4l2 ioctl VIDIOC_QUERYBUF, dir=rw (0xc0585609)
Apr  8 15:30:57 gaivota kernel: [ 7196.108947] vivi (0): 00:00:00.00000000 index=3, type=video-cap, bytesused=0, flags=0x00000000, field=0, sequence=0, memory=mmap, offset/userptr=0x001c2000, length=614400
Apr  8 15:30:57 gaivota kernel: [ 7196.108952] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:57 gaivota kernel: [ 7196.108958] vivi: mmap called, vma=0xffff81006194dbb8
Apr  8 15:30:57 gaivota kernel: [ 7196.108961] vbuf-vmalloc: __videobuf_mmap_mapper
Apr  8 15:30:57 gaivota kernel: [ 7196.109373] vbuf-vmalloc: vmalloc is at addr ffffc200015dd000 (614400 pages)
Apr  8 15:30:57 gaivota kernel: [ 7196.109452] vbuf-vmalloc: mmap ffff81005b2f8720: q=ffff8100729bcc18 2b021c4bf000-2b021c555000 (96000) pgoff 000001c2 buf 3
Apr  8 15:30:57 gaivota kernel: [ 7196.109456] vivi: vma start=0x2b021c4bf000, size=614400, ret=0
Apr  8 15:30:57 gaivota kernel: [ 7196.109467] vbuf: qbuf: requesting next field
Apr  8 15:30:57 gaivota kernel: [ 7196.109470] vivi: buffer_prepare, field=4
Apr  8 15:30:57 gaivota kernel: [ 7196.109473] vbuf-vmalloc: __videobuf_iolock memory method MMAP
Apr  8 15:30:57 gaivota kernel: [ 7196.109475] vbuf: qbuf: succeded
Apr  8 15:30:57 gaivota kernel: [ 7196.109478] vivi (0): v4l2 ioctl VIDIOC_QBUF, dir=rw (0xc058560f)
Apr  8 15:30:57 gaivota kernel: [ 7196.109484] vivi (0): 00:00:00.00000000 index=0, type=video-cap, bytesused=0, flags=0x00000000, field=0, sequence=0, memory=mmap, offset/userptr=0x00000000, length=0
Apr  8 15:30:57 gaivota kernel: [ 7196.109489] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:57 gaivota kernel: [ 7196.109493] vbuf: qbuf: requesting next field
Apr  8 15:30:57 gaivota kernel: [ 7196.109496] vivi: buffer_prepare, field=4
Apr  8 15:30:57 gaivota kernel: [ 7196.109498] vbuf-vmalloc: __videobuf_iolock memory method MMAP
Apr  8 15:30:57 gaivota kernel: [ 7196.109500] vbuf: qbuf: succeded
Apr  8 15:30:57 gaivota kernel: [ 7196.109502] vivi (0): v4l2 ioctl VIDIOC_QBUF, dir=rw (0xc058560f)
Apr  8 15:30:57 gaivota kernel: [ 7196.109507] vivi (0): 00:00:00.00000000 index=1, type=video-cap, bytesused=0, flags=0x00000000, field=0, sequence=0, memory=mmap, offset/userptr=0x00000000, length=0
Apr  8 15:30:57 gaivota kernel: [ 7196.109512] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:57 gaivota kernel: [ 7196.109516] vbuf: qbuf: requesting next field
Apr  8 15:30:57 gaivota kernel: [ 7196.109519] vivi: buffer_prepare, field=4
Apr  8 15:30:57 gaivota kernel: [ 7196.109521] vbuf-vmalloc: __videobuf_iolock memory method MMAP
Apr  8 15:30:57 gaivota kernel: [ 7196.109523] vbuf: qbuf: succeded
Apr  8 15:30:57 gaivota kernel: [ 7196.109525] vivi (0): v4l2 ioctl VIDIOC_QBUF, dir=rw (0xc058560f)
Apr  8 15:30:57 gaivota kernel: [ 7196.109530] vivi (0): 00:00:00.00000000 index=2, type=video-cap, bytesused=0, flags=0x00000000, field=0, sequence=0, memory=mmap, offset/userptr=0x00000000, length=0
Apr  8 15:30:57 gaivota kernel: [ 7196.109535] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:57 gaivota kernel: [ 7196.109539] vbuf: qbuf: requesting next field
Apr  8 15:30:57 gaivota kernel: [ 7196.109541] vivi: buffer_prepare, field=4
Apr  8 15:30:57 gaivota kernel: [ 7196.109543] vbuf-vmalloc: __videobuf_iolock memory method MMAP
Apr  8 15:30:57 gaivota kernel: [ 7196.109546] vbuf: qbuf: succeded
Apr  8 15:30:57 gaivota kernel: [ 7196.109548] vivi (0): v4l2 ioctl VIDIOC_QBUF, dir=rw (0xc058560f)
Apr  8 15:30:57 gaivota kernel: [ 7196.109553] vivi (0): 00:00:00.00000000 index=3, type=video-cap, bytesused=0, flags=0x00000000, field=0, sequence=0, memory=mmap, offset/userptr=0x00000000, length=0
Apr  8 15:30:57 gaivota kernel: [ 7196.109558] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:57 gaivota kernel: [ 7196.109561] vivi (0): v4l2 ioctl VIDIOC_STREAMON, dir=-w (0x40045612)
Apr  8 15:30:57 gaivota kernel: [ 7196.109565] vivi (0): type=video-cap
Apr  8 15:30:57 gaivota kernel: [ 7196.109568] vivi: buffer_queue
Apr  8 15:30:57 gaivota kernel: [ 7196.109569] vivi: buffer_queue
Apr  8 15:30:57 gaivota kernel: [ 7196.109571] vivi: buffer_queue
Apr  8 15:30:57 gaivota kernel: [ 7196.109573] vivi: buffer_queue
Apr  8 15:30:57 gaivota kernel: [ 7196.109583] vivi: vivi_poll
Apr  8 15:30:57 gaivota kernel: [ 7196.109593] vivi: thread started
Apr  8 15:30:57 gaivota kernel: [ 7196.109596] vivi: vivi_sleep dma_q=0xffff81005b381ce0
Apr  8 15:30:57 gaivota kernel: [ 7196.109598] vivi: Thread tick
Apr  8 15:30:57 gaivota kernel: [ 7196.117778] vivi: vivifill at 00:00:00:003: Buffer 0xffff810021a7b000 size= 614400
Apr  8 15:30:57 gaivota kernel: [ 7196.117783] vivi: filled buffer ffff810076cc5600
Apr  8 15:30:57 gaivota kernel: [ 7196.117790] vivi: [ffff810076cc5600/0] wakeup
Apr  8 15:30:57 gaivota kernel: [ 7196.122632] vivi: vivi_poll
Apr  8 15:30:57 gaivota kernel: [ 7196.122646] vbuf: dqbuf: state is done
Apr  8 15:30:57 gaivota kernel: [ 7196.122649] vivi (0): v4l2 ioctl VIDIOC_DQBUF, dir=rw (0xc0585611)
Apr  8 15:30:57 gaivota kernel: [ 7196.122658] vivi (0): 335466:30:57.00770992 index=0, type=video-cap, bytesused=614400, flags=0x00000001, field=4, sequence=0, memory=mmap, offset/userptr=0x00000000, length=614400
Apr  8 15:30:57 gaivota kernel: [ 7196.122663] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:57 gaivota kernel: [ 7196.122726] vbuf: qbuf: requesting next field
Apr  8 15:30:57 gaivota kernel: [ 7196.122729] vivi: buffer_prepare, field=4
Apr  8 15:30:57 gaivota kernel: [ 7196.122732] vivi: buffer_queue
Apr  8 15:30:57 gaivota kernel: [ 7196.122734] vbuf: qbuf: succeded
Apr  8 15:30:57 gaivota kernel: [ 7196.122737] vivi (0): v4l2 ioctl VIDIOC_QBUF, dir=rw (0xc058560f)
Apr  8 15:30:57 gaivota kernel: [ 7196.122743] vivi (0): 335466:30:57.00770992 index=0, type=video-cap, bytesused=614400, flags=0x00000001, field=4, sequence=0, memory=mmap, offset/userptr=0x00000000, length=614400
Apr  8 15:30:57 gaivota kernel: [ 7196.122748] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:57 gaivota kernel: [ 7196.122753] vivi: vivi_poll
Apr  8 15:30:57 gaivota kernel: [ 7196.132043] vivi: vivi_sleep dma_q=0xffff81005b381ce0
Apr  8 15:30:57 gaivota kernel: [ 7196.132047] vivi: Thread tick
Apr  8 15:30:57 gaivota kernel: [ 7196.140214] vivi: vivifill at 00:00:00:036: Buffer 0xffff810021a7b000 size= 614400
Apr  8 15:30:57 gaivota kernel: [ 7196.140219] vivi: filled buffer ffff810077012c00
Apr  8 15:30:57 gaivota kernel: [ 7196.140226] vivi: [ffff810077012c00/1] wakeup
Apr  8 15:30:57 gaivota kernel: [ 7196.140796] vivi: vivi_poll
Apr  8 15:30:57 gaivota kernel: [ 7196.140808] vbuf: dqbuf: state is done
Apr  8 15:30:57 gaivota kernel: [ 7196.140811] vivi (0): v4l2 ioctl VIDIOC_DQBUF, dir=rw (0xc0585611)
Apr  8 15:30:57 gaivota kernel: [ 7196.140818] vivi (0): 335466:30:57.00815902 index=1, type=video-cap, bytesused=614400, flags=0x00000001, field=4, sequence=0, memory=mmap, offset/userptr=0x00096000, length=614400
Apr  8 15:30:57 gaivota kernel: [ 7196.140823] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:57 gaivota kernel: [ 7196.140840] vbuf: qbuf: requesting next field
Apr  8 15:30:57 gaivota kernel: [ 7196.140843] vivi: buffer_prepare, field=4
Apr  8 15:30:57 gaivota kernel: [ 7196.140845] vivi: buffer_queue
Apr  8 15:30:57 gaivota kernel: [ 7196.140847] vbuf: qbuf: succeded
Apr  8 15:30:57 gaivota kernel: [ 7196.140850] vivi (0): v4l2 ioctl VIDIOC_QBUF, dir=rw (0xc058560f)
Apr  8 15:30:57 gaivota kernel: [ 7196.140856] vivi (0): 335466:30:57.00815902 index=1, type=video-cap, bytesused=614400, flags=0x00000001, field=4, sequence=0, memory=mmap, offset/userptr=0x00096000, length=614400
Apr  8 15:30:57 gaivota kernel: [ 7196.140861] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:57 gaivota kernel: [ 7196.140865] vivi: vivi_poll
Apr  8 15:30:57 gaivota kernel: [ 7196.155464] vivi: vivi_sleep dma_q=0xffff81005b381ce0
Apr  8 15:30:57 gaivota kernel: [ 7196.155473] vivi: Thread tick
Apr  8 15:30:57 gaivota kernel: [ 7196.163645] vivi: vivifill at 00:00:00:069: Buffer 0xffff810021a7b000 size= 614400
Apr  8 15:30:57 gaivota kernel: [ 7196.163651] vivi: filled buffer ffff8100771fac00
Apr  8 15:30:57 gaivota kernel: [ 7196.163656] vivi: [ffff8100771fac00/2] wakeup
Apr  8 15:30:57 gaivota kernel: [ 7196.163738] vivi: vivi_poll
Apr  8 15:30:57 gaivota kernel: [ 7196.163751] vbuf: dqbuf: state is done
Apr  8 15:30:57 gaivota kernel: [ 7196.163754] vivi (0): v4l2 ioctl VIDIOC_DQBUF, dir=rw (0xc0585611)
Apr  8 15:30:57 gaivota kernel: [ 7196.163761] vivi (0): 335466:30:57.00862807 index=2, type=video-cap, bytesused=614400, flags=0x00000001, field=4, sequence=0, memory=mmap, offset/userptr=0x0012c000, length=614400
Apr  8 15:30:57 gaivota kernel: [ 7196.163766] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:57 gaivota kernel: [ 7196.163787] vbuf: qbuf: requesting next field
Apr  8 15:30:57 gaivota kernel: [ 7196.163790] vivi: buffer_prepare, field=4
Apr  8 15:30:57 gaivota kernel: [ 7196.163793] vivi: buffer_queue
Apr  8 15:30:57 gaivota kernel: [ 7196.163795] vbuf: qbuf: succeded
Apr  8 15:30:57 gaivota kernel: [ 7196.163798] vivi (0): v4l2 ioctl VIDIOC_QBUF, dir=rw (0xc058560f)
Apr  8 15:30:57 gaivota kernel: [ 7196.163804] vivi (0): 335466:30:57.00862807 index=2, type=video-cap, bytesused=614400, flags=0x00000001, field=4, sequence=0, memory=mmap, offset/userptr=0x0012c000, length=614400
Apr  8 15:30:57 gaivota kernel: [ 7196.163809] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:57 gaivota kernel: [ 7196.163814] vivi: vivi_poll

==> /var/log/kernel/warnings.log <==
Apr  8 15:30:57 gaivota kernel: [ 7196.107218] vivi (0): err:

==> /var/log/kernel/info.log <==
Apr  8 15:30:57 gaivota kernel: [ 7196.178209] vivi: vivi_sleep dma_q=0xffff81005b381ce0
Apr  8 15:30:57 gaivota kernel: [ 7196.178216] vivi: Thread tick
Apr  8 15:30:57 gaivota kernel: [ 7196.186383] vivi: vivifill at 00:00:00:102: Buffer 0xffff810021a7b000 size= 614400
Apr  8 15:30:57 gaivota kernel: [ 7196.186389] vivi: filled buffer ffff8100593fb000
Apr  8 15:30:57 gaivota kernel: [ 7196.186394] vivi: [ffff8100593fb000/3] wakeup
Apr  8 15:30:57 gaivota kernel: [ 7196.186425] vivi: vivi_poll
Apr  8 15:30:57 gaivota kernel: [ 7196.186437] vbuf: dqbuf: state is done
Apr  8 15:30:57 gaivota kernel: [ 7196.186441] vivi (0): v4l2 ioctl VIDIOC_DQBUF, dir=rw (0xc0585611)
Apr  8 15:30:57 gaivota kernel: [ 7196.186448] vivi (0): 335466:30:57.00908320 index=3, type=video-cap, bytesused=614400, flags=0x00000001, field=4, sequence=0, memory=mmap, offset/userptr=0x001c2000, length=614400
Apr  8 15:30:57 gaivota kernel: [ 7196.186453] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:57 gaivota kernel: [ 7196.186474] vbuf: qbuf: requesting next field
Apr  8 15:30:57 gaivota kernel: [ 7196.186477] vivi: buffer_prepare, field=4
Apr  8 15:30:57 gaivota kernel: [ 7196.186480] vivi: buffer_queue
Apr  8 15:30:57 gaivota kernel: [ 7196.186482] vbuf: qbuf: succeded
Apr  8 15:30:57 gaivota kernel: [ 7196.186485] vivi (0): v4l2 ioctl VIDIOC_QBUF, dir=rw (0xc058560f)
Apr  8 15:30:57 gaivota kernel: [ 7196.186490] vivi (0): 335466:30:57.00908320 index=3, type=video-cap, bytesused=614400, flags=0x00000001, field=4, sequence=0, memory=mmap, offset/userptr=0x001c2000, length=614400
Apr  8 15:30:57 gaivota kernel: [ 7196.186501] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:57 gaivota kernel: [ 7196.186505] vivi: vivi_poll
Apr  8 15:30:57 gaivota kernel: [ 7196.199856] vivi: vivi_sleep dma_q=0xffff81005b381ce0
Apr  8 15:30:57 gaivota kernel: [ 7196.199864] vivi: Thread tick
Apr  8 15:30:57 gaivota kernel: [ 7196.208030] vivi: vivifill at 00:00:00:135: Buffer 0xffff810021a7b000 size= 614400
Apr  8 15:30:57 gaivota kernel: [ 7196.208035] vivi: filled buffer ffff810076cc5600
Apr  8 15:30:57 gaivota kernel: [ 7196.208040] vivi: [ffff810076cc5600/0] wakeup
Apr  8 15:30:57 gaivota kernel: [ 7196.208232] vivi: vivi_poll
Apr  8 15:30:57 gaivota kernel: [ 7196.208244] vbuf: dqbuf: state is done
Apr  8 15:30:57 gaivota kernel: [ 7196.208247] vivi (0): v4l2 ioctl VIDIOC_DQBUF, dir=rw (0xc0585611)
Apr  8 15:30:57 gaivota kernel: [ 7196.208254] vivi (0): 335466:30:57.00951648 index=0, type=video-cap, bytesused=614400, flags=0x00000001, field=4, sequence=1, memory=mmap, offset/userptr=0x00000000, length=614400
Apr  8 15:30:57 gaivota kernel: [ 7196.208259] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:57 gaivota kernel: [ 7196.208279] vbuf: qbuf: requesting next field
Apr  8 15:30:57 gaivota kernel: [ 7196.208282] vivi: buffer_prepare, field=4
Apr  8 15:30:57 gaivota kernel: [ 7196.208284] vivi: buffer_queue
Apr  8 15:30:57 gaivota kernel: [ 7196.208286] vbuf: qbuf: succeded
Apr  8 15:30:57 gaivota kernel: [ 7196.208289] vivi (0): v4l2 ioctl VIDIOC_QBUF, dir=rw (0xc058560f)
Apr  8 15:30:57 gaivota kernel: [ 7196.208295] vivi (0): 335466:30:57.00951648 index=0, type=video-cap, bytesused=614400, flags=0x00000001, field=4, sequence=1, memory=mmap, offset/userptr=0x00000000, length=614400
Apr  8 15:30:57 gaivota kernel: [ 7196.208300] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:57 gaivota kernel: [ 7196.208304] vivi (0): v4l2 ioctl VIDIOC_STREAMOFF, dir=-w (0x40045613)
Apr  8 15:30:57 gaivota kernel: [ 7196.208307] vivi (0): type=video-cap
Apr  8 15:30:57 gaivota kernel: [ 7196.208312] vivi: buffer_release
Apr  8 15:30:57 gaivota kernel: [ 7196.208315] vivi: free_buffer, state: 5
Apr  8 15:30:57 gaivota kernel: [ 7196.208316] vivi: free_buffer: freed
Apr  8 15:30:57 gaivota kernel: [ 7196.208318] vivi: buffer_release
Apr  8 15:30:57 gaivota kernel: [ 7196.208320] vivi: free_buffer, state: 5
Apr  8 15:30:57 gaivota kernel: [ 7196.208322] vivi: free_buffer: freed
Apr  8 15:30:57 gaivota kernel: [ 7196.208324] vivi: buffer_release
Apr  8 15:30:57 gaivota kernel: [ 7196.208326] vivi: free_buffer, state: 5
Apr  8 15:30:57 gaivota kernel: [ 7196.208328] vivi: free_buffer: freed
Apr  8 15:30:57 gaivota kernel: [ 7196.208330] vivi: buffer_release
Apr  8 15:30:57 gaivota kernel: [ 7196.208332] vivi: free_buffer, state: 5
Apr  8 15:30:57 gaivota kernel: [ 7196.208334] vivi: free_buffer: freed
Apr  8 15:30:57 gaivota kernel: [ 7196.208406] vbuf-vmalloc: munmap ffff81005b3eedc0 q=ffff8100729bcc18
Apr  8 15:30:57 gaivota kernel: [ 7196.208521] vbuf-vmalloc: munmap ffff81005b2f8640 q=ffff8100729bcc18
Apr  8 15:30:57 gaivota kernel: [ 7196.208616] vbuf-vmalloc: munmap ffff81005b2f8700 q=ffff8100729bcc18
Apr  8 15:30:57 gaivota kernel: [ 7196.208722] vbuf-vmalloc: munmap ffff81005b2f8720 q=ffff8100729bcc18
Apr  8 15:30:57 gaivota kernel: [ 7196.208784] vivi (0): v4l2 ioctl VIDIOC_QUERYCAP, dir=r- (0x80685600)
Apr  8 15:30:57 gaivota kernel: [ 7196.208789] vivi (0): driver=vivi, card=vivi, bus=, version=0x00000400, capabilities=0x05000001
Apr  8 15:30:57 gaivota kernel: [ 7196.208795] vivi (0): v4l2 ioctl VIDIOC_CROPCAP, dir=rw (0xc02c563a)
Apr  8 15:30:57 gaivota kernel: [ 7196.208801] vivi (0): v4l2 ioctl VIDIOC_S_FMT, dir=rw (0xc0d05605)
Apr  8 15:30:57 gaivota kernel: [ 7196.208805] vivi (0): type=video-cap
Apr  8 15:30:57 gaivota kernel: [ 7196.208808] vivi (0): width=640, height=480, format=YUYV, field=interlaced, bytesperline=0 sizeimage=0, colorspace=0
Apr  8 15:30:57 gaivota kernel: [ 7196.208815] vivi: buffer_setup, count=4, size=614400
Apr  8 15:30:57 gaivota kernel: [ 7196.208818] vbuf: reqbufs: bufs=4, size=0x96000 [600 pages total]
Apr  8 15:30:57 gaivota kernel: [ 7196.208820] vbuf: __videobuf_mmap_setup called
Apr  8 15:30:57 gaivota kernel: [ 7196.208823] vbuf-vmalloc: __videobuf_mmap_free
Apr  8 15:30:57 gaivota kernel: [ 7196.208825] vivi: buffer_release
Apr  8 15:30:57 gaivota kernel: [ 7196.208827] vivi: free_buffer, state: 0
Apr  8 15:30:57 gaivota kernel: [ 7196.208829] vivi: free_buffer: freed
Apr  8 15:30:57 gaivota kernel: [ 7196.208831] vivi: buffer_release
Apr  8 15:30:57 gaivota kernel: [ 7196.208833] vivi: free_buffer, state: 0
Apr  8 15:30:57 gaivota kernel: [ 7196.208835] vivi: free_buffer: freed
Apr  8 15:30:57 gaivota kernel: [ 7196.208837] vivi: buffer_release
Apr  8 15:30:57 gaivota kernel: [ 7196.208839] vivi: free_buffer, state: 0
Apr  8 15:30:57 gaivota kernel: [ 7196.208841] vivi: free_buffer: freed
Apr  8 15:30:57 gaivota kernel: [ 7196.208843] vivi: buffer_release
Apr  8 15:30:57 gaivota kernel: [ 7196.208844] vivi: free_buffer, state: 0
Apr  8 15:30:57 gaivota kernel: [ 7196.208846] vivi: free_buffer: freed
Apr  8 15:30:57 gaivota kernel: [ 7196.208850] vbuf-vmalloc: __videobuf_alloc: allocated at ffff8100593fb000(232+8) & ffff8100593fb0f0(24)
Apr  8 15:30:57 gaivota kernel: [ 7196.208855] vbuf-vmalloc: __videobuf_alloc: allocated at ffff8100771fac00(232+8) & ffff8100771facf0(24)
Apr  8 15:30:57 gaivota kernel: [ 7196.208859] vbuf-vmalloc: __videobuf_alloc: allocated at ffff810077012c00(232+8) & ffff810077012cf0(24)
Apr  8 15:30:57 gaivota kernel: [ 7196.208863] vbuf-vmalloc: __videobuf_alloc: allocated at ffff810076cc5600(232+8) & ffff810076cc56f0(24)
Apr  8 15:30:57 gaivota kernel: [ 7196.208867] vbuf: mmap setup: 4 buffers, 614400 bytes each
Apr  8 15:30:57 gaivota kernel: [ 7196.208869] vivi (0): v4l2 ioctl VIDIOC_REQBUFS, dir=rw (0xc0145608)
Apr  8 15:30:57 gaivota kernel: [ 7196.208872] vivi (0): count=4, type=video-cap, memory=mmap
Apr  8 15:30:57 gaivota kernel: [ 7196.208877] vivi (0): v4l2 ioctl VIDIOC_QUERYBUF, dir=rw (0xc0585609)
Apr  8 15:30:57 gaivota kernel: [ 7196.208882] vivi (0): 00:00:00.00000000 index=0, type=video-cap, bytesused=0, flags=0x00000000, field=0, sequence=0, memory=mmap, offset/userptr=0x00000000, length=614400
Apr  8 15:30:57 gaivota kernel: [ 7196.208887] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:57 gaivota kernel: [ 7196.208896] vivi: mmap called, vma=0xffff81006194dbb8
Apr  8 15:30:57 gaivota kernel: [ 7196.208899] vbuf-vmalloc: __videobuf_mmap_mapper
Apr  8 15:30:57 gaivota kernel: [ 7196.209248] vbuf-vmalloc: vmalloc is at addr ffffc20001418000 (614400 pages)
Apr  8 15:30:58 gaivota kernel: [ 7196.209324] vbuf-vmalloc: mmap ffff81005b2f8720: q=ffff8100729bcc18 2b021bf6b000-2b021c001000 (96000) pgoff 00000000 buf 0
Apr  8 15:30:58 gaivota kernel: [ 7196.209329] vivi: vma start=0x2b021bf6b000, size=614400, ret=0
Apr  8 15:30:58 gaivota kernel: [ 7196.209339] vivi (0): v4l2 ioctl VIDIOC_QUERYBUF, dir=rw (0xc0585609)
Apr  8 15:30:58 gaivota kernel: [ 7196.209345] vivi (0): 00:00:00.00000000 index=1, type=video-cap, bytesused=0, flags=0x00000000, field=0, sequence=0, memory=mmap, offset/userptr=0x00096000, length=614400
Apr  8 15:30:58 gaivota kernel: [ 7196.209350] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:58 gaivota kernel: [ 7196.209356] vivi: mmap called, vma=0xffff810065068c60
Apr  8 15:30:58 gaivota kernel: [ 7196.209359] vbuf-vmalloc: __videobuf_mmap_mapper
Apr  8 15:30:58 gaivota kernel: [ 7196.209783] vbuf-vmalloc: vmalloc is at addr ffffc200014af000 (614400 pages)
Apr  8 15:30:58 gaivota kernel: [ 7196.209882] vbuf-vmalloc: mmap ffff81005b2f8700: q=ffff8100729bcc18 2b021c001000-2b021c097000 (96000) pgoff 00000096 buf 1
Apr  8 15:30:58 gaivota kernel: [ 7196.209886] vivi: vma start=0x2b021c001000, size=614400, ret=0
Apr  8 15:30:58 gaivota kernel: [ 7196.209894] vivi (0): v4l2 ioctl VIDIOC_QUERYBUF, dir=rw (0xc0585609)
Apr  8 15:30:58 gaivota kernel: [ 7196.209900] vivi (0): 00:00:00.00000000 index=2, type=video-cap, bytesused=0, flags=0x00000000, field=0, sequence=0, memory=mmap, offset/userptr=0x0012c000, length=614400
Apr  8 15:30:58 gaivota kernel: [ 7196.209905] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:58 gaivota kernel: [ 7196.209910] vivi: mmap called, vma=0xffff810061b463d8
Apr  8 15:30:58 gaivota kernel: [ 7196.209913] vbuf-vmalloc: __videobuf_mmap_mapper
Apr  8 15:30:58 gaivota kernel: [ 7196.210310] vbuf-vmalloc: vmalloc is at addr ffffc20001546000 (614400 pages)
Apr  8 15:30:58 gaivota kernel: [ 7196.210387] vbuf-vmalloc: mmap ffff81005b2f8640: q=ffff8100729bcc18 2b021c097000-2b021c12d000 (96000) pgoff 0000012c buf 2
Apr  8 15:30:58 gaivota kernel: [ 7196.210391] vivi: vma start=0x2b021c097000, size=614400, ret=0
Apr  8 15:30:58 gaivota kernel: [ 7196.210399] vivi (0): v4l2 ioctl VIDIOC_QUERYBUF, dir=rw (0xc0585609)
Apr  8 15:30:58 gaivota kernel: [ 7196.210405] vivi (0): 00:00:00.00000000 index=3, type=video-cap, bytesused=0, flags=0x00000000, field=0, sequence=0, memory=mmap, offset/userptr=0x001c2000, length=614400
Apr  8 15:30:58 gaivota kernel: [ 7196.210410] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:58 gaivota kernel: [ 7196.210418] vivi: mmap called, vma=0xffff81006180e288
Apr  8 15:30:58 gaivota kernel: [ 7196.210420] vbuf-vmalloc: __videobuf_mmap_mapper
Apr  8 15:30:58 gaivota kernel: [ 7196.210819] vbuf-vmalloc: vmalloc is at addr ffffc200015dd000 (614400 pages)
Apr  8 15:30:58 gaivota kernel: [ 7196.210898] vbuf-vmalloc: mmap ffff81005b3eedc0: q=ffff8100729bcc18 2b021c4bf000-2b021c555000 (96000) pgoff 000001c2 buf 3
Apr  8 15:30:58 gaivota kernel: [ 7196.210902] vivi: vma start=0x2b021c4bf000, size=614400, ret=0
Apr  8 15:30:58 gaivota kernel: [ 7196.210911] vbuf: qbuf: requesting next field
Apr  8 15:30:58 gaivota kernel: [ 7196.210914] vivi: buffer_prepare, field=4
Apr  8 15:30:58 gaivota kernel: [ 7196.210917] vbuf-vmalloc: __videobuf_iolock memory method MMAP
Apr  8 15:30:58 gaivota kernel: [ 7196.210919] vbuf: qbuf: succeded
Apr  8 15:30:58 gaivota kernel: [ 7196.210922] vivi (0): v4l2 ioctl VIDIOC_QBUF, dir=rw (0xc058560f)
Apr  8 15:30:58 gaivota kernel: [ 7196.210928] vivi (0): 00:00:00.00000000 index=0, type=video-cap, bytesused=0, flags=0x00000000, field=0, sequence=0, memory=mmap, offset/userptr=0x00000000, length=0
Apr  8 15:30:58 gaivota kernel: [ 7196.210933] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:58 gaivota kernel: [ 7196.210937] vbuf: qbuf: requesting next field
Apr  8 15:30:58 gaivota kernel: [ 7196.210940] vivi: buffer_prepare, field=4
Apr  8 15:30:58 gaivota kernel: [ 7196.210942] vbuf-vmalloc: __videobuf_iolock memory method MMAP
Apr  8 15:30:58 gaivota kernel: [ 7196.210944] vbuf: qbuf: succeded
Apr  8 15:30:58 gaivota kernel: [ 7196.210946] vivi (0): v4l2 ioctl VIDIOC_QBUF, dir=rw (0xc058560f)
Apr  8 15:30:58 gaivota kernel: [ 7196.210951] vivi (0): 00:00:00.00000000 index=1, type=video-cap, bytesused=0, flags=0x00000000, field=0, sequence=0, memory=mmap, offset/userptr=0x00000000, length=0
Apr  8 15:30:58 gaivota kernel: [ 7196.210956] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:58 gaivota kernel: [ 7196.210960] vbuf: qbuf: requesting next field
Apr  8 15:30:58 gaivota kernel: [ 7196.210962] vivi: buffer_prepare, field=4
Apr  8 15:30:58 gaivota kernel: [ 7196.210965] vbuf-vmalloc: __videobuf_iolock memory method MMAP
Apr  8 15:30:58 gaivota kernel: [ 7196.210967] vbuf: qbuf: succeded
Apr  8 15:30:58 gaivota kernel: [ 7196.210969] vivi (0): v4l2 ioctl VIDIOC_QBUF, dir=rw (0xc058560f)
Apr  8 15:30:58 gaivota kernel: [ 7196.210974] vivi (0): 00:00:00.00000000 index=2, type=video-cap, bytesused=0, flags=0x00000000, field=0, sequence=0, memory=mmap, offset/userptr=0x00000000, length=0
Apr  8 15:30:58 gaivota kernel: [ 7196.210979] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:58 gaivota kernel: [ 7196.210983] vbuf: qbuf: requesting next field
Apr  8 15:30:58 gaivota kernel: [ 7196.210985] vivi: buffer_prepare, field=4
Apr  8 15:30:58 gaivota kernel: [ 7196.210987] vbuf-vmalloc: __videobuf_iolock memory method MMAP
Apr  8 15:30:58 gaivota kernel: [ 7196.210989] vbuf: qbuf: succeded
Apr  8 15:30:58 gaivota kernel: [ 7196.210991] vivi (0): v4l2 ioctl VIDIOC_QBUF, dir=rw (0xc058560f)
Apr  8 15:30:58 gaivota kernel: [ 7196.210996] vivi (0): 00:00:00.00000000 index=3, type=video-cap, bytesused=0, flags=0x00000000, field=0, sequence=0, memory=mmap, offset/userptr=0x00000000, length=0
Apr  8 15:30:58 gaivota kernel: [ 7196.211001] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:58 gaivota kernel: [ 7196.211005] vivi (0): v4l2 ioctl VIDIOC_STREAMON, dir=-w (0x40045612)
Apr  8 15:30:58 gaivota kernel: [ 7196.211009] vivi (0): type=video-cap
Apr  8 15:30:58 gaivota kernel: [ 7196.211011] vivi: buffer_queue
Apr  8 15:30:58 gaivota kernel: [ 7196.211013] vivi: buffer_queue
Apr  8 15:30:58 gaivota kernel: [ 7196.211015] vivi: buffer_queue
Apr  8 15:30:58 gaivota kernel: [ 7196.211017] vivi: buffer_queue
Apr  8 15:30:58 gaivota kernel: [ 7196.211022] vivi: vivi_poll
Apr  8 15:30:58 gaivota kernel: [ 7196.221479] vivi: vivi_sleep dma_q=0xffff81005b381ce0
Apr  8 15:30:58 gaivota kernel: [ 7196.221483] vivi: Thread tick
Apr  8 15:30:58 gaivota kernel: [ 7196.229653] vivi: vivifill at 00:00:00:168: Buffer 0xffff810021a7b000 size= 614400
Apr  8 15:30:58 gaivota kernel: [ 7196.229659] vivi: filled buffer ffff8100593fb000
Apr  8 15:30:58 gaivota kernel: [ 7196.229665] vivi: [ffff8100593fb000/0] wakeup
Apr  8 15:30:58 gaivota kernel: [ 7196.230433] vivi: vivi_poll
Apr  8 15:30:58 gaivota kernel: [ 7196.230447] vbuf: dqbuf: state is done
Apr  8 15:30:58 gaivota kernel: [ 7196.230450] vivi (0): v4l2 ioctl VIDIOC_DQBUF, dir=rw (0xc0585611)
Apr  8 15:30:58 gaivota kernel: [ 7196.230458] vivi (0): 335466:30:57.00994933 index=0, type=video-cap, bytesused=614400, flags=0x00000001, field=4, sequence=0, memory=mmap, offset/userptr=0x00000000, length=614400
Apr  8 15:30:58 gaivota kernel: [ 7196.230463] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:58 gaivota kernel: [ 7196.230483] vbuf: qbuf: requesting next field
Apr  8 15:30:58 gaivota kernel: [ 7196.230485] vivi: buffer_prepare, field=4
Apr  8 15:30:58 gaivota kernel: [ 7196.230488] vivi: buffer_queue
Apr  8 15:30:58 gaivota kernel: [ 7196.230490] vbuf: qbuf: succeded
Apr  8 15:30:58 gaivota kernel: [ 7196.230493] vivi (0): v4l2 ioctl VIDIOC_QBUF, dir=rw (0xc058560f)
Apr  8 15:30:58 gaivota kernel: [ 7196.230499] vivi (0): 335466:30:57.00994933 index=0, type=video-cap, bytesused=614400, flags=0x00000001, field=4, sequence=0, memory=mmap, offset/userptr=0x00000000, length=614400
Apr  8 15:30:58 gaivota kernel: [ 7196.230504] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:58 gaivota kernel: [ 7196.230509] vivi: vivi_poll
Apr  8 15:30:58 gaivota kernel: [ 7196.243117] vivi: vivi_sleep dma_q=0xffff81005b381ce0
Apr  8 15:30:58 gaivota kernel: [ 7196.243122] vivi: Thread tick
Apr  8 15:30:58 gaivota kernel: [ 7196.251283] vivi: vivifill at 00:00:00:201: Buffer 0xffff810021a7b000 size= 614400
Apr  8 15:30:58 gaivota kernel: [ 7196.251287] vivi: filled buffer ffff8100771fac00
Apr  8 15:30:58 gaivota kernel: [ 7196.251293] vivi: [ffff8100771fac00/1] wakeup
Apr  8 15:30:58 gaivota kernel: [ 7196.251316] vivi: vivi_poll
Apr  8 15:30:58 gaivota kernel: [ 7196.251517] vbuf: dqbuf: state is done
Apr  8 15:30:58 gaivota kernel: [ 7196.251520] vivi (0): v4l2 ioctl VIDIOC_DQBUF, dir=rw (0xc0585611)
Apr  8 15:30:58 gaivota kernel: [ 7196.251527] vivi (0): 335466:30:58.00038228 index=1, type=video-cap, bytesused=614400, flags=0x00000001, field=4, sequence=0, memory=mmap, offset/userptr=0x00096000, length=614400
Apr  8 15:30:58 gaivota kernel: [ 7196.251532] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:58 gaivota kernel: [ 7196.251551] vbuf: qbuf: requesting next field
Apr  8 15:30:58 gaivota kernel: [ 7196.251553] vivi: buffer_prepare, field=4
Apr  8 15:30:58 gaivota kernel: [ 7196.251556] vivi: buffer_queue
Apr  8 15:30:58 gaivota kernel: [ 7196.251558] vbuf: qbuf: succeded
Apr  8 15:30:58 gaivota kernel: [ 7196.251561] vivi (0): v4l2 ioctl VIDIOC_QBUF, dir=rw (0xc058560f)
Apr  8 15:30:58 gaivota kernel: [ 7196.251566] vivi (0): 335466:30:58.00038228 index=1, type=video-cap, bytesused=614400, flags=0x00000001, field=4, sequence=0, memory=mmap, offset/userptr=0x00096000, length=614400
Apr  8 15:30:58 gaivota kernel: [ 7196.251571] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:58 gaivota kernel: [ 7196.251576] vivi: vivi_poll
Apr  8 15:30:58 gaivota kernel: [ 7196.264846] vivi: vivi_sleep dma_q=0xffff81005b381ce0
Apr  8 15:30:58 gaivota kernel: [ 7196.264854] vivi: Thread tick
Apr  8 15:30:58 gaivota kernel: [ 7196.273023] vivi: vivifill at 00:00:00:234: Buffer 0xffff810021a7b000 size= 614400
Apr  8 15:30:58 gaivota kernel: [ 7196.273028] vivi: filled buffer ffff810077012c00
Apr  8 15:30:58 gaivota kernel: [ 7196.273034] vivi: [ffff810077012c00/2] wakeup
Apr  8 15:30:58 gaivota kernel: [ 7196.273878] vivi: vivi_poll
Apr  8 15:30:58 gaivota kernel: [ 7196.273893] vbuf: dqbuf: state is done
Apr  8 15:30:58 gaivota kernel: [ 7196.273896] vivi (0): v4l2 ioctl VIDIOC_DQBUF, dir=rw (0xc0585611)
Apr  8 15:30:58 gaivota kernel: [ 7196.273904] vivi (0): 335466:30:58.00081747 index=2, type=video-cap, bytesused=614400, flags=0x00000001, field=4, sequence=0, memory=mmap, offset/userptr=0x0012c000, length=614400
Apr  8 15:30:58 gaivota kernel: [ 7196.273909] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:58 gaivota kernel: [ 7196.273929] vbuf: qbuf: requesting next field
Apr  8 15:30:58 gaivota kernel: [ 7196.273931] vivi: buffer_prepare, field=4
Apr  8 15:30:58 gaivota kernel: [ 7196.273934] vivi: buffer_queue
Apr  8 15:30:58 gaivota kernel: [ 7196.273936] vbuf: qbuf: succeded
Apr  8 15:30:58 gaivota kernel: [ 7196.273939] vivi (0): v4l2 ioctl VIDIOC_QBUF, dir=rw (0xc058560f)
Apr  8 15:30:58 gaivota kernel: [ 7196.273945] vivi (0): 335466:30:58.00081747 index=2, type=video-cap, bytesused=614400, flags=0x00000001, field=4, sequence=0, memory=mmap, offset/userptr=0x0012c000, length=614400
Apr  8 15:30:58 gaivota kernel: [ 7196.273950] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:58 gaivota kernel: [ 7196.273955] vivi: vivi_poll
Apr  8 15:30:58 gaivota kernel: [ 7196.288073] vivi: vivi_sleep dma_q=0xffff81005b381ce0
Apr  8 15:30:58 gaivota kernel: [ 7196.288081] vivi: Thread tick
Apr  8 15:30:58 gaivota kernel: [ 7196.296246] vivi: vivifill at 00:00:00:267: Buffer 0xffff810021a7b000 size= 614400
Apr  8 15:30:58 gaivota kernel: [ 7196.296252] vivi: filled buffer ffff810076cc5600
Apr  8 15:30:58 gaivota kernel: [ 7196.296257] vivi: [ffff810076cc5600/3] wakeup
Apr  8 15:30:58 gaivota kernel: [ 7196.296452] vivi: vivi_poll
Apr  8 15:30:58 gaivota kernel: [ 7196.296465] vbuf: dqbuf: state is done
Apr  8 15:30:58 gaivota kernel: [ 7196.296468] vivi (0): v4l2 ioctl VIDIOC_DQBUF, dir=rw (0xc0585611)
Apr  8 15:30:58 gaivota kernel: [ 7196.296475] vivi (0): 335466:30:58.00128232 index=3, type=video-cap, bytesused=614400, flags=0x00000001, field=4, sequence=0, memory=mmap, offset/userptr=0x001c2000, length=614400
Apr  8 15:30:58 gaivota kernel: [ 7196.296480] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:58 gaivota kernel: [ 7196.296501] vbuf: qbuf: requesting next field
Apr  8 15:30:58 gaivota kernel: [ 7196.296504] vivi: buffer_prepare, field=4
Apr  8 15:30:58 gaivota kernel: [ 7196.296506] vivi: buffer_queue
Apr  8 15:30:58 gaivota kernel: [ 7196.296508] vbuf: qbuf: succeded
Apr  8 15:30:58 gaivota kernel: [ 7196.296511] vivi (0): v4l2 ioctl VIDIOC_QBUF, dir=rw (0xc058560f)
Apr  8 15:30:58 gaivota kernel: [ 7196.296517] vivi (0): 335466:30:58.00128232 index=3, type=video-cap, bytesused=614400, flags=0x00000001, field=4, sequence=0, memory=mmap, offset/userptr=0x001c2000, length=614400
Apr  8 15:30:58 gaivota kernel: [ 7196.296522] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:58 gaivota kernel: [ 7196.296526] vivi: vivi_poll
Apr  8 15:30:58 gaivota kernel: [ 7196.309725] vivi: vivi_sleep dma_q=0xffff81005b381ce0
Apr  8 15:30:58 gaivota kernel: [ 7196.309732] vivi: Thread tick
Apr  8 15:30:58 gaivota kernel: [ 7196.317897] vivi: vivifill at 00:00:00:300: Buffer 0xffff810021a7b000 size= 614400
Apr  8 15:30:58 gaivota kernel: [ 7196.317902] vivi: filled buffer ffff8100593fb000
Apr  8 15:30:58 gaivota kernel: [ 7196.317907] vivi: [ffff8100593fb000/0] wakeup
Apr  8 15:30:58 gaivota kernel: [ 7196.318045] vivi: vivi_poll
Apr  8 15:30:58 gaivota kernel: [ 7196.318060] vbuf: dqbuf: state is done
Apr  8 15:30:58 gaivota kernel: [ 7196.318063] vivi (0): v4l2 ioctl VIDIOC_DQBUF, dir=rw (0xc0585611)
Apr  8 15:30:58 gaivota kernel: [ 7196.318070] vivi (0): 335466:30:58.00171567 index=0, type=video-cap, bytesused=614400, flags=0x00000001, field=4, sequence=1, memory=mmap, offset/userptr=0x00000000, length=614400
Apr  8 15:30:58 gaivota kernel: [ 7196.318076] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:58 gaivota kernel: [ 7196.318097] vbuf: qbuf: requesting next field
Apr  8 15:30:58 gaivota kernel: [ 7196.318100] vivi: buffer_prepare, field=4
Apr  8 15:30:58 gaivota kernel: [ 7196.318102] vivi: buffer_queue
Apr  8 15:30:58 gaivota kernel: [ 7196.318104] vbuf: qbuf: succeded
Apr  8 15:30:58 gaivota kernel: [ 7196.318107] vivi (0): v4l2 ioctl VIDIOC_QBUF, dir=rw (0xc058560f)
Apr  8 15:30:58 gaivota kernel: [ 7196.318113] vivi (0): 335466:30:58.00171567 index=0, type=video-cap, bytesused=614400, flags=0x00000001, field=4, sequence=1, memory=mmap, offset/userptr=0x00000000, length=614400
Apr  8 15:30:58 gaivota kernel: [ 7196.318118] vivi (0): timecode= 00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
Apr  8 15:30:58 gaivota kernel: [ 7196.318122] vivi (0): v4l2 ioctl VIDIOC_STREAMOFF, dir=-w (0x40045613)
Apr  8 15:30:58 gaivota kernel: [ 7196.318126] vivi (0): type=video-cap
Apr  8 15:30:58 gaivota kernel: [ 7196.318131] vivi: buffer_release
Apr  8 15:30:58 gaivota kernel: [ 7196.318133] vivi: free_buffer, state: 5
Apr  8 15:30:58 gaivota kernel: [ 7196.318135] vivi: free_buffer: freed
Apr  8 15:30:58 gaivota kernel: [ 7196.318137] vivi: buffer_release
Apr  8 15:30:58 gaivota kernel: [ 7196.318139] vivi: free_buffer, state: 5
Apr  8 15:30:58 gaivota kernel: [ 7196.318141] vivi: free_buffer: freed
Apr  8 15:30:58 gaivota kernel: [ 7196.318143] vivi: buffer_release
Apr  8 15:30:58 gaivota kernel: [ 7196.318145] vivi: free_buffer, state: 5
Apr  8 15:30:58 gaivota kernel: [ 7196.318147] vivi: free_buffer: freed
Apr  8 15:30:58 gaivota kernel: [ 7196.318149] vivi: buffer_release
Apr  8 15:30:58 gaivota kernel: [ 7196.318151] vivi: free_buffer, state: 5
Apr  8 15:30:58 gaivota kernel: [ 7196.318153] vivi: free_buffer: freed
Apr  8 15:30:58 gaivota kernel: [ 7196.318208] vbuf-vmalloc: munmap ffff81005b2f8720 q=ffff8100729bcc18
Apr  8 15:30:58 gaivota kernel: [ 7196.318310] vbuf-vmalloc: munmap ffff81005b2f8700 q=ffff8100729bcc18
Apr  8 15:30:58 gaivota kernel: [ 7196.318422] vbuf-vmalloc: munmap ffff81005b2f8640 q=ffff8100729bcc18
Apr  8 15:30:58 gaivota kernel: [ 7196.318525] vbuf-vmalloc: munmap ffff81005b3eedc0 q=ffff8100729bcc18
Apr  8 15:30:58 gaivota kernel: [ 7196.318587] vivi: vivi_stop_thread
Apr  8 15:30:58 gaivota kernel: [ 7196.318932] vivi: thread: exit
Apr  8 15:30:58 gaivota kernel: [ 7196.318958] vbuf: videobuf_mmap_free called
Apr  8 15:30:58 gaivota kernel: [ 7196.318962] vbuf-vmalloc: __videobuf_mmap_free
Apr  8 15:30:58 gaivota kernel: [ 7196.318964] vivi: buffer_release
Apr  8 15:30:58 gaivota kernel: [ 7196.318966] vivi: free_buffer, state: 0
Apr  8 15:30:58 gaivota kernel: [ 7196.318968] vivi: free_buffer: freed
Apr  8 15:30:58 gaivota kernel: [ 7196.318970] vivi: buffer_release
Apr  8 15:30:58 gaivota kernel: [ 7196.318972] vivi: free_buffer, state: 0
Apr  8 15:30:58 gaivota kernel: [ 7196.318974] vivi: free_buffer: freed
Apr  8 15:30:58 gaivota kernel: [ 7196.318976] vivi: buffer_release
Apr  8 15:30:58 gaivota kernel: [ 7196.318978] vivi: free_buffer, state: 0
Apr  8 15:30:58 gaivota kernel: [ 7196.318980] vivi: free_buffer: freed
Apr  8 15:30:58 gaivota kernel: [ 7196.318982] vivi: buffer_release
Apr  8 15:30:58 gaivota kernel: [ 7196.318984] vivi: free_buffer, state: 0
Apr  8 15:30:58 gaivota kernel: [ 7196.318986] vivi: free_buffer: freed
Apr  8 15:30:58 gaivota kernel: [ 7196.318989] vivi: close called (minor=0, users=0)
Apr  8 15:30:57 gaivota kernel: [ 7196.208793] vivi (0): err:

[-- Attachment #3: diff_changes_for_vivi_testing.patch --]
[-- Type: text/x-patch, Size: 1374 bytes --]

diff -r 8ba4c2df2736 linux/drivers/media/video/videobuf-core.c
--- a/linux/drivers/media/video/videobuf-core.c	Tue Apr 08 13:36:56 2008 -0300
+++ b/linux/drivers/media/video/videobuf-core.c	Tue Apr 08 15:31:45 2008 -0300
@@ -314,6 +314,9 @@ int videobuf_mmap_free(struct videobuf_q
 int videobuf_mmap_free(struct videobuf_queue *q)
 {
 	int ret;
+
+	dprintk(1, "%s called\n", __func__);
+
 	mutex_lock(&q->vb_lock);
 	ret = __videobuf_mmap_free(q);
 	mutex_unlock(&q->vb_lock);
@@ -327,6 +330,8 @@ static int __videobuf_mmap_setup(struct 
 {
 	unsigned int i;
 	int err;
+
+	dprintk(1, "%s called\n", __func__);
 
 	MAGIC_CHECK(q->int_ops->magic, MAGIC_QTYPE_OPS);
 
diff -r 8ba4c2df2736 v4l2-apps/test/capture_example.c
--- a/v4l2-apps/test/capture_example.c	Tue Apr 08 13:36:56 2008 -0300
+++ b/v4l2-apps/test/capture_example.c	Tue Apr 08 15:31:45 2008 -0300
@@ -178,12 +178,8 @@ read_frame                      (void)
 }
 
 static void
-mainloop                        (void)
+mainloop                        (int count)
 {
-	unsigned int count;
-
-	count = 1000;
-
 	while (count-- > 0) {
 		for (;;) {
 			fd_set fds;
@@ -670,7 +666,17 @@ main                            (int    
 
 	start_capturing ();
 
-	mainloop ();
+	mainloop (5);
+
+	stop_capturing ();
+
+	uninit_device ();
+
+	init_device ();
+
+	start_capturing ();
+
+	mainloop (5);
 
 	stop_capturing ();
 

[-- Attachment #4: Type: text/plain, Size: 164 bytes --]

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

  parent reply	other threads:[~2008-04-08 18:41 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-28 10:18 [PATCH 0 of 9] videobuf fixes Brandon Philips
2008-03-28 10:18 ` [PATCH 1 of 9] soc_camera: Introduce a spinlock for use with videobuf Brandon Philips
2008-03-28 20:53   ` Guennadi Liakhovetski
2008-03-29  3:59     ` Brandon Philips
2008-04-04 13:46       ` [PATCH] soc-camera: use a spinlock for videobuffer queue Guennadi Liakhovetski
2008-04-04 20:17         ` Brandon Philips
2008-03-28 10:18 ` [PATCH 2 of 9] videobuf: Require spinlocks for all videobuf users Brandon Philips
2008-03-28 10:18 ` [PATCH 3 of 9] videobuf: Wakeup queues after changing the state to ERROR Brandon Philips
2008-03-28 10:18 ` [PATCH 4 of 9] videobuf: Simplify videobuf_waiton logic and possibly avoid missed wakeup Brandon Philips
2008-03-28 10:18 ` [PATCH 5 of 9] videobuf-vmalloc.c: Remove buf_release from videobuf_vm_close Brandon Philips
2008-03-28 10:18 ` [PATCH 6 of 9] videobuf-vmalloc.c: Fix hack of postponing mmap on remap failure Brandon Philips
     [not found]   ` <20080405131236.7c083554@gaivota>
     [not found]     ` <20080406080011.GA3596@plankton.ifup.org>
     [not found]       ` <20080407183226.703217fc@gaivota>
     [not found]         ` <20080408152238.GA8438@plankton.public.utexas.edu>
2008-04-08 18:40           ` Mauro Carvalho Chehab [this message]
     [not found]             ` <c8b4dbe10804081306xb1e8f91q64d1e6d18d3d2531@mail.gmail.com>
2008-04-08 20:50               ` Mauro Carvalho Chehab
     [not found]                 ` <c8b4dbe10804090626l6b2b10d9p1c22e02dfe2850fe@mail.gmail.com>
2008-04-09 20:42                   ` Mauro Carvalho Chehab
     [not found]             ` <20080408204514.GA6844@plankton.public.utexas.edu>
2008-04-08 21:37               ` Mauro Carvalho Chehab
     [not found]                 ` <20080415021558.GA22068@plankton.ifup.org>
2008-04-15 14:10                   ` Mauro Carvalho Chehab
2008-03-28 10:18 ` [PATCH 7 of 9] vivi: Simplify the vivi driver and avoid deadlocks Brandon Philips
2008-03-28 18:34   ` Mauro Carvalho Chehab
2008-03-29  5:35     ` Brandon Philips
2008-03-31 19:35       ` Mauro Carvalho Chehab
2008-03-28 10:18 ` [PATCH 8 of 9] videobuf: Avoid deadlock with QBUF and bring up to spec for empty queue Brandon Philips
2008-03-28 10:18 ` [PATCH 9 of 9] videobuf-dma-sg.c: Avoid NULL dereference and add comment about backwards compatibility Brandon Philips
2008-03-28 19:09 ` [PATCH 0 of 9] videobuf fixes Mauro Carvalho Chehab
2008-03-29  5:25   ` Brandon Philips
2008-03-29 22:49     ` Vanessa Ezekowitz
2008-03-31 18:35     ` Mauro Carvalho Chehab
2008-03-31 19:26       ` Brandon Philips
2008-03-31 21:31         ` Mauro Carvalho Chehab
2008-04-01  3:11           ` Brandon Philips
2008-04-01 20:49             ` Mauro Carvalho Chehab
2008-04-02 18:54               ` Brandon Philips
2008-04-02 20:06                 ` Mauro Carvalho Chehab
2008-04-02 18:56               ` Brandon Philips

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080408154046.36766131@gaivota \
    --to=mchehab@infradead.org \
    --cc=bphilips@suse.de \
    --cc=video4linux-list@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox