]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2016 15:38:57 +0000 (16:38 +0100)
commit4a22930a74acd6976db1eb128337c493ae972875
tree9da50b56e34a136e41f891a30b8277304f567696
parent59f9693a170a2d9f2406fa06e81c4c0f5a0426cf
v4l: vsp1: Prevent pipelines from running when not streaming

commit e4e70a147a48618a36ae1b81c641516cb9d45993 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/platform/vsp1/vsp1_video.c