pipeline: rpi: Remove ispOutputCount_ and ispOutputTotal_

With the drop frame logic removed from the pipeline handler, these
member variables and not used, so remove them.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Naushir Patuck 2025-06-06 11:55:23 +01:00 committed by Kieran Bingham
parent 98d144fef3
commit a402f9ebc1
3 changed files with 1 additions and 32 deletions

View file

@ -48,8 +48,7 @@ class CameraData : public Camera::Private
public: public:
CameraData(PipelineHandler *pipe) CameraData(PipelineHandler *pipe)
: Camera::Private(pipe), state_(State::Stopped), : Camera::Private(pipe), state_(State::Stopped),
startupFrameCount_(0), invalidFrameCount_(0), buffersAllocated_(false), startupFrameCount_(0), invalidFrameCount_(0), buffersAllocated_(false)
ispOutputCount_(0), ispOutputTotal_(0)
{ {
} }
@ -179,9 +178,6 @@ protected:
virtual void tryRunPipeline() = 0; virtual void tryRunPipeline() = 0;
unsigned int ispOutputCount_;
unsigned int ispOutputTotal_;
private: private:
void checkRequestCompleted(); void checkRequestCompleted();
}; };

View file

@ -1834,12 +1834,6 @@ void PiSPCameraData::beOutputDequeue(FrameBuffer *buffer)
dmabufSyncEnd(buffer->planes()[0].fd); dmabufSyncEnd(buffer->planes()[0].fd);
handleStreamBuffer(buffer, stream); handleStreamBuffer(buffer, stream);
/*
* Increment the number of ISP outputs generated.
* This is needed to track dropped frames.
*/
ispOutputCount_++;
handleState(); handleState();
} }
@ -1885,7 +1879,6 @@ void PiSPCameraData::prepareIspComplete(const ipa::RPi::BufferIds &buffers, bool
* If there is no need to run the Backend, just signal that the * If there is no need to run the Backend, just signal that the
* input buffer is completed and all Backend outputs are ready. * input buffer is completed and all Backend outputs are ready.
*/ */
ispOutputCount_ = ispOutputTotal_;
buffer = cfe_[Cfe::Output0].getBuffers().at(bayerId).buffer; buffer = cfe_[Cfe::Output0].getBuffers().at(bayerId).buffer;
handleStreamBuffer(buffer, &cfe_[Cfe::Output0]); handleStreamBuffer(buffer, &cfe_[Cfe::Output0]);
} else } else
@ -1994,7 +1987,6 @@ int PiSPCameraData::configureBe(const std::optional<ColorSpace> &yuvColorSpace)
global.bayer_enables |= PISP_BE_BAYER_ENABLE_INPUT; global.bayer_enables |= PISP_BE_BAYER_ENABLE_INPUT;
global.bayer_order = toPiSPBayerOrder(cfeFormat.fourcc); global.bayer_order = toPiSPBayerOrder(cfeFormat.fourcc);
ispOutputTotal_ = 1; /* Config buffer */
if (PISP_IMAGE_FORMAT_COMPRESSED(inputFormat.format)) { if (PISP_IMAGE_FORMAT_COMPRESSED(inputFormat.format)) {
pisp_decompress_config decompress; pisp_decompress_config decompress;
decompress.offset = DefaultCompressionOffset; decompress.offset = DefaultCompressionOffset;
@ -2025,7 +2017,6 @@ int PiSPCameraData::configureBe(const std::optional<ColorSpace> &yuvColorSpace)
setupOutputClipping(ispFormat0, outputFormat0); setupOutputClipping(ispFormat0, outputFormat0);
be_->SetOutputFormat(0, outputFormat0); be_->SetOutputFormat(0, outputFormat0);
ispOutputTotal_++;
} }
if (global.rgb_enables & PISP_BE_RGB_ENABLE_OUTPUT1) { if (global.rgb_enables & PISP_BE_RGB_ENABLE_OUTPUT1) {
@ -2049,7 +2040,6 @@ int PiSPCameraData::configureBe(const std::optional<ColorSpace> &yuvColorSpace)
setupOutputClipping(ispFormat1, outputFormat1); setupOutputClipping(ispFormat1, outputFormat1);
be_->SetOutputFormat(1, outputFormat1); be_->SetOutputFormat(1, outputFormat1);
ispOutputTotal_++;
} }
/* Setup the TDN I/O blocks in case TDN gets turned on later. */ /* Setup the TDN I/O blocks in case TDN gets turned on later. */
@ -2256,8 +2246,6 @@ void PiSPCameraData::prepareCfe()
void PiSPCameraData::prepareBe(uint32_t bufferId, bool stitchSwapBuffers) void PiSPCameraData::prepareBe(uint32_t bufferId, bool stitchSwapBuffers)
{ {
ispOutputCount_ = 0;
FrameBuffer *buffer = cfe_[Cfe::Output0].getBuffers().at(bufferId).buffer; FrameBuffer *buffer = cfe_[Cfe::Output0].getBuffers().at(bufferId).buffer;
LOG(RPI, Debug) << "Input re-queue to ISP, buffer id " << bufferId LOG(RPI, Debug) << "Input re-queue to ISP, buffer id " << bufferId

View file

@ -597,8 +597,6 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi
stream->setFlags(StreamFlag::External); stream->setFlags(StreamFlag::External);
} }
ispOutputTotal_ = outStreams.size();
/* /*
* If ISP::Output0 stream has not been configured by the application, * If ISP::Output0 stream has not been configured by the application,
* we must allow the hardware to generate an output so that the data * we must allow the hardware to generate an output so that the data
@ -625,8 +623,6 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi
return -EINVAL; return -EINVAL;
} }
ispOutputTotal_++;
LOG(RPI, Debug) << "Defaulting ISP Output0 format to " LOG(RPI, Debug) << "Defaulting ISP Output0 format to "
<< format; << format;
} }
@ -662,8 +658,6 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi
<< ret; << ret;
return -EINVAL; return -EINVAL;
} }
ispOutputTotal_++;
} }
/* ISP statistics output format. */ /* ISP statistics output format. */
@ -676,8 +670,6 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi
return ret; return ret;
} }
ispOutputTotal_++;
/* /*
* Configure the Unicam embedded data output format only if the sensor * Configure the Unicam embedded data output format only if the sensor
* supports it. * supports it.
@ -843,12 +835,6 @@ void Vc4CameraData::ispOutputDequeue(FrameBuffer *buffer)
handleStreamBuffer(buffer, stream); handleStreamBuffer(buffer, stream);
} }
/*
* Increment the number of ISP outputs generated.
* This is needed to track dropped frames.
*/
ispOutputCount_++;
handleState(); handleState();
} }
@ -880,7 +866,6 @@ void Vc4CameraData::prepareIspComplete(const ipa::RPi::BufferIds &buffers,
<< ", timestamp: " << buffer->metadata().timestamp; << ", timestamp: " << buffer->metadata().timestamp;
isp_[Isp::Input].queueBuffer(buffer); isp_[Isp::Input].queueBuffer(buffer);
ispOutputCount_ = 0;
if (sensorMetadata_ && embeddedId) { if (sensorMetadata_ && embeddedId) {
buffer = unicam_[Unicam::Embedded].getBuffers().at(embeddedId & RPi::MaskID).buffer; buffer = unicam_[Unicam::Embedded].getBuffers().at(embeddedId & RPi::MaskID).buffer;