[libcamera-devel,11/22] ipu3: Populate the EventProcessCall with the sensor controls
diff mbox series

Message ID 20211108131350.130665-12-jeanmichel.hautbois@ideasonboard.com
State Superseded
Headers show
Series
  • IPA: IPU3: Introduce per-frame controls
Related show

Commit Message

Jean-Michel Hautbois Nov. 8, 2021, 1:13 p.m. UTC
When EventProcessCall is to be sent, we populate the controls and notify
the IPA. Add the sensor controls in the event to notify their values for
the given frame.

Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
---
 src/libcamera/pipeline/ipu3/ipu3.cpp | 1 +
 1 file changed, 1 insertion(+)

Comments

Kieran Bingham Nov. 8, 2021, 3:34 p.m. UTC | #1
Quoting Jean-Michel Hautbois (2021-11-08 13:13:39)
> When EventProcessCall is to be sent, we populate the controls and notify
> the IPA. Add the sensor controls in the event to notify their values for
> the given frame.

ProcessControls (I think) is where the IPA has the opportunity to handle
any controls from the request that has come in for a new frame. Is that
right?

Does that operation 'need' the sensor controls? or is it just an
earliest opportunity to update the IPA with the current/known sensor
control list?

Either way, it feels like this needs more explaining, either here in the
commit message, or as a comment when adding it.

Although, of course reading the title of the operation,
'ProcessControls' perhaps processing the sensor controls is part of
that ...

Looking at how this occurs in queuePendingRequests() it feels really
wrong to be calling into delayedCtrls_ here ... but maybe I'm missing
something.

This 'operation' is about queueing up a new request. We might queue up 4
requests in quick succession, so I don't think the sensorControls list
would be accurate at this point...




> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
> ---
>  src/libcamera/pipeline/ipu3/ipu3.cpp | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> index 3fcfa777..5d87f6e5 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -862,6 +862,7 @@ void IPU3CameraData::queuePendingRequests()
>                 ev.op = ipa::ipu3::EventProcessControls;
>                 ev.frame = info->id;
>                 ev.controls = request->controls();
> +               ev.sensorControls = delayedCtrls_->get(ev.frame);
>                 ipa_->processEvent(ev);
>  
>                 pendingRequests_.pop();
> -- 
> 2.32.0
>

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 3fcfa777..5d87f6e5 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -862,6 +862,7 @@  void IPU3CameraData::queuePendingRequests()
 		ev.op = ipa::ipu3::EventProcessControls;
 		ev.frame = info->id;
 		ev.controls = request->controls();
+		ev.sensorControls = delayedCtrls_->get(ev.frame);
 		ipa_->processEvent(ev);
 
 		pendingRequests_.pop();