<div dir="ltr"><div dir="ltr">Hi David,<div><br></div><div>Thank you for this fix.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 5 Oct 2021 at 09:57, David Plowman <<a href="mailto:david.plowman@raspberrypi.com">david.plowman@raspberrypi.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">When the pipeline handler start() method is supplied with a NULL list<br>
of controls, we send an empty control list to the IPA. When the IPA is<br>
running in isolated mode the control list goes through the data<br>
serializer, for which it must be marked correctly as a list of<br>
"controls::controls", otherwise the IPA process will abort.<br>
<br>
The IPA has a similar problem returning a control list in its<br>
configure() method. We must be careful to initialise it properly even<br>
when empty.<br>
<br>
Signed-off-by: David Plowman <<a href="mailto:david.plowman@raspberrypi.com" target="_blank">david.plowman@raspberrypi.com</a>><br>
Reviewed-by: Laurent Pinchart <<a href="mailto:laurent.pinchart@ideasonboard.com" target="_blank">laurent.pinchart@ideasonboard.com</a>><br></blockquote><div><br></div><div>Reviewed-by: Naushir Patuck <<a href="mailto:naush@raspberrypi.com">naush@raspberrypi.com</a>></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
---<br>
 src/ipa/raspberrypi/raspberrypi.cpp                | 13 +++++++++----<br>
 src/libcamera/pipeline/raspberrypi/raspberrypi.cpp |  3 ++-<br>
 2 files changed, 11 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp<br>
index 047123ab..fed82e22 100644<br>
--- a/src/ipa/raspberrypi/raspberrypi.cpp<br>
+++ b/src/ipa/raspberrypi/raspberrypi.cpp<br>
@@ -389,21 +389,26 @@ int IPARPi::configure(const IPACameraSensorInfo &sensorInfo,<br>
        /* Pass the camera mode to the CamHelper to setup algorithms. */<br>
        helper_->SetCameraMode(mode_);<br>
<br>
+       /*<br>
+        * Initialise this ControlList correctly, even if empty, in case the IPA is<br>
+        * running is isolation mode (passing the ControlList through the IPC layer).<br>
+        */<br>
+       ControlList ctrls(sensorCtrls_);<br>
+<br>
        if (firstStart_) {<br>
                /* Supply initial values for frame durations. */<br>
                applyFrameDurations(defaultMinFrameDuration, defaultMaxFrameDuration);<br>
<br>
                /* Supply initial values for gain and exposure. */<br>
-               ControlList ctrls(sensorCtrls_);<br>
                AgcStatus agcStatus;<br>
                agcStatus.shutter_time = defaultExposureTime;<br>
                agcStatus.analogue_gain = defaultAnalogueGain;<br>
                applyAGC(&agcStatus, ctrls);<br>
-<br>
-               ASSERT(controls);<br>
-               *controls = std::move(ctrls);<br>
        }<br>
<br>
+       ASSERT(controls);<br>
+       *controls = std::move(ctrls);<br>
+<br>
        return 0;<br>
 }<br>
<br>
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp<br>
index 0bdfa727..1634ca98 100644<br>
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp<br>
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp<br>
@@ -825,7 +825,8 @@ int PipelineHandlerRPi::start(Camera *camera, const ControlList *controls)<br>
<br>
        /* Start the IPA. */<br>
        ipa::RPi::StartConfig startConfig;<br>
-       data->ipa_->start(controls ? *controls : ControlList{}, &startConfig);<br>
+       data->ipa_->start(controls ? *controls : ControlList{ controls::controls },<br>
+                         &startConfig);<br>
<br>
        /* Apply any gain/exposure settings that the IPA may have passed back. */<br>
        if (!startConfig.controls.empty())<br>
-- <br>
2.20.1<br>
<br>
</blockquote></div></div>