]> git.baikalelectronics.ru Git - kernel.git/commit
media: v4l2-mem2mem: add vb2_m2m_request_queue
authorHans Verkuil <hans.verkuil@cisco.com>
Mon, 21 May 2018 08:54:53 +0000 (04:54 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 31 Aug 2018 15:24:02 +0000 (11:24 -0400)
commit5df4b3853dcdc8e58c24aedbecdc69a9dda52eb2
treedc37d01104638e1dbc347b7020cde0e2b936dd22
parentabcf4fa722263f2a59d9db2c8932ad5edad8d49b
media: v4l2-mem2mem: add vb2_m2m_request_queue

For mem2mem devices we have to make sure that v4l2_m2m_try_schedule()
is called whenever a request is queued.

We do that by creating a vb2_m2m_request_queue() helper that should
be used instead of the 'normal' vb2_request_queue() helper. The m2m
helper function will call v4l2_m2m_try_schedule() as needed.

In addition we also avoid calling v4l2_m2m_try_schedule() when preparing
or queueing a buffer for a request since that is no longer needed.
Instead this helper function will do that when the request is actually
queued.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/v4l2-core/v4l2-mem2mem.c
include/media/v4l2-mem2mem.h