mirror-linux/drivers/media/platform/nxp
Laurentiu Palcu 910efa6490 media: nxp: imx8-isi: better handle the m2m usage_count
Currently, if streamon/streamoff calls are imbalanced we can either end up
with a negative ISI m2m usage_count (if streamoff() is called more times
than streamon()) in which case we'll not be able to restart the ISI pipe
next time, or the usage_count never gets to 0 and the pipe is never
switched off.

To avoid that, add a 'streaming' flag to mxc_isi_m2m_ctx_queue_data and use it
in the streamon/streamoff to avoid incrementing/decrementing the usage_count
uselessly, if called multiple times from the same context.

Fixes: cf21f328fc ("media: nxp: Add i.MX8 ISI driver")
Cc: stable@vger.kernel.org
Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20241023085643.978729-1-laurentiu.palcu@oss.nxp.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-05-01 14:07:00 +02:00
..
dw100 media: platform: use (t,l)/wxh format for rectangle 2025-04-30 08:16:07 +02:00
imx-jpeg media: imx-jpeg: Check decoding is ongoing for motion-jpeg 2025-04-24 15:21:38 +02:00
imx8-isi media: nxp: imx8-isi: better handle the m2m usage_count 2025-05-01 14:07:00 +02:00
Kconfig
Makefile
imx-mipi-csis.c media: v4l: Convert the users of v4l2_get_link_freq to call it on a pad 2025-02-15 15:22:58 +01:00
imx-pxp.c media: platform: drop vb2_ops_wait_prepare/finish 2024-10-28 09:20:07 +01:00
imx-pxp.h media: imx-pxp: Rewrite coeff expression 2024-08-09 07:56:38 +02:00
imx7-media-csi.c media: platform: drop vb2_ops_wait_prepare/finish 2024-10-28 09:20:07 +01:00
imx8mq-mipi-csi2.c media: v4l: Convert the users of v4l2_get_link_freq to call it on a pad 2025-02-15 15:22:58 +01:00
mx2_emmaprp.c media: platform: drop vb2_ops_wait_prepare/finish 2024-10-28 09:20:07 +01:00