mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-03 14:35:46 -04:00
Bytes-per-line (BPL) alignment in CAMSS currently uses ALIGN(), which only works correctly for power-of-two values. Some RAW Bayer packing formats (e.g. RAW10/12/14) require non-power-of-two alignment such as 3, 5, or 7-byte multiples, so ALIGN() produces incorrect results. Introduce the use of roundup() with the per-format alignment returned by camss_format_get_bpl_alignment() when no hardware alignment is enforced (video->bpl_alignment). Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Bryan O'Donoghue <bod@kernel.org>