]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: qcom: camss: Add per-format BPL alignment helper
authorLoic Poulain <loic.poulain@oss.qualcomm.com>
Fri, 13 Mar 2026 19:51:50 +0000 (20:51 +0100)
committerBryan O'Donoghue <bod@kernel.org>
Fri, 8 May 2026 23:22:59 +0000 (00:22 +0100)
commit91978c39ee90f0549a2a74e2e56a3e09c5ce6877
tree498b69f2f74e10168132b483b8cff4c888a6913b
parent5837c36e012924709c0aaa997c5c8efc898f6a75
media: qcom: camss: Add per-format BPL alignment helper

Add camss_format_get_bpl_alignment(), a helper that returns the
bytes-per-line (BPL) alignment requirement for a given CAMSS format.

Different RAW Bayer packing schemes impose different BPL alignment
constraints (e.g. RAW10 requires multiples of 5 bytes, RAW12 multiples of
3 bytes, RAW14 multiples of 7 bytes, etc.). Centralizing this logic
makes the alignment rules explicit and avoids duplicating them across
the pipeline.

This will allow PIX paths and buffer preparation code to correctly
round up BPL values to hardware-required boundaries.

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>
drivers/media/platform/qcom/camss/camss-format.c
drivers/media/platform/qcom/camss/camss-format.h