diff options
| author | Michael Tretter <[email protected]> | 2019-06-27 08:44:33 -0400 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2019-07-23 08:46:12 -0400 |
| commit | 7708065f5d51a9ae80df29d1257d91fc6a6e50a0 (patch) | |
| tree | 060191cd2bf07819f102709bdc589771aec773d4 /tools/perf/scripts/python/export-to-sqlite.py | |
| parent | 8d86a15649957c182e90fa2b1267c16699bc12f1 (diff) | |
media: v4l2-mem2mem: reorder checks in v4l2_m2m_poll()
When reaching the end of stream, V4L2 m2m clients may expect the
V4L2_EOS_EVENT. Although the V4L2_EOS_EVENT is deprecated behavior,
drivers must signal that event before dequeuing the buffer that has the
V4L2_BUF_FLAG_LAST flag set.
If a driver queues the V4L2_EOS_EVENT event and returns the buffer after
the check for events but before the check for buffers, vb2_m2m_poll()
will signal that the buffer with V4L2_BUF_FLAG_LAST can be read but not
that the V4L2_EOS_EVENT is available.
Split the check for buffers into a separate function and check for
available buffers before checking for events. This ensures that if
vb2_m2m_poll() signals POLLIN | POLLRDNORM for the V4L2_BUF_FLAG_LAST
buffer, it signals POLLPRI for the V4L2_EOS_EVENT, too.
Signed-off-by: Michael Tretter <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
[[email protected]: fix checkpatch alignment warning]
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions