media: allegro: add encoder buffer support
authorMichael Tretter <m.tretter@pengutronix.de>
Wed, 8 Sep 2021 13:03:14 +0000 (14:03 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 20 Oct 2021 14:55:27 +0000 (15:55 +0100)
commit98f1cbf65bf275cce2b9985a8d89cd4fc287a9cc
tree386b5d21b33c02c5e33f5bdaa5fa3ac67df118ae
parent83cc5fd9c622d3c322bb450d5c237c4c3ceaefa0
media: allegro: add encoder buffer support

The encoder buffer serves as a cache for reference frames during the
encoding process. The encoder buffer significantly reduces the bandwidth
requirement for read accesses on the AXI ports of the VCU, but slightly
reduces the quality of the encoded video.

The encoder buffer must be configured as a whole during the firmware
initialization and later explicitly enabled for every channel that shall
use the encoder buffer.

Prior to firmware version 2019.2, it was necessary to explicitly set the
size of the encoder buffer for every channel. Since 2019.2 it is
sufficient to enable the encoder buffer and leave the rest to the
firmware. Therefore, only support the encoder buffer for firmware 2019.2
and later.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/allegro-dvt/allegro-core.c
drivers/media/platform/allegro-dvt/allegro-mail.c
drivers/media/platform/allegro-dvt/allegro-mail.h