Re: [PATCH v4 05/10] media: microchip-isc: do not touch WB registers when not streaming

From: Eugen Hristev

Date: Fri Aug 07 2026 - 06:43:12 EST


On 8/3/26 13:20, Balakrishnan Sambath wrote:
> isc_s_awb_ctrl() called isc_update_awb_ctrls() unconditionally, writing
> the white balance registers even when the device is runtime suspended;
> on many ARM platforms accessing the unclocked registers is an external
> abort. The write was also done without awb_lock, racing isc_awb_work(),
> which holds it so the DMA done IRQ cannot latch a half-updated pipeline.
>
> Write the registers only while streaming and not stopping, under
> awb_lock, and update the profile there. The isc->stop check covers the
> window where isc_stop_streaming() has gated the clocks but vb2 still
> reports streaming. Otherwise the new values stay cached and
> isc_configure() programs them at the next stream start.
>
> Fixes: 4e52889f48fe ("media: atmel: atmel-isc-base: expose white balance as v4l2 controls")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Balakrishnan Sambath <balakrishnan.s@xxxxxxxxxxxxx>
> ---

Reviewed-by: Eugen Hristev <ehristev@xxxxxxxxxx>