Re: [PATCH v5 04/10] media: microchip-isc: disable histogram and flush AWB work on teardown
Eugen Hristev <[email protected]>
| Newsgroups | org.kernel.vger.linux-kernel,org.kernel.vger.linux-media,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
On 8/17/26 09:52, Balakrishnan Sambath wrote:
> isc_stop_streaming() and the isc_start_streaming() error path dropped the
> runtime PM reference with the histogram still enabled. A HISDONE firing
> just before the stop, or a failed isc_update_profile() on the start path,
> can queue isc_awb_work(), which reads the histogram registers before
> taking its own PM reference and faults on the unclocked device.
>
> Disable the histogram, synchronize the IRQ and flush the work before the
> device is left unclocked. isc_configure() is the one enabling the
> histogram and then calling isc_update_profile(), so do the cleanup in its
> own failure path; isc_stop_streaming() does the same on teardown.
> synchronize_irq() must come before cancel_work_sync(), so an in-flight
> handler cannot re-queue awb_work after it is cancelled.
>
> Fixes: 93d4a26c3dab ("[media] atmel-isc: add the isc pipeline function")
> Cc: [email protected]
> Signed-off-by: Balakrishnan Sambath <[email protected]>
> ---
Reviewed-by: Eugen Hristev <[email protected]>