1 From 4a462505893d3ab8b8034904008185b9dfe3c98f Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Tue, 21 Sep 2021 17:17:57 +0100
4 Subject: [PATCH 0308/1085] staging: mmal-vchiq: Reset buffers_with_vpu on
7 Should we go through the timeout failure case with port_disable
8 not returning all buffers for whatever reason, the
9 buffers_with_vpu counter gets left at a non-zero value, which
10 will cause reference counting issues should the instance be
13 Reset the count when the port is enabled again, but before
14 any buffers have been sent to the VPU.
16 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
18 drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 2 ++
19 1 file changed, 2 insertions(+)
21 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
22 +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
23 @@ -1501,6 +1501,8 @@ static int port_enable(struct vchiq_mmal
27 + atomic_set(&port->buffers_with_vpu, 0);
29 if (port->buffer_cb) {
30 /* send buffer headers to videocore */