[libcamera-devel,RFC,12/12] ipa: ipu3: Transfer queueRequest() call to each algorithm
diff mbox series

Message ID 20220721121310.1286862-13-kieran.bingham@ideasonboard.com
State Superseded
Delegated to: Kieran Bingham
Headers show
Series
  • libcamera: Align IPU3 and RKISP1 interfaces
Related show

Commit Message

Kieran Bingham July 21, 2022, 12:13 p.m. UTC
Implement the IPU3 queueRequest() function to allow each algorithm
to process the user controls that it supports.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 src/ipa/ipu3/ipu3.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Umang Jain July 22, 2022, 9:21 p.m. UTC | #1
Hi Kieran,

On 7/21/22 17:43, Kieran Bingham via libcamera-devel wrote:
> Implement the IPU3 queueRequest() function to allow each algorithm
> to process the user controls that it supports.
>
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>


Looks good,

Can you summarize follow up to this patch? I believe each algorithm 
which take up ownership of the associated controls it manages ? That bit 
shall follow, right?

> ---
>   src/ipa/ipu3/ipu3.cpp | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
> index 4d7a54f8d1a5..ee28044fc40e 100644
> --- a/src/ipa/ipu3/ipu3.cpp
> +++ b/src/ipa/ipu3/ipu3.cpp
> @@ -620,12 +620,10 @@ void IPAIPU3::processStatsBuffer(const uint32_t frame,
>    */
>   void IPAIPU3::queueRequest(const uint32_t frame, const ControlList &controls)
>   {
> -	/* \todo Start processing for 'frame' based on 'controls'. */
>   	IPU3FrameContext &frameContext = context_.frameContexts.initialise(frame);
>   
> -	/* \todo Implement queueRequest to each algorithm. */
> -	(void)frameContext;
> -	(void)controls;
> +	for (auto const &algo : algorithms_)
> +		algo->queueRequest(context_, frame, frameContext, controls);
>   }
>   
>   /**
Kieran Bingham July 25, 2022, 3:47 p.m. UTC | #2
Quoting Umang Jain (2022-07-22 22:21:39)
> Hi Kieran,
> 
> On 7/21/22 17:43, Kieran Bingham via libcamera-devel wrote:
> > Implement the IPU3 queueRequest() function to allow each algorithm
> > to process the user controls that it supports.
> >
> > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> 
> 
> Looks good,
> 
> Can you summarize follow up to this patch? I believe each algorithm 
> which take up ownership of the associated controls it manages ? That bit 
> shall follow, right?

Yes, we've been limited in processing controls for algorithms on the
IPU3. I hope that this series will allow those patches to start flowing
to add the specific control handling for IPU3.

--
Kieran



> 
> > ---
> >   src/ipa/ipu3/ipu3.cpp | 6 ++----
> >   1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
> > index 4d7a54f8d1a5..ee28044fc40e 100644
> > --- a/src/ipa/ipu3/ipu3.cpp
> > +++ b/src/ipa/ipu3/ipu3.cpp
> > @@ -620,12 +620,10 @@ void IPAIPU3::processStatsBuffer(const uint32_t frame,
> >    */
> >   void IPAIPU3::queueRequest(const uint32_t frame, const ControlList &controls)
> >   {
> > -     /* \todo Start processing for 'frame' based on 'controls'. */
> >       IPU3FrameContext &frameContext = context_.frameContexts.initialise(frame);
> >   
> > -     /* \todo Implement queueRequest to each algorithm. */
> > -     (void)frameContext;
> > -     (void)controls;
> > +     for (auto const &algo : algorithms_)
> > +             algo->queueRequest(context_, frame, frameContext, controls);
> >   }
> >   
> >   /**

Patch
diff mbox series

diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
index 4d7a54f8d1a5..ee28044fc40e 100644
--- a/src/ipa/ipu3/ipu3.cpp
+++ b/src/ipa/ipu3/ipu3.cpp
@@ -620,12 +620,10 @@  void IPAIPU3::processStatsBuffer(const uint32_t frame,
  */
 void IPAIPU3::queueRequest(const uint32_t frame, const ControlList &controls)
 {
-	/* \todo Start processing for 'frame' based on 'controls'. */
 	IPU3FrameContext &frameContext = context_.frameContexts.initialise(frame);
 
-	/* \todo Implement queueRequest to each algorithm. */
-	(void)frameContext;
-	(void)controls;
+	for (auto const &algo : algorithms_)
+		algo->queueRequest(context_, frame, frameContext, controls);
 }
 
 /**