diff options
| author | Sven Püschel <s.pueschel@pengutronix.de> | 2026-05-21 01:44:10 +0300 |
|---|---|---|
| committer | Hans Verkuil <hverkuil+cisco@kernel.org> | 2026-05-21 13:32:19 +0300 |
| commit | 2c225846271fc6b4f7e2a34271ebe828ed461772 (patch) | |
| tree | f46e2e124577597b01fd68210aead659fbe16984 /include/linux | |
| parent | 84fbe791a6203e35a602f7fef94d967466cd8d29 (diff) | |
| download | linux-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
