media: rockchip: rga: extract helper to fill descriptors
authorMichael Tretter <m.tretter@pengutronix.de>
Fri, 13 Oct 2023 11:00:23 +0000 (13:00 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 7 Dec 2023 07:56:13 +0000 (08:56 +0100)
commit77f2e2b255ce05b9d63566e5290ac66c49913abd
tree2e8e92230e262c6be04de0b31f8802fe41b2700b
parent9e7dc39260edac180c206bb6149595a40eabae3e
media: rockchip: rga: extract helper to fill descriptors

The IOMMU of the RGA is programmed with a list of DMA descriptors that
contain an 32 bit address per 4k page in the video buffers. The address
in the descriptor points to the start address of the page.

Introduce 'struct rga_dma_desc' to make the handling of the DMA
descriptors explicit instead of hiding them behind standard types.

While at it, use provided helpers for iterating the sg_table instead of
manually calculating the DMA addresses.

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