summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorSven Püschel <s.pueschel@pengutronix.de>2026-05-21 01:44:10 +0300
committerHans Verkuil <hverkuil+cisco@kernel.org>2026-05-21 13:32:19 +0300
commit2c225846271fc6b4f7e2a34271ebe828ed461772 (patch)
treef46e2e124577597b01fd68210aead659fbe16984 /include/linux
parent84fbe791a6203e35a602f7fef94d967466cd8d29 (diff)
downloadlinux-2c225846271fc6b4f7e2a34271ebe828ed461772.tar.xz
media: v4l2-common: add v4l2_fill_pixfmt_mp_aligned helper
Add a v4l2_fill_pixfmt_mp_aligned helper which allows the user to specify a custom stride alignment in bytes. This is necessary for hardware like the Rockchip RGA3, which requires the stride value to be aligned to a 16 bytes boundary. The code makes some assumptions about the v4l2 format to simplify the calculation. They currently hold for all known v4l2 formats. v4l2_format_plane_stride uses an unsigned int as argument type to avoid the later multiplication from overflowing the u8 value. All other places use u8, as no practical use cases for a larger alignment are known at the moment. 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>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions