linux/drivers/media
Eugen Hristev 314c96e520 media: atmel: atmel-isc-base: use mutex to lock awb workq from streaming
The AWB workqueue runs in a kernel thread and needs to be synchronized
w.r.t. the streaming status.
It is possible that streaming is stopped while the AWB workq is running.
In this case it is likely that the check for vb2_start_streaming_called is
done at one point in time, but the AWB computations are done later,
including a call to isc_update_profile, which requires streaming to be
started.
Thus , isc_update_profile will fail if during this operation sequence the
streaming was stopped.
To solve this issue, a mutex is added, that will serialize the awb work and
streaming stopping, with the mention that either streaming is stopped
completely including termination of the last frame is done, and after that
the AWB work can check stream status and stop; either first AWB work is
completed and after that the streaming can stop correctly.
The awb spin lock cannot be used since this spinlock is taken in the same
context and using it in the stop streaming will result in a recursion BUG.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-05-13 11:02:21 +02:00
..
cec media: cec: seco: remove byte handling from smb_word_op 2022-05-13 11:02:17 +02:00
common media: videobuf2-v4l2: Expose vb2_queue_is_busy() to drivers 2022-05-13 11:02:21 +02:00
dvb-core media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
dvb-frontends media: media/*/Kconfig: sort entries 2022-03-18 05:58:35 +01:00
firewire media: Makefiles: remove extra spaces 2022-03-12 16:59:52 +01:00
i2c media: i2c: rdacm20: Fix format definition 2022-05-13 11:02:18 +02:00
mc media: mc: delete redundant code in __media_device_unregister_entity 2022-04-24 08:14:19 +01:00
mmc media: media/*/Kconfig: sort entries 2022-03-18 05:58:35 +01:00
pci media: saa7134: simplify if-if to if-else 2022-04-24 08:51:10 +01:00
platform media: atmel: atmel-isc-base: use mutex to lock awb workq from streaming 2022-05-13 11:02:21 +02:00
radio media: make RADIO_ADAPTERS tristate 2022-05-13 11:02:19 +02:00
rc media: gpio-ir-tx: simplify wait logic 2022-05-08 07:07:16 +02:00
spi media updates for v5.18-rc1 2022-03-23 14:51:35 -07:00
test-drivers media: vidtv: use vfree() for memory allocated with vzalloc() 2022-03-18 07:28:17 +01:00
tuners media: si2157: unknown chip version Si2147-A30 ROM 0x50 2022-04-09 17:45:49 +02:00
usb media: stkwebcam: move stk_camera_read_reg() scratch buffer to struct stk_camera 2022-05-13 11:02:20 +02:00
v4l2-core media: v4l2: mem2mem: Fix typos in v4l2_m2m_dev documentation 2022-05-13 11:02:17 +02:00
Kconfig media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
Makefile media: Makefiles: remove extra spaces 2022-03-12 16:59:52 +01:00