Re: [PATCH 1/2] media: rcar-isp: Account for the header in the ConfigDMA bounds check
From: Hyeonjun Hong
Date: Wed Dec 02 2026 - 11:52:50 EST
Hi Niklas,
On 2026-12-02 17:43:42 +0100, Niklas Söderlund wrote:
> d00h this should have been / 16, not / 8. Maybe add a define for that
> too, RISP_IO_PARAMS_PAIR_SIZE and use that ;-)
Sure, I will add RISP_IO_PARAMS_PAIR_SIZE, and a patch that makes
risp_core_job_prepare() use RISP_IO_PARAMS_MAX_PAIRS.
One thing I would like to double check with you, since you know the
hardware and I only have the code to go by. I may well be misreading
it, but a pair looks like 8 bytes to me: risp_conf_dma_prepare() stores
two u32 per pair, and vsp1_vspx.c transfers "pairs * 2 + 2" 32-bit
words. The check in risp_core_job_prepare() is the only place I found
that counts 16.
Either value fixes the overflow, 16 just gives 1023 pairs instead of
2047, so I am happy to go with whichever you prefer.
Thanks for the quick replies,
Hyeonjun