]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: rkvdec: Add RCB and SRAM support
authorDetlev Casanova <detlev.casanova@collabora.com>
Fri, 9 Jan 2026 16:15:26 +0000 (11:15 -0500)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Wed, 21 Jan 2026 13:43:09 +0000 (14:43 +0100)
commite5640dbb991c498b0f6fcf2e968fa795a8062eb6
tree0e1d1f640ff0e801c1fd007e0f8a584400017a79
parentae2070ca8ab2cc9cad0303fb6f9ed74cde9ec96c
media: rkvdec: Add RCB and SRAM support

The RCB (Rows and Cols Buffers) are a set of buffers used by other
variations of the decoder to store temporary data.

Those variation come with a dedicated SRAM area used to store those
buffers for better performances.

The buffer sizes are either the width or height of the frame being
decoded multiplied by a documented factor and can be stored either
in SRAM or RAM.
A fallback to RAM is provided if the SRAM is full (e.g.: multiple
streams are being decoded at the same time).

To manage the different kind of allocation, an enum is added to the
rkvdec_aux_buf struct to specify how the buffer was allocated, and
so, how to free it.

This commit is in preparation of other variants support.

Tested-by: Diederik de Haas <didi.debian@cknow.org> # Rock 5B
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/platform/rockchip/rkvdec/Makefile
drivers/media/platform/rockchip/rkvdec/rkvdec-rcb.c [new file with mode: 0644]
drivers/media/platform/rockchip/rkvdec/rkvdec-rcb.h [new file with mode: 0644]
drivers/media/platform/rockchip/rkvdec/rkvdec.c
drivers/media/platform/rockchip/rkvdec/rkvdec.h