summaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorAlexandre Courbot <gnurou@gmail.com>2020-12-01 15:44:42 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-01-04 15:13:15 +0300
commit726daf6bafe9d1d9e5c36e1e2a4008941fbc28bd (patch)
tree0d6e3dae45179ebdedbd84a47114752f9afea217 /include/media
parent575c52cc4cae8b35654ea2d934d04e649a95cc6f (diff)
downloadlinux-726daf6bafe9d1d9e5c36e1e2a4008941fbc28bd.tar.xz
media: v4l2-mem2mem: always call poll_wait() on queues
do_poll()/do_select() seem to set the _qproc member of poll_table to NULL the first time they are called on a given table, making subsequent calls of poll_wait() on that table no-ops. This is a problem for mem2mem which calls poll_wait() on the V4L2 queues' waitqueues only when a queue-related event is requested, which may not necessarily be the case during the first poll. For instance, a stateful decoder is typically only interested in EPOLLPRI events when it starts, and will switch to listening to both EPOLLPRI and EPOLLIN after receiving the initial resolution change event and configuring the CAPTURE queue. However by the time that switch happens and v4l2_m2m_poll_for_data() is called for the first time, poll_wait() has become a no-op and the V4L2 queues waitqueues thus cannot be registered. Fix this by moving the registration to v4l2_m2m_poll() and do it whether or not one of the queue-related events are requested. Signed-off-by: Alexandre Courbot <gnurou@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'include/media')
0 files changed, 0 insertions, 0 deletions