diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ipa/raspberrypi/raspberrypi.cpp | 12 | ||||
-rw-r--r-- | src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 10 |
2 files changed, 10 insertions, 12 deletions
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<void *>(ipaConfig.data[0]); + lsTableHandle_ = ipaConfig.data[1]; + } } void IPARPi::mapBuffers(const std::vector<IPABuffer> &buffers) @@ -354,12 +360,6 @@ void IPARPi::processEvent(const IPAOperationData &event) break; } - case RPI_IPA_EVENT_LS_TABLE_ALLOCATION: { - lsTable_ = reinterpret_cast<void *>(event.data[0]); - lsTableHandle_ = event.data[1]; - break; - } - default: LOG(IPARPI, Error) << "Unknown event " << event.operation; break; diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index 12241590..dfcc7506 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -1121,6 +1121,7 @@ int RPiCameraData::configureIPA() { std::map<unsigned int, IPAStream> streamConfig; std::map<unsigned int, const ControlInfoMap &> entityControls; + IPAOperationData ipaConfig = {}; /* Get the device format to pass to the IPA. */ V4L2DeviceFormat sensorFormat; @@ -1155,11 +1156,9 @@ int RPiCameraData::configureIPA() * IPA module isolation and should be reworked when vc_sma_cma * will permit. */ - IPAOperationData op; - op.operation = RPI_IPA_EVENT_LS_TABLE_ALLOCATION; - op.data = { static_cast<uint32_t>(ptr & 0xffffffff), - vcsm_.getVCHandle(lsTable_) }; - ipa_->processEvent(op); + ipaConfig.operation = RPI_IPA_CONFIG_LS_TABLE; + ipaConfig.data = { static_cast<uint32_t>(ptr & 0xffffffff), + vcsm_.getVCHandle(lsTable_) }; } CameraSensorInfo sensorInfo = {}; @@ -1170,7 +1169,6 @@ int RPiCameraData::configureIPA() } /* Ready the IPA - it must know about the sensor resolution. */ - IPAOperationData ipaConfig; ipa_->configure(sensorInfo, streamConfig, entityControls, ipaConfig, nullptr); |