OSDN Git Service

media: cedrus: Remove global IRQ spin lock from the driver
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Fri, 30 Nov 2018 08:16:17 +0000 (03:16 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 7 Dec 2018 13:20:40 +0000 (08:20 -0500)
commit22f54602526ec9d199342da43dbb304f5726ba56
treeb7cc424059a236e3dd0b78612829f0d984c82bc0
parentfe8fb032732f6310888d7f765f593d1c337f7e36
media: cedrus: Remove global IRQ spin lock from the driver

We initially introduced a spin lock to ensure that the VPU registers
are not accessed concurrently between our setup function and IRQ
handler. The V4L2 M2M API ensures that only one decoding job runs at a
time, so the interrupt signaling the end of decoding will not occur
while the next picture is being configured.

Spurious interrupts are taken care of in the handler, by checking that
we have a valid M2M context and a decoding status available before
marking the buffers as done.

In addition, holding a spin lock could be problematic if non-atomic
operations are required in the setup process for future codec support.

As a result, remove the global IRQ spin lock.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/staging/media/sunxi/cedrus/cedrus.c
drivers/staging/media/sunxi/cedrus/cedrus.h
drivers/staging/media/sunxi/cedrus/cedrus_dec.c
drivers/staging/media/sunxi/cedrus/cedrus_hw.c
drivers/staging/media/sunxi/cedrus/cedrus_video.c