media: rockchip: rga: rework buffer handling for multi-planar formats
authorMichael Tretter <m.tretter@pengutronix.de>
Fri, 13 Oct 2023 11:00:33 +0000 (13:00 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 7 Dec 2023 07:56:14 +0000 (08:56 +0100)
commita61ff67ffb9d6e6506bd563fa078d98bc8033a9e
tree5c883f8ba4bbddaa1d2139648d0c933755223a23
parent0148bcd77d0a2a381818d4d1a8f445217fdbcae8
media: rockchip: rga: rework buffer handling for multi-planar formats

Multi-planar formats may have multiple planes that must be handled and
correctly mapped into a continuous buffer for the RGA by using the DMA
descriptors.

The plane offsets in the continuous mapping may now start at page
boundaries and the previous calculation based on the frame sizes is only
valid for planar buffers in a single memory. Therefore, the offsets must
be detected and set while creating the mapping.

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.c
drivers/media/platform/rockchip/rga/rga.h