OSDN Git Service

media: mx_emmaprp: Implement wait_prepare and wait_finish
authorEzequiel Garcia <ezequiel@collabora.com>
Fri, 15 Jun 2018 19:07:30 +0000 (15:07 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 4 Jul 2018 12:02:33 +0000 (08:02 -0400)
commita4273abcd3e40f7e8fe9c5347dea1e0a6b9ccadb
tree6518cfbc2944ef5f64bdee130dc65c5c913cc949
parent4e55969f2308129b0fd1aa90438553728e21ec7d
media: mx_emmaprp: Implement wait_prepare and wait_finish

This driver is currently specifying a video_device lock,
which means it is protecting all the ioctls (including
queue ioctls) with a single mutex.

It's therefore straightforward to implement wait_prepare
and wait_finish, by explicitly setting the vb2_queue lock.

Having these callbacks releases the queue lock while blocking,
which improves latency by allowing for example streamoff
or qbuf operations while waiting in dqbuf.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/mx2_emmaprp.c