[media] v4l: vsp1: Prevent pipelines from running when not streaming
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Fri, 8 Jul 2016 09:20:51 +0000 (06:20 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 19 Sep 2016 17:45:14 +0000 (14:45 -0300)
commite4e70a147a48618a36ae1b81c641516cb9d45993
tree852bea5664f2eb7b45ed30983b35bb39edb68f77
parent3c3ba5452e8a0e2dd9fb89222feb88f11ec6ff7a
[media] v4l: vsp1: Prevent pipelines from running when not streaming

Pipelines can only be run if all their video nodes are streaming. Commit
b4dfb9b35a19 ("[media] v4l: vsp1: Stop the pipeline upon the first
STREAMOFF") fixed the pipeline stop sequence, but introduced a race
condition that makes it possible to run a pipeline after stopping the
stream on a video node by queuing a buffer on the other side of the
pipeline.

Fix this by clearing the buffers ready flag when stopping the stream,
which will prevent the QBUF handler from running the pipeline.

Fixes: b4dfb9b35a19 ("[media] v4l: vsp1: Stop the pipeline upon the first STREAMOFF")

Reported-by: Kieran Bingham <kieran@bingham.xyz>
Tested-by: Kieran Bingham <kieran@bingham.xyz>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/vsp1/vsp1_video.c