staging: bcm2835-codec: Format changed should trigger drain
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Thu, 16 Sep 2021 15:32:53 +0000 (16:32 +0100)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Thu, 23 Sep 2021 13:53:43 +0000 (14:53 +0100)
commitb7e6b495eff31298ba4665f71b2414cc9a8f99c2
treeaaed4b5c58291eeffd69df1c5995eb12439a9fc5
parent63ac2c7280f800c4fd989ef177d7f7563ae93505
staging: bcm2835-codec: Format changed should trigger drain

When a format changed event occurs, the spec says that it
triggers an implicit drain, and that needs to be signalled
via -EPIPE.

For BCM2835, the format changed event happens at the point
the format change occurs, so no further buffers exist from
before the resolution changed point. We therefore signal the
last buffer immediately.
We don't have a V4L2 available to us at this point, so set
the videobuf2 queue last_buffer_dequeued flag directly.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c