media: rpivid: Ensure IRQs have completed before uniniting context
authorJohn Cox <jc@kynesim.co.uk>
Wed, 22 Sep 2021 18:05:30 +0000 (19:05 +0100)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Thu, 23 Sep 2021 12:38:58 +0000 (13:38 +0100)
commit6ab953939b29f01bff68f41895da58c0e074f2e6
tree79b53c86f5e4fb35e98f4e463d03812c96b74fc7
parent562ee106ce1ea37229cea1e615c3d03d533be305
media: rpivid: Ensure IRQs have completed before uniniting context

Before uniniting the decode context sync with the IRQ queues to ensure
that decode no longer has any buffers in use.  This fixes a problem that
manifested as ffmpeg leaking CMA buffers when it did a stream off on
OUTPUT before CAPTURE, though in reality it was probably much more
dangerous than that.

Signed-off-by: John Cox <jc@kynesim.co.uk>
drivers/staging/media/rpivid/rpivid_h265.c