]> git.baikalelectronics.ru Git - kernel.git/commit
[media] s3c-camif: Fail on insufficient number of allocated buffers
authorSylwester Nawrocki <sylvester.nawrocki@gmail.com>
Thu, 7 Feb 2013 21:36:12 +0000 (18:36 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 5 Mar 2013 17:53:47 +0000 (14:53 -0300)
commit4ead9cd10d368b1fa2a9b153f2dd06e98b14c299
treef253d9be9bc959805dbda0af47b48da90069bc37
parentf65a6a65e526e8c59243507fd48dd98fe5322d8e
[media] s3c-camif: Fail on insufficient number of allocated buffers

Ensure the driver gets always at least its minimum required
number of buffers allocated by checking actual number of
allocated buffers in vb2_reqbufs(). And free any partially
allocated buffer queue with signaling an error to user space.
Without this patch applications may wait forever to dequeue
a filled buffer, because the hardware didn't even start after
VIDIOC_STREAMON, VIDIOC_QBUF calls, due to insufficient number
of empty buffers.

Reported-by: Alexander Nestorov <alexandernst@gmail.com>
Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/s3c-camif/camif-capture.c