[libcamera-devel,IPU3-IPA] ipu3: Use new sensor controls
diff mbox series

Message ID 20210928101007.452727-1-kieran.bingham@ideasonboard.com
State Accepted
Headers show
Series
  • [libcamera-devel,IPU3-IPA] ipu3: Use new sensor controls
Related show

Commit Message

Kieran Bingham Sept. 28, 2021, 10:10 a.m. UTC
The IPU3 interface was updated in 4c1fc33d8ab9 ("libcamera: ipu3: Drop
entityControls map") where the sensor controls are given their own
dedicated control list and is named accordingly.

Update the IPU3 IPA to match the new interface update.

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

Comments

Jean-Michel Hautbois Sept. 28, 2021, 10:32 a.m. UTC | #1
Hi Kieran,

On 28/09/2021 12:10, Kieran Bingham wrote:
> The IPU3 interface was updated in 4c1fc33d8ab9 ("libcamera: ipu3: Drop
> entityControls map") where the sensor controls are given their own
> dedicated control list and is named accordingly.
> 
> Update the IPU3 IPA to match the new interface update.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>

> ---
>  ipu3.cpp | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/ipu3.cpp b/ipu3.cpp
> index 3e89e6dd4e02..b60c58c990af 100644
> --- a/ipu3.cpp
> +++ b/ipu3.cpp
> @@ -201,14 +201,14 @@ int IPAIPU3::start()
>  
>  int IPAIPU3::configure(const IPAConfigInfo &configInfo)
>  {
> -	if (configInfo.entityControls.empty()) {
> -		LOG(IPAIPU3, Error) << "No controls provided";
> +	if (configInfo.sensorControls.empty()) {
> +		LOG(IPAIPU3, Error) << "No sensor controls provided";
>  		return -ENODATA;
>  	}
>  
>  	sensorInfo_ = configInfo.sensorInfo;
>  
> -	ctrls_ = configInfo.entityControls.at(0);
> +	ctrls_ = configInfo.sensorControls;
>  
>  	const auto itExp = ctrls_.find(V4L2_CID_EXPOSURE);
>  	if (itExp == ctrls_.end()) {
>
Umang Jain Sept. 28, 2021, 11:03 a.m. UTC | #2
Hi Kieran

On 9/28/21 3:40 PM, Kieran Bingham wrote:
> The IPU3 interface was updated in 4c1fc33d8ab9 ("libcamera: ipu3: Drop
> entityControls map") where the sensor controls are given their own
> dedicated control list and is named accordingly.
>
> Update the IPU3 IPA to match the new interface update.
>
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>


Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>

> ---
>   ipu3.cpp | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/ipu3.cpp b/ipu3.cpp
> index 3e89e6dd4e02..b60c58c990af 100644
> --- a/ipu3.cpp
> +++ b/ipu3.cpp
> @@ -201,14 +201,14 @@ int IPAIPU3::start()
>   
>   int IPAIPU3::configure(const IPAConfigInfo &configInfo)
>   {
> -	if (configInfo.entityControls.empty()) {
> -		LOG(IPAIPU3, Error) << "No controls provided";
> +	if (configInfo.sensorControls.empty()) {
> +		LOG(IPAIPU3, Error) << "No sensor controls provided";
>   		return -ENODATA;
>   	}
>   
>   	sensorInfo_ = configInfo.sensorInfo;
>   
> -	ctrls_ = configInfo.entityControls.at(0);
> +	ctrls_ = configInfo.sensorControls;
>   
>   	const auto itExp = ctrls_.find(V4L2_CID_EXPOSURE);
>   	if (itExp == ctrls_.end()) {
Jacopo Mondi Sept. 28, 2021, noon UTC | #3
Hi Kieran,

On Tue, Sep 28, 2021 at 12:32:39PM +0200, Jean-Michel Hautbois wrote:
> Hi Kieran,
>
> On 28/09/2021 12:10, Kieran Bingham wrote:
> > The IPU3 interface was updated in 4c1fc33d8ab9 ("libcamera: ipu3: Drop
> > entityControls map") where the sensor controls are given their own
> > dedicated control list and is named accordingly.
> >
> > Update the IPU3 IPA to match the new interface update.
> >
> > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>

Thanks
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>

>
> > ---
> >  ipu3.cpp | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/ipu3.cpp b/ipu3.cpp
> > index 3e89e6dd4e02..b60c58c990af 100644
> > --- a/ipu3.cpp
> > +++ b/ipu3.cpp
> > @@ -201,14 +201,14 @@ int IPAIPU3::start()
> >
> >  int IPAIPU3::configure(const IPAConfigInfo &configInfo)
> >  {
> > -	if (configInfo.entityControls.empty()) {
> > -		LOG(IPAIPU3, Error) << "No controls provided";
> > +	if (configInfo.sensorControls.empty()) {
> > +		LOG(IPAIPU3, Error) << "No sensor controls provided";
> >  		return -ENODATA;
> >  	}
> >
> >  	sensorInfo_ = configInfo.sensorInfo;
> >
> > -	ctrls_ = configInfo.entityControls.at(0);
> > +	ctrls_ = configInfo.sensorControls;
> >
> >  	const auto itExp = ctrls_.find(V4L2_CID_EXPOSURE);
> >  	if (itExp == ctrls_.end()) {
> >

Patch
diff mbox series

diff --git a/ipu3.cpp b/ipu3.cpp
index 3e89e6dd4e02..b60c58c990af 100644
--- a/ipu3.cpp
+++ b/ipu3.cpp
@@ -201,14 +201,14 @@  int IPAIPU3::start()
 
 int IPAIPU3::configure(const IPAConfigInfo &configInfo)
 {
-	if (configInfo.entityControls.empty()) {
-		LOG(IPAIPU3, Error) << "No controls provided";
+	if (configInfo.sensorControls.empty()) {
+		LOG(IPAIPU3, Error) << "No sensor controls provided";
 		return -ENODATA;
 	}
 
 	sensorInfo_ = configInfo.sensorInfo;
 
-	ctrls_ = configInfo.entityControls.at(0);
+	ctrls_ = configInfo.sensorControls;
 
 	const auto itExp = ctrls_.find(V4L2_CID_EXPOSURE);
 	if (itExp == ctrls_.end()) {