abcbe84fc4dcb610bbca4a7054e515ef61ab09f2
[openwrt/staging/stintel.git] /
1 From 24da14f2d745114eddf9d1d7e1bfde90d1c0c35c Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Thu, 16 Sep 2021 16:46:58 +0100
4 Subject: [PATCH] staging: bcm2835-codec: Queue flushed buffers instead
5 of completing
6
7 When a buffer is returned on a port that is disabled, return it
8 to the videobuf2 QUEUED state instead of DONE which returns it
9 to the client.
10
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
12 ---
13 .../staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c | 4 +++-
14 1 file changed, 3 insertions(+), 1 deletion(-)
15
16 --- a/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
17 +++ b/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
18 @@ -926,7 +926,9 @@ static void ip_buffer_cb(struct vchiq_mm
19
20 v4l2_dbg(3, debug, &ctx->dev->v4l2_dev, "%s: no error. Return buffer %p\n",
21 __func__, &buf->m2m.vb.vb2_buf);
22 - vb2_buffer_done(&buf->m2m.vb.vb2_buf, VB2_BUF_STATE_DONE);
23 + vb2_buffer_done(&buf->m2m.vb.vb2_buf,
24 + port->enabled ? VB2_BUF_STATE_DONE :
25 + VB2_BUF_STATE_QUEUED);
26
27 ctx->num_ip_buffers++;
28 v4l2_dbg(2, debug, &ctx->dev->v4l2_dev, "%s: done %d input buffers\n",