]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: rockchip: rga: align stride to 4 bytes
authorSven Püschel <s.pueschel@pengutronix.de>
Wed, 20 May 2026 22:44:20 +0000 (00:44 +0200)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Thu, 21 May 2026 10:32:20 +0000 (12:32 +0200)
commit00910c4f731773276d75acdcee3bc15f19a37705
tree41ec71b191e8331ac80e6c46b00d1be07fd2e379
parent6f4e57d57c474be1202a2e0c5c7a9b543503216a
media: rockchip: rga: align stride to 4 bytes

Add an alignment setting to rga_hw to set the desired stride alignment.
As the RGA2 register for the stride counts in word units, the code
already divides the bytesperline value by 4 when writing it into the
register. Therefore fix the alignment to a multiple of 4 to avoid
potential off by one errors due from the division.

Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Sven Püschel <s.pueschel@pengutronix.de>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/platform/rockchip/rga/rga-hw.c
drivers/media/platform/rockchip/rga/rga.c
drivers/media/platform/rockchip/rga/rga.h