linux/drivers/media
Ezequiel Garcia e1e213b1b0 media: v4l2-mem2mem: return CAPTURE buffer first
When the request API is used, typically an OUTPUT (src) buffer
will be part of a request. A userspace process will be typically
blocked, waiting on the request file descriptor.

Returning the OUTPUT (src) buffer will wake-up such processes,
who will immediately attempt to dequeue the CAPTURE buffer,
only to find it's still unavailable.

Therefore, change v4l2_m2m_buf_done_and_job_finish returning
the CAPTURE (dst) buffer first, to avoid signalling the request
file descriptor prematurely, i.e. before the CAPTURE buffer is done.

When the request API is not used, this change should have
no impact.

Tested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-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>
2020-04-14 11:21:49 +02:00
..
cec media: Kconfig: move CEC-specific options to cec/Kconfig 2020-04-14 10:29:05 +02:00
common media: dvb-usb: auto-select CYPRESS_FIRMWARE 2020-04-14 10:29:04 +02:00
dvb-core media: Kconfig: move DVB-specific options to dvb-core/Kconfig 2020-04-14 10:29:05 +02:00
dvb-frontends media: docs: move driver-specific info to driver-api 2020-04-14 10:36:18 +02:00
firewire media: Kconfig: mode firewire comment to firewire/Kconfig 2020-04-14 10:29:04 +02:00
i2c media: docs: add an uAPI chapter for driver-specific stuff 2020-04-14 10:36:50 +02:00
mc media: Kconfig: move media controller core select to main Kconfig 2020-04-14 10:29:06 +02:00
mmc media: Kconfig: move comment to siano include 2020-04-14 10:29:04 +02:00
pci Revert "media: Kconfig: better support hybrid TV devices" 2020-04-14 11:00:30 +02:00
platform Revert "media: Kconfig: better support hybrid TV devices" 2020-04-14 11:00:30 +02:00
radio media: docs: move driver-specific info to driver-api 2020-04-14 10:36:18 +02:00
rc media: rc: Use scnprintf() for avoiding potential buffer overflow 2020-03-20 16:27:42 +01:00
spi media: Kconfig files: use select for V4L2 subdevs and MC 2020-04-14 10:29:05 +02:00
test_drivers media: Kconfig files: use select for V4L2 subdevs and MC 2020-04-14 10:29:05 +02:00
tuners media: tuners: Use the correct style for SPDX License Identifier 2019-10-24 18:57:55 -03:00
usb Revert "media: Kconfig: better support hybrid TV devices" 2020-04-14 11:00:30 +02:00
v4l2-core media: v4l2-mem2mem: return CAPTURE buffer first 2020-04-14 11:21:49 +02:00
Kconfig Revert "media: Kconfig: better support hybrid TV devices" 2020-04-14 11:00:30 +02:00
Makefile media: move drivers/media/media-* to drivers/media/mc/mc-* 2019-05-28 12:15:46 -04:00