From 86ffaf936dc663afd48bd3e276134fa720210bd6 Mon Sep 17 00:00:00 2001 From: Milan Zamazal Date: Tue, 25 Feb 2025 16:06:11 +0100 Subject: libcamera: software_isp: Dispatch messages on stop There may be pending messages in SoftwareIsp message queue when SoftwareIsp stops. The call to IPAProxySoft::stop() will dispatch them before SoftwareIsp::stop() finishes. But this is dependent on IPAProxySoft::stop() implementation, let's break this dependency and dispatch messages to SoftwareIsp explicitly in SoftwareIsp::stop(). This also allows dropping `running_' flag. Since the SoftwareIsp messages get processed and invoke IPA calls before the IPA proxy is set to ProxyStopping state and the SoftwareIsp worker thread is no longer running, it's guaranteed that no new messages come to SoftwareIsp and attempt to call the stopped IPA proxy. Signed-off-by: Milan Zamazal Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Kieran Bingham --- include/libcamera/internal/software_isp/software_isp.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/libcamera/internal/software_isp/software_isp.h b/include/libcamera/internal/software_isp/software_isp.h index 400a4dc5..133b545c 100644 --- a/include/libcamera/internal/software_isp/software_isp.h +++ b/include/libcamera/internal/software_isp/software_isp.h @@ -101,7 +101,6 @@ private: DmaBufAllocator dmaHeap_; std::unique_ptr ipa_; - bool running_; std::deque queuedInputBuffers_; std::deque queuedOutputBuffers_; }; -- cgit v1.2.1