Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-20 Thread Arnd Bergmann
On Tuesday 16 November 2010, Hans Verkuil wrote: > No, it will also affect e.g. two bttv cards that you capture from in > parallel. Or two webcams, or... Would it be safe to turn the global mutex into a per-driver or per-device mutex? That would largely mitigate the impact as far as I can tell. >

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-17 Thread David Ellingsworth
On Tue, Nov 16, 2010 at 4:42 PM, Hans Verkuil wrote: > On Tuesday, November 16, 2010 22:32:57 David Ellingsworth wrote: >> Hans, >> >> I've had some patches pending for a while now that affect the dsbr100 >> driver. The patches can be seen here: >> http://desource.dyndns.org/~atog/gitweb/?p=linux-

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-16 Thread Hans Verkuil
On Tuesday, November 16, 2010 22:32:57 David Ellingsworth wrote: > Hans, > > I've had some patches pending for a while now that affect the dsbr100 > driver. The patches can be seen here: > http://desource.dyndns.org/~atog/gitweb/?p=linux-media.git in the > dsbr100 branch. The first patch in the se

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-16 Thread David Ellingsworth
Hans, I've had some patches pending for a while now that affect the dsbr100 driver. The patches can be seen here: http://desource.dyndns.org/~atog/gitweb/?p=linux-media.git in the dsbr100 branch. The first patch in the series fixes locking issues throughout the driver and converts it to use the un

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-16 Thread Hans Verkuil
On Tuesday, November 16, 2010 21:29:11 Hans Verkuil wrote: > On Tuesday, November 16, 2010 20:59:41 Andy Walls wrote: > > On Tue, 2010-11-16 at 19:38 +0100, Hans Verkuil wrote: > > > On Tuesday, November 16, 2010 17:49:05 Hans Verkuil wrote: > > > > On Tuesday, November 16, 2010 17:01:36 Arnd Bergm

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-16 Thread Hans Verkuil
On Tuesday, November 16, 2010 20:59:41 Andy Walls wrote: > On Tue, 2010-11-16 at 19:38 +0100, Hans Verkuil wrote: > > On Tuesday, November 16, 2010 17:49:05 Hans Verkuil wrote: > > > On Tuesday, November 16, 2010 17:01:36 Arnd Bergmann wrote: > > > > On Tuesday 16 November 2010, Hans Verkuil wrote:

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-16 Thread Andy Walls
On Tue, 2010-11-16 at 19:38 +0100, Hans Verkuil wrote: > On Tuesday, November 16, 2010 17:49:05 Hans Verkuil wrote: > > On Tuesday, November 16, 2010 17:01:36 Arnd Bergmann wrote: > > > On Tuesday 16 November 2010, Hans Verkuil wrote: > > > > > I think there is a misunderstanding. One V4L device (e

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-16 Thread Arnd Bergmann
On Tuesday 16 November 2010, Hans Verkuil wrote: > I consider class 3 unacceptable for commonly seen devices. I did a quick scan > of the v4l drivers and the only common driver that falls in that class is uvc. If uvc is the only important one, that should be easy enough to fix by adding a per-devi

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-16 Thread Hans Verkuil
On Tuesday, November 16, 2010 17:49:05 Hans Verkuil wrote: > On Tuesday, November 16, 2010 17:01:36 Arnd Bergmann wrote: > > On Tuesday 16 November 2010, Hans Verkuil wrote: > > > > I think there is a misunderstanding. One V4L device (e.g. a TV capture > > > > card, a webcam, etc.) has one v4l2_dev

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-16 Thread Hans Verkuil
On Tuesday, November 16, 2010 17:01:36 Arnd Bergmann wrote: > On Tuesday 16 November 2010, Hans Verkuil wrote: > > > I think there is a misunderstanding. One V4L device (e.g. a TV capture > > > card, a webcam, etc.) has one v4l2_device struct. But it can have multiple > > > V4L device nodes (/dev/v

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-16 Thread Mauro Carvalho Chehab
Em 16-11-2010 14:01, Arnd Bergmann escreveu: > On Tuesday 16 November 2010, Hans Verkuil wrote: >>> I think there is a misunderstanding. One V4L device (e.g. a TV capture >>> card, a webcam, etc.) has one v4l2_device struct. But it can have multiple >>> V4L device nodes (/dev/video0, /dev/radio0, e

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-16 Thread Arnd Bergmann
On Tuesday 16 November 2010, Hans Verkuil wrote: > > I think there is a misunderstanding. One V4L device (e.g. a TV capture > > card, a webcam, etc.) has one v4l2_device struct. But it can have multiple > > V4L device nodes (/dev/video0, /dev/radio0, etc.), each represented by a > > struct video_de

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-16 Thread Hans Verkuil
> >> On Tuesday 16 November 2010, Hans Verkuil wrote: >>> A pointer to this struct is available in vdev->v4l2_dev. However, not >>> all >>> drivers implement struct v4l2_device. But on the other hand, most >>> relevant >>> drivers do. So as a fallback we would still need a static mutex. >> >> Woul

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-16 Thread Hans Verkuil
> On Tuesday 16 November 2010, Hans Verkuil wrote: >> A pointer to this struct is available in vdev->v4l2_dev. However, not >> all >> drivers implement struct v4l2_device. But on the other hand, most >> relevant >> drivers do. So as a fallback we would still need a static mutex. > > Wouldn't that

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-16 Thread Arnd Bergmann
On Tuesday 16 November 2010, Hans Verkuil wrote: > A pointer to this struct is available in vdev->v4l2_dev. However, not all > drivers implement struct v4l2_device. But on the other hand, most relevant > drivers do. So as a fallback we would still need a static mutex. Wouldn't that suffer the same

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-16 Thread Hans Verkuil
> On Tuesday 16 November 2010, Hans Verkuil wrote: >> No, it will also affect e.g. two bttv cards that you capture from in >> parallel. Or two webcams, or... > > Would it be safe to turn the global mutex into a per-driver or per-device > mutex? That would largely mitigate the impact as far as I ca

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-16 Thread Hans Verkuil
> Em 16-11-2010 10:35, Hans Verkuil escreveu: >> >>> Em 15-11-2010 07:49, Hans Verkuil escreveu: > On Sunday 14 November 2010 23:48:51 Hans Verkuil wrote: >> On Sunday, November 14, 2010 22:53:29 Arnd Bergmann wrote: >>> On Sunday 14 November 2010, Hans Verkuil wrote: Thi

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-16 Thread Mauro Carvalho Chehab
Em 16-11-2010 10:35, Hans Verkuil escreveu: > >> Em 15-11-2010 07:49, Hans Verkuil escreveu: >>> On Sunday 14 November 2010 23:48:51 Hans Verkuil wrote: > On Sunday, November 14, 2010 22:53:29 Arnd Bergmann wrote: >> On Sunday 14 November 2010, Hans Verkuil wrote: >>> This patch s

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-16 Thread Hans Verkuil
> Em 15-11-2010 07:49, Hans Verkuil escreveu: >> >>> On Sunday 14 November 2010 23:48:51 Hans Verkuil wrote: On Sunday, November 14, 2010 22:53:29 Arnd Bergmann wrote: > On Sunday 14 November 2010, Hans Verkuil wrote: >> This patch series converts 24 v4l drivers to unlocked_ioctl. The

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-16 Thread Mauro Carvalho Chehab
Em 15-11-2010 07:49, Hans Verkuil escreveu: > >> On Sunday 14 November 2010 23:48:51 Hans Verkuil wrote: >>> On Sunday, November 14, 2010 22:53:29 Arnd Bergmann wrote: On Sunday 14 November 2010, Hans Verkuil wrote: > This patch series converts 24 v4l drivers to unlocked_ioctl. These >>>

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-15 Thread Hans Verkuil
> On Sunday 14 November 2010 23:48:51 Hans Verkuil wrote: >> On Sunday, November 14, 2010 22:53:29 Arnd Bergmann wrote: >> > On Sunday 14 November 2010, Hans Verkuil wrote: >> > > This patch series converts 24 v4l drivers to unlocked_ioctl. These >> are low >> > > hanging fruit but you have to sta

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-15 Thread Arnd Bergmann
On Sunday 14 November 2010 23:48:51 Hans Verkuil wrote: > On Sunday, November 14, 2010 22:53:29 Arnd Bergmann wrote: > > On Sunday 14 November 2010, Hans Verkuil wrote: > > > This patch series converts 24 v4l drivers to unlocked_ioctl. These are low > > > hanging fruit but you have to start somewhe

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-14 Thread Hans Verkuil
On Sunday, November 14, 2010 22:53:29 Arnd Bergmann wrote: > On Sunday 14 November 2010, Hans Verkuil wrote: > > This patch series converts 24 v4l drivers to unlocked_ioctl. These are low > > hanging fruit but you have to start somewhere :-) > > > > The first patch replaces mutex_lock in the V4L2

Re: [RFC PATCH 0/8] V4L BKL removal: first round

2010-11-14 Thread Arnd Bergmann
On Sunday 14 November 2010, Hans Verkuil wrote: > This patch series converts 24 v4l drivers to unlocked_ioctl. These are low > hanging fruit but you have to start somewhere :-) > > The first patch replaces mutex_lock in the V4L2 core by > mutex_lock_interruptible > for most fops. The patches all

[RFC PATCH 0/8] V4L BKL removal: first round

2010-11-14 Thread Hans Verkuil
This patch series converts 24 v4l drivers to unlocked_ioctl. These are low hanging fruit but you have to start somewhere :-) The first patch replaces mutex_lock in the V4L2 core by mutex_lock_interruptible for most fops. Hans Verkuil (8): v4l2-dev: use mutex_lock_interruptible instead of plain