]> git.baikalelectronics.ru Git - kernel.git/commit
media: v4l2-mem2mem: always consider OUTPUT queue during poll
authorAlexandre Courbot <gnurou@gmail.com>
Thu, 27 Aug 2020 12:49:45 +0000 (14:49 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 26 Sep 2020 08:17:15 +0000 (10:17 +0200)
commit68725bd1ad6a5ce029c3277c01f67fe9e09b43ca
tree7e528630143aefb41f717fa9a5db37e3a49b643d
parent9f25ee8a087f58201ef99993f76a8003a3a34863
media: v4l2-mem2mem: always consider OUTPUT queue during poll

If poll() is called on a m2m device with the EPOLLOUT event after the
last buffer of the CAPTURE queue is dequeued, any buffer available on
OUTPUT queue will never be signaled because v4l2_m2m_poll_for_data()
starts by checking whether dst_q->last_buffer_dequeued is set and
returns EPOLLIN in this case, without looking at the state of the OUTPUT
queue.

Fix this by not early returning so we keep checking the state of the
OUTPUT queue afterwards.

Signed-off-by: Alexandre Courbot <gnurou@gmail.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/v4l2-core/v4l2-mem2mem.c