Em Wednesday 23 April 2008 00:01:14 Herton Ronaldo Krzesinski escreveu:
> Em Monday 21 April 2008 18:14:52 Laurent Pinchart escreveu:
> > Hi everybody,
> >
> > Alan Stern was kind enough to write a fix a few weeks ago for a video
> > streaming issue that some of you encountered.
> >
> > In order to get the fix included in 2.6.26, David Brownell would like to
> > know if the Linux UVC driver still suffers from the problem when used
> > with 2.6.25 *without* the patch.
> >
> > Could you please be kind enough to test 2.6.25 and report results ?
>
> I was testing today with a stock 2.6.25 without the patch and got no
> problems. So may be another thing fixed it. If I encounter any problem I'll
> report.

Hmm, I got the same problem now with stock 2.6.25. I discovered that the 
problem is only reproducible when you lower UVC_MAX_ISO_PACKETS in the 
sources, at least here. I was trying to avoid page allocation failures in 
another machine lowering from 40 to 8 (after reading 
http://article.gmane.org/gmane.linux.drivers.uvc.devel/1956), I didn't had 
time to investigate more so was forgotten:

uvcvideo: device USB2.0 Camera requested null bandwidth, defaulting to lowest.
kopete: page allocation failure. order:5, mode:0x0
Pid: 6996, comm: kopete Not tainted 2.6.24.4-desktop-2mdvoem #1
 [<c010645a>] show_trace_log_lvl+0x1a/0x30
 [<c0106ec2>] show_trace+0x12/0x20
 [<c010794c>] dump_stack+0x6c/0x80
 [<c016e5a8>] __alloc_pages+0x278/0x360
 [<c016e6df>] __get_free_pages+0x4f/0x60
 [<c010a25a>] dma_alloc_coherent+0xba/0x110
 [<ccdd7a17>] hcd_buffer_alloc+0x47/0x80 [usbcore]
 [<ccdcd335>] usb_buffer_alloc+0x25/0x30 [usbcore]
 [<ccf59bf8>] uvc_init_video+0x158/0x3b0 [uvcvideo]
 [<ccf59e9a>] uvc_video_enable+0x4a/0x50 [uvcvideo]
 [<ccf59229>] uvc_v4l2_do_ioctl+0x999/0xfb0 [uvcvideo]
 [<ccf40283>] video_usercopy+0xc3/0x230 [videodev]
 [<ccf58263>] uvc_v4l2_ioctl+0x43/0x50 [uvcvideo]
 [<c019a578>] do_ioctl+0x88/0xa0
 [<c019a7af>] vfs_ioctl+0x21f/0x2a0
 [<c019a883>] sys_ioctl+0x53/0x70
 [<c010532e>] sysenter_past_esp+0x6b/0xa1
 =======================
Mem-info:
DMA per-cpu:
CPU    0: Hot: hi:    0, btch:   1 usd:   0   Cold: hi:    0, btch:   1 usd:   
0
CPU    1: Hot: hi:    0, btch:   1 usd:   0   Cold: hi:    0, btch:   1 usd:   
0
Normal per-cpu:
CPU    0: Hot: hi:   42, btch:   7 usd:  33   Cold: hi:   14, btch:   3 usd:  
13
CPU    1: Hot: hi:   42, btch:   7 usd:  40   Cold: hi:   14, btch:   3 usd:  
12
Active:30836 inactive:8955 dirty:0 writeback:0 unstable:0
 free:528 slab:3006 mapped:12950 pagetables:371 bounce:0
DMA free:836kB min:144kB low:180kB high:216kB active:9980kB inactive:1260kB 
present:16256kB pages_scanned:65 all_unreclaimable? no
lowmem_reserve[]: 0 173 173 173
Normal free:1276kB min:1608kB low:2008kB high:2412kB active:113364kB 
inactive:34560kB present:177292kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
DMA: 9*4kB 0*8kB 1*16kB 1*32kB 0*64kB 0*128kB 1*256kB 1*512kB 0*1024kB 
0*2048kB 0*4096kB = 852kB
Normal: 30*4kB 4*8kB 0*16kB 0*32kB 0*64kB 1*128kB 0*256kB 0*512kB 1*1024kB 
0*2048kB 0*4096kB = 1304kB
Swap cache: add 0, delete 0, find 0/0, race 0+0
Free swap  = 1084348kB
Total swap = 1084348kB
Free swap:       1084348kB
48768 pages of RAM
0 pages of HIGHMEM
1454 reserved pages
58649 pages shared
0 pages swap cached
0 pages dirty
0 pages writeback
12950 pages mapped
3006 pages slab
371 pages pagetableS

Without lowering UVC_MAX_ISO_PACKETS I get the above in one machine (it has 
indeed not much main memory, it's a notebook where free reports 184MB, main 
memory is shared with onboard video it seems). But recently I saw streaming 
issues after lowering it in another webcam, so I'm not using this anymore for 
every machine, then I didn't catch too the -45 errors anymore, now I finally 
discovered what was happening.

So may be we have two bugs here then:
- Memory allocation in uvcvideo doesn't work for all cases, urb allocation 
should be revisited or is it ok?
- -45 errors are hidden and only reproducible in some hardware or when 
lowering UVC_MAX_ISO_PACKETS with some hardware combination (here only one 
machine showed -45 errors with UVC_MAX_ISO_PACKETS lowered until now).

>
> > Best regards,
> >
> > Laurent Pinchart
> >
> > ----------  Forwarded Message  ----------
> >
> > Subject: Re: ehci-hcd issue with webcam / uvcvideo driver
> > Date: Monday 21 April 2008
> > From: Alan Stern <[EMAIL PROTECTED]>
> > To: Laurent Pinchart <[EMAIL PROTECTED]>
> >
> > On Mon, 21 Apr 2008, Laurent Pinchart wrote:
> > > > Below is an updated version of the patch.  If you can, replace the
> > > > earlier version with this one and give it some good stress testing.
> > > > If everything works okay, I'll submit it for inclusion in the
> > > > official kernel.
> > >
> > > I've received several reports from people who tested your patch with
> > > the Linux UVC driver. They were all positive, the patch fixed their
> > > problem and introduced no regression they noticed. Could the patch be
> > > scheduled for 2.6.26 ?
> >
> > Dave had some questions, in particular, whether your testers still
> > encounter problems when running 2.6.25 without the patch.  It would be
> > nice to know the answer, either way.
> >
> > (IMO the patch ought to be merged even if the problems are no longer
> > present, because what it does is basically correct.  There may be a
> > detail or two I missed -- it always helps to have someone else review
> > changes like this -- but on the whole the idea is right.)
> >
> > For reference, the current version of the patch is below.
> >
> > Alan Stern
>
> --
> []'s
> Herton

-- 
[]'s
Herton
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to