mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
staging: mmal-vchiq: Reset buffers_with_vpu on port_enable
Should we go through the timeout failure case with port_disable not returning all buffers for whatever reason, the buffers_with_vpu counter gets left at a non-zero value, which will cause reference counting issues should the instance be reused. Reset the count when the port is enabled again, but before any buffers have been sent to the VPU. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This commit is contained in:
committed by
Dom Cobley
parent
d9049df99c
commit
dfd14468eb
@@ -1501,6 +1501,8 @@ static int port_enable(struct vchiq_mmal_instance *instance,
|
||||
|
||||
port->enabled = true;
|
||||
|
||||
atomic_set(&port->buffers_with_vpu, 0);
|
||||
|
||||
if (port->buffer_cb) {
|
||||
/* send buffer headers to videocore */
|
||||
hdr_count = 1;
|
||||
|
||||
Reference in New Issue
Block a user