[libcamera-devel,v3,2/6] utils: ipc: proxy: Process pending messages
diff mbox series

Message ID 20210324150125.1318325-3-kieran.bingham@ideasonboard.com
State Accepted
Delegated to: Kieran Bingham
Headers show
Series
  • IPU3 Stability
Related show

Commit Message

Kieran Bingham March 24, 2021, 3:01 p.m. UTC
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Events may be queued to the pipeline handler between the pipeline
handler entering the ::stop() function, and before the call to stop the
IPA has completed.

Handle these events by dispatching all pending messages at the proxy
after the IPA has fully stopped.

Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 utils/ipc/generators/libcamera_templates/proxy_functions.tmpl | 2 ++
 1 file changed, 2 insertions(+)

Patch
diff mbox series

diff --git a/utils/ipc/generators/libcamera_templates/proxy_functions.tmpl b/utils/ipc/generators/libcamera_templates/proxy_functions.tmpl
index 13dc8fdcab6e..8addc2fad0a8 100644
--- a/utils/ipc/generators/libcamera_templates/proxy_functions.tmpl
+++ b/utils/ipc/generators/libcamera_templates/proxy_functions.tmpl
@@ -31,6 +31,8 @@ 
 	thread_.exit();
 	thread_.wait();
 
+	Thread::current()->dispatchMessages(Message::Type::InvokeMessage);
+
 	running_ = false;
 {%- endmacro -%}