| Message ID | 20260122-ipa-controls-v1-1-b8c4c345f7ae@ideasonboard.com |
|---|---|
| State | Accepted |
| Commit | 202e330789f7bfcf0c6d32bcc0041f664f892b02 |
| Headers | show |
| Series |
|
| Related | show |
2026. 01. 22. 18:48 keltezéssel, Jacopo Mondi írta: > Similar to what commit acfd60276763 ("ipa: rkisp1: Fix algorithm controls > vanish after configure") did for the RkISP1 IPA, replace the usage of > unordered_map::merge() at updateControls() time with > unordered_map::insert(). > > As unordered_map::merge moves items from the source map, it deletes > controls registered at algorithms initialization time in the > ipaContext.ctrlMap. As at configure() time updateControls() is called > again and the list of Camera controls is refreshed, the controls > registered at algorithms initialization time are lost. > > Fixes: fe989ee51498 ("ipa: mali-c55: Add Mali-C55 ISP IPA module") > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> > --- Looks ok to me. Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > src/ipa/mali-c55/mali-c55.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/ipa/mali-c55/mali-c55.cpp b/src/ipa/mali-c55/mali-c55.cpp > index 1d2a4f75cf8c..c626e246643b 100644 > --- a/src/ipa/mali-c55/mali-c55.cpp > +++ b/src/ipa/mali-c55/mali-c55.cpp > @@ -264,7 +264,7 @@ void IPAMaliC55::updateControls(const IPACameraSensorInfo &sensorInfo, > * Merge in any controls that we support either statically or from the > * algorithms. > */ > - ctrlMap.merge(context_.ctrlMap); > + ctrlMap.insert(context_.ctrlMap.begin(), context_.ctrlMap.end()); > > *ipaControls = ControlInfoMap(std::move(ctrlMap), controls::controls); > } >
Quoting Jacopo Mondi (2026-01-22 17:48:28) > Similar to what commit acfd60276763 ("ipa: rkisp1: Fix algorithm controls > vanish after configure") did for the RkISP1 IPA, replace the usage of > unordered_map::merge() at updateControls() time with > unordered_map::insert(). > > As unordered_map::merge moves items from the source map, it deletes > controls registered at algorithms initialization time in the > ipaContext.ctrlMap. As at configure() time updateControls() is called > again and the list of Camera controls is refreshed, the controls > registered at algorithms initialization time are lost. > > Fixes: fe989ee51498 ("ipa: mali-c55: Add Mali-C55 ISP IPA module") > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > --- > src/ipa/mali-c55/mali-c55.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/ipa/mali-c55/mali-c55.cpp b/src/ipa/mali-c55/mali-c55.cpp > index 1d2a4f75cf8c..c626e246643b 100644 > --- a/src/ipa/mali-c55/mali-c55.cpp > +++ b/src/ipa/mali-c55/mali-c55.cpp > @@ -264,7 +264,7 @@ void IPAMaliC55::updateControls(const IPACameraSensorInfo &sensorInfo, > * Merge in any controls that we support either statically or from the > * algorithms. > */ > - ctrlMap.merge(context_.ctrlMap); > + ctrlMap.insert(context_.ctrlMap.begin(), context_.ctrlMap.end()); > > *ipaControls = ControlInfoMap(std::move(ctrlMap), controls::controls); > } > > -- > 2.52.0 >
diff --git a/src/ipa/mali-c55/mali-c55.cpp b/src/ipa/mali-c55/mali-c55.cpp index 1d2a4f75cf8c..c626e246643b 100644 --- a/src/ipa/mali-c55/mali-c55.cpp +++ b/src/ipa/mali-c55/mali-c55.cpp @@ -264,7 +264,7 @@ void IPAMaliC55::updateControls(const IPACameraSensorInfo &sensorInfo, * Merge in any controls that we support either statically or from the * algorithms. */ - ctrlMap.merge(context_.ctrlMap); + ctrlMap.insert(context_.ctrlMap.begin(), context_.ctrlMap.end()); *ipaControls = ControlInfoMap(std::move(ctrlMap), controls::controls); }
Similar to what commit acfd60276763 ("ipa: rkisp1: Fix algorithm controls vanish after configure") did for the RkISP1 IPA, replace the usage of unordered_map::merge() at updateControls() time with unordered_map::insert(). As unordered_map::merge moves items from the source map, it deletes controls registered at algorithms initialization time in the ipaContext.ctrlMap. As at configure() time updateControls() is called again and the list of Camera controls is refreshed, the controls registered at algorithms initialization time are lost. Fixes: fe989ee51498 ("ipa: mali-c55: Add Mali-C55 ISP IPA module") Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> --- src/ipa/mali-c55/mali-c55.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)