From 40ed8b3b75aa518226bbe35f6216797d4832341e Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 29 Jun 2020 00:42:20 +0300 Subject: ipa: raspberrypi: Pass lens shading table through configure() function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The IPAInterface::configure() function now accepts custom configuration data. Use it to pass the lens shading table instead of using a custom IPA event. This will allow starting the IPA when starting the camera, instead of pre-starting it early in order to process the lens shading table allocation event. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Naushir Patuck --- src/ipa/raspberrypi/raspberrypi.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/ipa') diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp index 851597f0..b412260b 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -272,6 +272,12 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo, applyAGC(&agcStatus); lastMode_ = mode_; + + /* Store the lens shading table pointer and handle if available. */ + if (ipaConfig.operation & RPI_IPA_CONFIG_LS_TABLE) { + lsTable_ = reinterpret_cast(ipaConfig.data[0]); + lsTableHandle_ = ipaConfig.data[1]; + } } void IPARPi::mapBuffers(const std::vector &buffers) @@ -354,12 +360,6 @@ void IPARPi::processEvent(const IPAOperationData &event) break; } - case RPI_IPA_EVENT_LS_TABLE_ALLOCATION: { - lsTable_ = reinterpret_cast(event.data[0]); - lsTableHandle_ = event.data[1]; - break; - } - default: LOG(IPARPI, Error) << "Unknown event " << event.operation; break; -- cgit v1.2.1