Message ID | 20230605091406.31757-3-naush@raspberrypi.com |
---|---|
State | Accepted |
Headers | show |
Series |
|
Related | show |
Hi Naush On Mon, Jun 05, 2023 at 10:14:05AM +0100, Naushir Patuck via libcamera-devel wrote: > In addition to sensor controls, return lens controls from > IpaBase::configure() back to the pipeline handler. If there are lens > controls present in the ControlList, action them in the pipeline handler > as part of the configure routine. > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> 2/3 and 3/3 could be squashed for both Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Thanks j > --- > include/libcamera/ipa/raspberrypi.mojom | 3 ++- > src/ipa/rpi/common/ipa_base.cpp | 2 +- > src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 6 ++++-- > 3 files changed, 7 insertions(+), 4 deletions(-) > > diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom > index ba786e647ca1..4f20792e4679 100644 > --- a/include/libcamera/ipa/raspberrypi.mojom > +++ b/include/libcamera/ipa/raspberrypi.mojom > @@ -46,7 +46,8 @@ struct ConfigParams { > struct ConfigResult { > float modeSensitivity; > libcamera.ControlInfoMap controlInfo; > - libcamera.ControlList controls; > + libcamera.ControlList sensorControls; > + libcamera.ControlList lensControls; > }; > > struct StartResult { > diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp > index db7a0eb3a1ca..599ad146a863 100644 > --- a/src/ipa/rpi/common/ipa_base.cpp > +++ b/src/ipa/rpi/common/ipa_base.cpp > @@ -201,7 +201,7 @@ int32_t IpaBase::configure(const IPACameraSensorInfo &sensorInfo, const ConfigPa > applyAGC(&agcStatus, ctrls); > } > > - result->controls = std::move(ctrls); > + result->sensorControls = std::move(ctrls); > > /* > * Apply the correct limits to the exposure, gain and frame duration controls > diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp > index 3bb5ec531e4f..2ab0b971149a 100644 > --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp > +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp > @@ -1192,8 +1192,10 @@ int CameraData::configureIPA(const CameraConfiguration *config, ipa::RPi::Config > return -EPIPE; > } > > - if (!result->controls.empty()) > - setSensorControls(result->controls); > + if (!result->sensorControls.empty()) > + setSensorControls(result->sensorControls); > + if (!result->lensControls.empty()) > + setLensControls(result->lensControls); > > return 0; > } > -- > 2.34.1 >
diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom index ba786e647ca1..4f20792e4679 100644 --- a/include/libcamera/ipa/raspberrypi.mojom +++ b/include/libcamera/ipa/raspberrypi.mojom @@ -46,7 +46,8 @@ struct ConfigParams { struct ConfigResult { float modeSensitivity; libcamera.ControlInfoMap controlInfo; - libcamera.ControlList controls; + libcamera.ControlList sensorControls; + libcamera.ControlList lensControls; }; struct StartResult { diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp index db7a0eb3a1ca..599ad146a863 100644 --- a/src/ipa/rpi/common/ipa_base.cpp +++ b/src/ipa/rpi/common/ipa_base.cpp @@ -201,7 +201,7 @@ int32_t IpaBase::configure(const IPACameraSensorInfo &sensorInfo, const ConfigPa applyAGC(&agcStatus, ctrls); } - result->controls = std::move(ctrls); + result->sensorControls = std::move(ctrls); /* * Apply the correct limits to the exposure, gain and frame duration controls diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp index 3bb5ec531e4f..2ab0b971149a 100644 --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp @@ -1192,8 +1192,10 @@ int CameraData::configureIPA(const CameraConfiguration *config, ipa::RPi::Config return -EPIPE; } - if (!result->controls.empty()) - setSensorControls(result->controls); + if (!result->sensorControls.empty()) + setSensorControls(result->sensorControls); + if (!result->lensControls.empty()) + setLensControls(result->lensControls); return 0; }