fb9d6240bc6b8bfbccde03bfcab2e83443d5e977
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.15 / 950-0752-drivers-staging-bcm2835-isp-Do-not-cleanup-mmal-vcsm.patch
1 From 85c2fec6528038bd200c4999978a7c2a7e86a407 Mon Sep 17 00:00:00 2001
2 From: Naushir Patuck <naush@raspberrypi.com>
3 Date: Thu, 3 Mar 2022 16:45:53 +0000
4 Subject: [PATCH] drivers: staging: bcm2835-isp: Do not cleanup mmal
5 vcsm buffer on stop_streaming
6
7 On stop_streaming() the vcsm buffer handle gets released by the buffer cleanup
8 code. This will subsequently cause and error if userland re-queues the same
9 buffer on the next start_streaming() call.
10
11 Remove this cleanup code and rely on the vb2_ops->buf_cleanup() call to do the
12 cleanups instead.
13
14 Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
15 ---
16 .../staging/vc04_services/bcm2835-isp/bcm2835-v4l2-isp.c | 9 ---------
17 1 file changed, 9 deletions(-)
18
19 --- a/drivers/staging/vc04_services/bcm2835-isp/bcm2835-v4l2-isp.c
20 +++ b/drivers/staging/vc04_services/bcm2835-isp/bcm2835-v4l2-isp.c
21 @@ -622,7 +622,6 @@ static void bcm2835_isp_node_stop_stream
22 {
23 struct bcm2835_isp_node *node = vb2_get_drv_priv(q);
24 struct bcm2835_isp_dev *dev = node_get_dev(node);
25 - unsigned int i;
26 int ret;
27
28 v4l2_dbg(1, debug, &dev->v4l2_dev, "%s: node %s[%d], mmal port %p\n",
29 @@ -653,14 +652,6 @@ static void bcm2835_isp_node_stop_stream
30 }
31 }
32
33 - /* Release the VCSM handle here to release the associated dmabuf */
34 - for (i = 0; i < q->num_buffers; i++) {
35 - struct vb2_v4l2_buffer *vb2 = to_vb2_v4l2_buffer(q->bufs[i]);
36 - struct bcm2835_isp_buffer *buf =
37 - container_of(vb2, struct bcm2835_isp_buffer, vb);
38 - bcm2835_isp_mmal_buf_cleanup(&buf->mmal);
39 - }
40 -
41 atomic_dec(&dev->num_streaming);
42 /* If all ports disabled, then disable the component */
43 if (atomic_read(&dev->num_streaming) == 0) {