Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-07-14 11:33:41 +0200
committerJiri Slaby <jslaby@suse.cz>2019-07-14 11:33:56 +0200
commit53226f8132ab27d1093d24e48b314b44ce28bb09 (patch)
tree986ae7a43a2297f4123a625b232897ab11015bbe
parent287b4dbe40372755276c57f1e6afa4401b0f4885 (diff)
staging: bcm2835-camera: Remove check of the number of buffers
supplied (bnc#1012628).
-rw-r--r--patches.kernel.org/5.2.1-058-staging-bcm2835-camera-Remove-check-of-the-numb.patch53
-rw-r--r--series.conf1
2 files changed, 54 insertions, 0 deletions
diff --git a/patches.kernel.org/5.2.1-058-staging-bcm2835-camera-Remove-check-of-the-numb.patch b/patches.kernel.org/5.2.1-058-staging-bcm2835-camera-Remove-check-of-the-numb.patch
new file mode 100644
index 0000000000..edc1f04a30
--- /dev/null
+++ b/patches.kernel.org/5.2.1-058-staging-bcm2835-camera-Remove-check-of-the-numb.patch
@@ -0,0 +1,53 @@
+From: Dave Stevenson <dave.stevenson@raspberrypi.org>
+Date: Sat, 29 Jun 2019 14:13:30 +0200
+Subject: [PATCH] staging: bcm2835-camera: Remove check of the number of
+ buffers supplied
+References: bnc#1012628
+Patch-mainline: 5.2.1
+Git-commit: bb8e97006d701ae725a177f8f322e5a75fa761b7
+
+commit bb8e97006d701ae725a177f8f322e5a75fa761b7 upstream.
+
+Before commit "staging: bcm2835-camera: Remove V4L2/MMAL buffer remapping"
+there was a need to ensure that there were sufficient buffers supplied from
+the user to cover those being sent to the VPU (always 1).
+
+Now the buffers are linked 1:1 between MMAL and V4L2,
+therefore there is no need for that check, and indeed it is wrong
+as there is no need to submit all the buffers before starting streaming.
+
+Fixes: 938416707071 ("staging: bcm2835-camera: Remove V4L2/MMAL buffer remapping")
+Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
+Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
+Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
+Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ .../staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 10 ----------
+ 1 file changed, 10 deletions(-)
+
+diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
+index c62625b8ae41..0f7de34eb5db 100644
+--- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
++++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
+@@ -1328,16 +1328,6 @@ static int port_enable(struct vchiq_mmal_instance *instance,
+ if (port->enabled)
+ return 0;
+
+- /* ensure there are enough buffers queued to cover the buffer headers */
+- if (port->buffer_cb) {
+- hdr_count = 0;
+- list_for_each(buf_head, &port->buffers) {
+- hdr_count++;
+- }
+- if (hdr_count < port->current_buffer.num)
+- return -ENOSPC;
+- }
+-
+ ret = port_action_port(instance, port,
+ MMAL_MSG_PORT_ACTION_TYPE_ENABLE);
+ if (ret)
+--
+2.22.0
+
diff --git a/series.conf b/series.conf
index 38b008501a..09af4b7e7d 100644
--- a/series.conf
+++ b/series.conf
@@ -84,6 +84,7 @@
patches.kernel.org/5.2.1-055-staging-fsl-dpaa2-ethsw-fix-memory-leak-of-swit.patch
patches.kernel.org/5.2.1-056-staging-bcm2835-camera-Replace-spinlock-protect.patch
patches.kernel.org/5.2.1-057-staging-bcm2835-camera-Ensure-all-buffers-are-r.patch
+ patches.kernel.org/5.2.1-058-staging-bcm2835-camera-Remove-check-of-the-numb.patch
########################################################
# Build fixes that apply to the vanilla kernel too.