@@ -45,7 +45,7 @@ interface IPARkISP1Interface {
};
interface IPARkISP1EventInterface {
- paramsComputed(uint32 frame, uint32 bytesused);
+ paramsComputed(uint32 frame, uint32 bufferId, uint32 bytesused);
setSensorControls(uint32 frame, libcamera.ControlList sensorControls);
metadataReady(uint32 frame, libcamera.ControlList metadata);
};
@@ -381,7 +381,7 @@ void IPARkISP1::computeParams(const uint32_t frame, const uint32_t bufferId)
setSensorControls.emit(frame, ctrls);
if (bufferId != 0)
- paramsComputed.emit(frame, size);
+ paramsComputed.emit(frame, bufferId, size);
}
void IPARkISP1::processStats(const uint32_t frame, const uint32_t bufferId,
@@ -105,7 +105,7 @@ public:
bool canUseDewarper_;
bool usesDewarper_;
- void paramsComputed(unsigned int frame, unsigned int bytesused);
+ void paramsComputed(unsigned int frame, unsigned int bufferId, unsigned int bytesused);
private:
void setSensorControls(unsigned int frame,
const ControlList &sensorControls);
@@ -376,14 +376,14 @@ int RkISP1CameraData::loadTuningFile(const std::string &path)
return 0;
}
-void RkISP1CameraData::paramsComputed(unsigned int frame, unsigned int bytesused)
+void RkISP1CameraData::paramsComputed(unsigned int frame, unsigned int bufferId, unsigned int bytesused)
{
PipelineHandlerRkISP1 *pipe = RkISP1CameraData::pipe();
ParamBufferInfo &pInfo = pipe->computingParamBuffers_.front();
pipe->computingParamBuffers_.pop();
- ASSERT(pInfo.expectedSequence == frame);
FrameBuffer *buffer = pInfo.buffer;
+ ASSERT(buffer->cookie() == bufferId);
LOG(RkISP1Schedule, Debug) << "Queue params for " << frame << " " << buffer;
@@ -1225,7 +1225,7 @@ int PipelineHandlerRkISP1::start(Camera *camera, [[maybe_unused]] const ControlL
availableParamBuffers_.pop();
computingParamBuffers_.push({ paramBuffer, nextParamsSequence_++ });
paramsSyncHelper_.pushCorrection(0);
- data->paramsComputed(0, res.paramBufferBytesUsed);
+ data->paramsComputed(0, paramBufferId, res.paramBufferBytesUsed);
}
actions += [&]() { data->ipa_->stop(); };
The frame number is not necessarily unique. This should not be the case, but even misbehaving kernel drivers should not be able to interfere with that on the libcamera side. Pass the bufferId, to have a guaranteed unique handle. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> --- Changes in v2: - Added this patch --- include/libcamera/ipa/rkisp1.mojom | 2 +- src/ipa/rkisp1/rkisp1.cpp | 2 +- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-)