[libcamera-devel,16/22] ipa: ipu3: Introduce sensor controls
diff mbox series

Message ID 20211108131350.130665-17-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
Pass the sensor controls as well as the libcamera controls to
processControl() on an EventProcessControls event received. This will be
used to populate the frame context.

Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
---
 src/ipa/ipu3/ipu3.cpp | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

Comments

Kieran Bingham Nov. 8, 2021, 3:47 p.m. UTC | #1
Quoting Jean-Michel Hautbois (2021-11-08 13:13:44)
> Pass the sensor controls as well as the libcamera controls to
> processControl() on an EventProcessControls event received. This will be
> used to populate the frame context.

I'm ... really still not sure that this is the right time to get sensor
controls. I'm not convinced it's getting the right data, at the right
time.

Hopefully I'll be proven wrong later...

> 
> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
> ---
>  src/ipa/ipu3/ipu3.cpp | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
> index dcf4da65..177c5c2f 100644
> --- a/src/ipa/ipu3/ipu3.cpp
> +++ b/src/ipa/ipu3/ipu3.cpp
> @@ -151,7 +151,9 @@ private:
>                             ControlInfoMap *ipaControls);
>         void updateSessionConfiguration(const IPACameraSensorInfo &sensorInfo,
>                                         const ControlInfoMap &sensorControls);
> -       void processControls(unsigned int frame, const ControlList &controls);
> +       void processControls(unsigned int frame,
> +                            const ControlList &controls,
> +                            const ControlList &sensorCtrls);
>         void fillParams(unsigned int frame, ipu3_uapi_params *params);
>         void parseStatistics(unsigned int frame,
>                              int64_t frameTimestamp,
> @@ -549,7 +551,7 @@ void IPAIPU3::processEvent(const IPU3Event &event)
>                  * a new frame.
>                  */
>                 frameStarted(event.frame);
> -               processControls(event.frame, event.controls);
> +               processControls(event.frame, event.controls, event.sensorControls);
>                 break;
>         }
>         case EventFillParams: {
> @@ -601,12 +603,14 @@ void IPAIPU3::processEvent(const IPU3Event &event)
>   * \brief Process a control list for a request from the application
>   * \param[in] frame The number of the frame which will be processed next
>   * \param[in] controls The controls for the \a frame
> + * \param[in] controls The sensor controls for the \a frame
>   *
>   * Parse the request to handle any IPA-managed controls that were set from the
>   * application such as manual sensor settings.
>   */
>  void IPAIPU3::processControls([[maybe_unused]] unsigned int frame,
> -                             [[maybe_unused]] const ControlList &controls)
> +                             [[maybe_unused]] const ControlList &controls,
> +                             [[maybe_unused]] const ControlList &sensorCtrls)
>  {
>         /* \todo Start processing for 'frame' based on 'controls'. */
>  }
> -- 
> 2.32.0
>

Patch
diff mbox series

diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
index dcf4da65..177c5c2f 100644
--- a/src/ipa/ipu3/ipu3.cpp
+++ b/src/ipa/ipu3/ipu3.cpp
@@ -151,7 +151,9 @@  private:
 			    ControlInfoMap *ipaControls);
 	void updateSessionConfiguration(const IPACameraSensorInfo &sensorInfo,
 					const ControlInfoMap &sensorControls);
-	void processControls(unsigned int frame, const ControlList &controls);
+	void processControls(unsigned int frame,
+			     const ControlList &controls,
+			     const ControlList &sensorCtrls);
 	void fillParams(unsigned int frame, ipu3_uapi_params *params);
 	void parseStatistics(unsigned int frame,
 			     int64_t frameTimestamp,
@@ -549,7 +551,7 @@  void IPAIPU3::processEvent(const IPU3Event &event)
 		 * a new frame.
 		 */
 		frameStarted(event.frame);
-		processControls(event.frame, event.controls);
+		processControls(event.frame, event.controls, event.sensorControls);
 		break;
 	}
 	case EventFillParams: {
@@ -601,12 +603,14 @@  void IPAIPU3::processEvent(const IPU3Event &event)
  * \brief Process a control list for a request from the application
  * \param[in] frame The number of the frame which will be processed next
  * \param[in] controls The controls for the \a frame
+ * \param[in] controls The sensor controls for the \a frame
  *
  * Parse the request to handle any IPA-managed controls that were set from the
  * application such as manual sensor settings.
  */
 void IPAIPU3::processControls([[maybe_unused]] unsigned int frame,
-			      [[maybe_unused]] const ControlList &controls)
+			      [[maybe_unused]] const ControlList &controls,
+			      [[maybe_unused]] const ControlList &sensorCtrls)
 {
 	/* \todo Start processing for 'frame' based on 'controls'. */
 }