pipeline: rkisp1: Limit the maximum number of buffers queued in

To keep the regulation of the algorithms as fast as possible and at the
same time allow more buffers to be allocated, limit the amount of
buffers that get queued into the device to the pipeline depth plus a
tiny margin.

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Tested-by: Sven Püschel <s.pueschel@pengutronix.de>
Reviewed-by: Umang Jain <uajain@igalia.com>
This commit is contained in:
Stefan Klug
2025-07-17 14:59:23 +02:00
parent bfd325608d
commit 1ed284ba48

View File

@@ -155,6 +155,18 @@ private:
Transform combinedTransform_;
};
namespace {
/*
* Maximum number of requests that shall be queued into the pipeline to keep
* the regulation fast.
* \todo This needs revisiting as soon as buffers got decoupled from requests
* and/or a fast path for controls was implemented.
*/
static constexpr unsigned int kRkISP1MaxQueuedRequests = 4;
} /* namespace */
class PipelineHandlerRkISP1 : public PipelineHandler
{
public:
@@ -684,7 +696,8 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()
*/
PipelineHandlerRkISP1::PipelineHandlerRkISP1(CameraManager *manager)
: PipelineHandler(manager), hasSelfPath_(true), useDewarper_(false)
: PipelineHandler(manager, kRkISP1MaxQueuedRequests),
hasSelfPath_(true), useDewarper_(false)
{
}