f916ae1830b6e8fdacae024b1ac2517f431652a2
[openwrt/staging/linusw.git] /
1 From 98457a5263c83026cf1d451d44d8b028b8423b87 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Wed, 4 Jul 2018 17:01:15 +0100
4 Subject: [PATCH 253/703] staging: bcm2835-camera: Remove check of the number
5 of buffers supplied
6
7 Before 9384167 there was a need to ensure that there were sufficient
8 buffers supplied from the user to cover those being sent to the VPU
9 (always 1).
10 With 9384167 the buffers are linked 1:1 between MMAL and V4L2,
11 therefore there is no need for that check, and indeed it is wrong
12 as there is no need to submit all the buffers before starting streaming.
13
14 Fixes: 9384167 "staging: bcm2835-camera: Remove V4L2/MMAL buffer remapping"
15
16 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
17 ---
18 .../staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 10 ----------
19 1 file changed, 10 deletions(-)
20
21 --- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
22 +++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
23 @@ -1338,16 +1338,6 @@ static int port_enable(struct vchiq_mmal
24 if (port->enabled)
25 return 0;
26
27 - /* ensure there are enough buffers queued to cover the buffer headers */
28 - if (port->buffer_cb) {
29 - hdr_count = 0;
30 - list_for_each(buf_head, &port->buffers) {
31 - hdr_count++;
32 - }
33 - if (hdr_count < port->current_buffer.num)
34 - return -ENOSPC;
35 - }
36 -
37 ret = port_action_port(instance, port,
38 MMAL_MSG_PORT_ACTION_TYPE_ENABLE);
39 if (ret)