staging: bcm2835-camera: Handle empty EOS buffers whilst streaming
authorDave Stevenson <dave.stevenson@raspberrypi.org>
Thu, 5 Jul 2018 15:17:03 +0000 (16:17 +0100)
committerpopcornmix <popcornmix@gmail.com>
Mon, 13 May 2019 23:08:12 +0000 (00:08 +0100)
commit7c5f86c2a87d7d608b4300e8818626ee1323ce4e
tree5794aa5553e59628af7063ef3a796b9bf78a9389
parented3c889ca3676f6d100c88598f337a3601cb893d
staging: bcm2835-camera: Handle empty EOS buffers whilst streaming

The change to mapping V4L2 to MMAL buffers 1:1 didn't handle
the condition we get with raw pixel buffers (eg YUV and RGB)
direct from the camera's stills port. That sends the pixel buffer
and then an empty buffer with the EOS flag set. The EOS buffer
wasn't handled and returned an error up the stack.

Handle the condition correctly by returning it to the component
if streaming, or returning with an error if stopping streaming.

Fixes: 9384167 "staging: bcm2835-camera: Remove V4L2/MMAL buffer remapping"

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c