[{"id":11393,"web_url":"https://patchwork.libcamera.org/comment/11393/","msgid":"<20200714221144.GI5854@pendragon.ideasonboard.com>","date":"2020-07-14T22:11:44","subject":"Re: [libcamera-devel] [PATCH 00/20] libcamera: ipu3: Rework pipe\n\tconfiguration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nOn Tue, Jul 14, 2020 at 12:41:52PM +0200, Jacopo Mondi wrote:\n> Hello,\n>   quite a big update compared to v2, even if most changes happens in 3 patches\n> \n> The new stream size computations which happens at generateConfiguration()\n> and validate() time now enforces a new rule\n> -  All YUV streams should be aligned to the 64 pixels in widht and 32 pixels\n>    in height multiple which is strictly smaller than the CIO2 output frame.\n> \n> This is reflected in how configurations are generated, how the CIO2 size is\n> computed when no raw stream is requested, and how the YUV streams are adjusted\n> to respect this margin constraint and the device required alignment.\n> \n> Most of this changes happens in patch [5/20] and [14/20]\n> \n> I also have simplified a bit the ImgU pipe parameters calculation. There is\n> a huge space for improvements there probably, but I'm very cautious in touching\n> this. The changelog is in the patch for the records.\n\nI understand your concern here, so I won't push too hard, and we can\nimprove the code further on top.\n\n> Also, compared to v2, the ImgU pipe gets configured only if there's at least\n> one YUV stream requested, otherwise setting sizes for the IF and BDS rectangle\n> without actually capturing frames from any of the ImgU output, stalls the\n> ImgU which require system to be rebooted to work correctly again.\n\nThat's a lovely one :-) Could you capture this in a comment in the code\n? Should we avoid starting the ImgU at all in that case ? To be very\nclear, it's not something that needs to be fixed in this series.\n\n> Validated by using all the possible stream roles combinations, and inspecting\n> images which despite the horrible quality (as there's no 3A working) are\n> actually there.\n> \n> I'm sure that poking the system with more size combinations will highlight more\n> issues, but I still think this is an acceptable start.\n\nAbsolutely ! Thank you for your great work here.\n\n> v2 -> v3:\n> - Rework stream size logic to respect alignements and margins\n> - Add utils::alignUp/utils::alignDown\n> - Rework stream adjustments\n> - Simplify a bit the ImgU pipe parameters calculation\n> - Do not configure the ImgU if only RAW stream is requested\n> \n> Jacopo Mondi (19):\n>   libcamera: ipu3: Rename mbusCodesToInfo\n>   libcamera: utils: Add alignUp and alignDown functions\n>   libcamera: geometry: Add isNull() function to Rectangle class\n>   libcamera: ipu3: Remove streams from generateConfiguration\n>   libcamera: ipu3: Make sure the config is valid\n>   libcamera: ipu3: cio2: Report format and sizes\n>   libcamera: ipu3: Do not overwrite StreamConfiguration\n>   libcamera: ipu3: Report StreamFormats\n>   libcamera: ipu3: Remove initialization of Size\n>   libcamera: ipu3: Validate the stream combination\n>   libcamera: camera: Zero streams before validate()\n>   libcamera: ipu3: cio2: Mark sensor() as const\n>   libcamera: ipu3: Adjust and assign streams in validate()\n>   libcamera: ipu3: Remove streams from IPU3CameraConfiguration\n>   libcamera: ipu3: Remove camera_ from IPU3CameraConfiguration\n>   libcamera: ipu3: imgu: Calculate ImgU pipe configuration\n>   libcamera: ipu3: Validate the pipe configuration\n>   libcamera: ipu3: Configure ImgU with the computed parameters\n>   libcamera: ipu3: imgu: Rename configureInput()\n> \n> Laurent Pinchart (1):\n>   libcamera: geometry: Add helper functions to the Size class\n> \n>  include/libcamera/geometry.h         |  34 +++\n>  include/libcamera/internal/utils.h   |   3 +\n>  src/libcamera/camera.cpp             |   4 +-\n>  src/libcamera/geometry.cpp           |  42 +++\n>  src/libcamera/pipeline/ipu3/cio2.cpp |  54 +++-\n>  src/libcamera/pipeline/ipu3/cio2.h   |   7 +-\n>  src/libcamera/pipeline/ipu3/imgu.    |   0\n>  src/libcamera/pipeline/ipu3/imgu.cpp | 387 +++++++++++++++++++++++--\n>  src/libcamera/pipeline/ipu3/imgu.h   |  22 +-\n>  src/libcamera/pipeline/ipu3/ipu3.cpp | 414 +++++++++++++--------------\n>  src/libcamera/utils.cpp              |  22 ++\n>  test/geometry.cpp                    |  35 +++\n>  test/utils.cpp                       |  18 ++\n>  13 files changed, 799 insertions(+), 243 deletions(-)\n>  create mode 100644 src/libcamera/pipeline/ipu3/imgu.","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 390AFBD792\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 14 Jul 2020 22:11:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B4E13605B0;\n\tWed, 15 Jul 2020 00:11:52 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B6F926048C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 15 Jul 2020 00:11:51 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3A08C71D;\n\tWed, 15 Jul 2020 00:11:51 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"etrlYjBv\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1594764711;\n\tbh=+n8KQdCFIMIvGC/9S75aQT25hw50IOlTMmlXlC8RXTQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=etrlYjBvQNt6QVtEINNPLG5Y8vV+tBsr+qOLEBuk6qN1UcUuRxF7taOD53LFwhacA\n\tO/7Z8zr9k5xtCF2IlLrg//Et9Q3zxCA6q9UZAD6jjwPmUkhBiWAur1iw1tNgNk68h1\n\trPvMAPXrsdughxptUsnZAjI/4r2Q1tzQMn+iZIoI=","Date":"Wed, 15 Jul 2020 01:11:44 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<20200714221144.GI5854@pendragon.ideasonboard.com>","References":"<20200714104212.48683-1-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200714104212.48683-1-jacopo@jmondi.org>","Subject":"Re: [libcamera-devel] [PATCH 00/20] libcamera: ipu3: Rework pipe\n\tconfiguration","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]