staging: mmal-vchiq: Reset buffers_with_vpu on port_enable
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Tue, 21 Sep 2021 16:17:57 +0000 (17:17 +0100)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Thu, 23 Sep 2021 13:53:43 +0000 (14:53 +0100)
commit618b1b90238c5c7f4b56649f99ce637cdd7ba3d4
treea93be88fe20bf8e0dab824df47657b339f7d443b
parent10e3ca474c8218499e270706aaedaddae8ff1351
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>
drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c