1 From 1f95725755ab67f3198df3b5bf7517f926f310ca Mon Sep 17 00:00:00 2001
2 From: Mike Isely <isely@pobox.com>
3 Date: Wed, 23 Sep 2009 18:06:57 -0300
4 Subject: V4L/DVB (13230): s2255drv: Don't conditionalize video buffer completion on waiting processes
6 From: Mike Isely <isely@pobox.com>
8 commit 1f95725755ab67f3198df3b5bf7517f926f310ca upstream.
10 The s2255 driver had logic which aborted processing of a video frame
11 if there was no process waiting on the video buffer in question. That
12 simply doesn't work when the application is doing things in an
13 asynchronous manner. If the application went to the trouble to queue
14 the buffer in the first place, then the driver should always attempt
15 to complete it - even if the application at that moment has its
16 attention turned elsewhere. Applications which always blocked waiting
17 for I/O on the capture device would not have been affected by this.
18 Applications which *mostly* blocked waiting for I/O on the capture
19 device probably only would have been somewhat affected (frame lossage,
20 at a rate which goes up as the application blocks less). Applications
21 which never blocked on the capture device (e.g. polling only) however
22 would never have been able to receive any video frames, since in that
23 case this "is anyone waiting on this?" check on the buffer never would
24 have evalutated true. This patch just deletes that harmful check
25 against the buffer's wait queue.
27 Signed-off-by: Mike Isely <isely@pobox.com>
28 Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
29 Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
30 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
33 drivers/media/video/s2255drv.c | 5 -----
34 1 file changed, 5 deletions(-)
36 --- a/drivers/media/video/s2255drv.c
37 +++ b/drivers/media/video/s2255drv.c
38 @@ -578,11 +578,6 @@ static int s2255_got_frame(struct s2255_
39 buf = list_entry(dma_q->active.next,
40 struct s2255_buffer, vb.queue);
42 - if (!waitqueue_active(&buf->vb.done)) {
47 list_del(&buf->vb.queue);
48 do_gettimeofday(&buf->vb.ts);
49 dprintk(100, "[%p/%d] wakeup\n", buf, buf->vb.i);