media: rockchip: rga: pre-calculate plane offsets
authorMichael Tretter <m.tretter@pengutronix.de>
Fri, 13 Oct 2023 11:00:26 +0000 (13:00 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 7 Dec 2023 07:56:14 +0000 (08:56 +0100)
commit25783e2a984eadd7718f4fcdf1d82ee7e088d52d
treea70747ec5351ab5774814401c63ee73a707f9add
parent558c248f930e6829bd7af160d4a9451a15dbee41
media: rockchip: rga: pre-calculate plane offsets

Calculate the plane offsets and store them with the video buffer while
creating the buffer mapping.

This allows the driver to more freely handle the memory of the DMA
mapping as the offsets and the mapping can be kept in sync.

The driver still has to update the offsets to respect the configured
cropping and rotation, but this calculation is now separated from the
calculation of the plane offsets.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/rockchip/rga/rga-buf.c
drivers/media/platform/rockchip/rga/rga-hw.c
drivers/media/platform/rockchip/rga/rga.h