| Message ID | 20251012142052.90611-2-robert.mader@collabora.com |
|---|---|
| State | Accepted |
| Commit | d82780801db776038ecbe1c181446f7b4e098dba |
| Headers | show |
| Series |
|
| Related | show |
On Sun, Oct 12, 2025 at 04:20:50PM +0200, Robert Mader wrote: > In order to prepare for the pipeline handler to support higher buffer > counts than 4, limit the number of queued requests to this number as > apps otherwise may exhaust the limit of frame contexts (see > ipa::soft::kMaxFrameContexts => 16). > > Suggested-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > Signed-off-by: Robert Mader <robert.mader@collabora.com> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > Tested-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > --- > src/libcamera/pipeline/simple/simple.cpp | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp > index c816cffc9..6e8271346 100644 > --- a/src/libcamera/pipeline/simple/simple.cpp > +++ b/src/libcamera/pipeline/simple/simple.cpp > @@ -417,6 +417,7 @@ protected: > int queueRequestDevice(Camera *camera, Request *request) override; > > private: > + static constexpr unsigned int kMaxQueuedRequestsDevice = 4; 4 seems fairly low, given the 16 frame contexts. All this will need to be revisited. Stefan is reworking the rkisp1 pipeline handler and IPA module to better handle requests, I think we can live with 4 requests for the time being in the simple pipeline handler and later rework it the same way as rkisp1 (and everything else really). Stefan, does that sound like a good strategy to you ? > static constexpr unsigned int kNumInternalBuffers = 3; > > struct EntityData { > @@ -1273,7 +1274,8 @@ CameraConfiguration::Status SimpleCameraConfiguration::validate() > */ > > SimplePipelineHandler::SimplePipelineHandler(CameraManager *manager) > - : PipelineHandler(manager), converter_(nullptr) > + : PipelineHandler(manager, kMaxQueuedRequestsDevice), > + converter_(nullptr) > { > } >
diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp index c816cffc9..6e8271346 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp @@ -417,6 +417,7 @@ protected: int queueRequestDevice(Camera *camera, Request *request) override; private: + static constexpr unsigned int kMaxQueuedRequestsDevice = 4; static constexpr unsigned int kNumInternalBuffers = 3; struct EntityData { @@ -1273,7 +1274,8 @@ CameraConfiguration::Status SimpleCameraConfiguration::validate() */ SimplePipelineHandler::SimplePipelineHandler(CameraManager *manager) - : PipelineHandler(manager), converter_(nullptr) + : PipelineHandler(manager, kMaxQueuedRequestsDevice), + converter_(nullptr) { }