From 73bb12168fe74f5e557e8ee089209cc481d2c5ac Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Thu, 24 Sep 2020 16:03:31 +0200 Subject: libcamera: ipu3: Adjust comment on ImgU configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Be more precise in commenting why the ImgU shall not be configured if only the RAW stream is requested. As an example, if the ImgU gets unecessary configured: cam -srole=viewfinder -c2 -C -> WORKS cam -srole=stillraw -c2 -C -> WORKS cam -srole=viewfinder -c2 -C -> Failed to queue buffer 0: Invalid argument Since commit ("libcamera: ipu3: Fix RAW+YUV capture") the ImgU configuration procedure also correctly implements the assumption that at least one of the YUV output is being operated. If that's not the case, as in the RAW-only capture use case, the code tries to access a non-existing configuration. One more reason to exit early if no YUV stream is requested. Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Signed-off-by: Jacopo Mondi --- src/libcamera/pipeline/ipu3/ipu3.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index f9b65020..4210824b 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -464,9 +464,10 @@ int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c) return ret; /* - * If the ImgU gets configured with proper IF, BDS and GDC sizes, it - * is then expected that frames are dequeued from its main output - * otherwise the system stalls. + * If the ImgU gets configured, its driver seems to expect that + * buffers will be queued to its outputs, as otherwise the next + * capture session that uses the ImgU fails when queueing + * buffers to its input. * * If no ImgU configuration has been computed, it means only a RAW * stream has been requested: return here to skip the ImgU configuration -- cgit v1.2.1