{"id":8775,"url":"https://patchwork.libcamera.org/api/1.1/covers/8775/?format=json","web_url":"https://patchwork.libcamera.org/cover/8775/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20200714104212.48683-1-jacopo@jmondi.org>","date":"2020-07-14T10:41:52","name":"[libcamera-devel,00/20] libcamera: ipu3: Rework pipe configuration","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/1.1/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"mbox":"https://patchwork.libcamera.org/cover/8775/mbox/","series":[{"id":1104,"url":"https://patchwork.libcamera.org/api/1.1/series/1104/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1104","date":"2020-07-14T10:41:52","name":"libcamera: ipu3: Rework pipe configuration","version":1,"mbox":"https://patchwork.libcamera.org/series/1104/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/8775/comments/","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 B1D56BD792\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 14 Jul 2020 10:38:49 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0D7D2605B0;\n\tTue, 14 Jul 2020 12:38:49 +0200 (CEST)","from relay10.mail.gandi.net (relay10.mail.gandi.net\n\t[217.70.178.230])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 24B3B60486\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 14 Jul 2020 12:38:47 +0200 (CEST)","from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay10.mail.gandi.net (Postfix) with ESMTPSA id B0A6324000F;\n\tTue, 14 Jul 2020 10:38:46 +0000 (UTC)"],"From":"Jacopo Mondi <jacopo@jmondi.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Tue, 14 Jul 2020 12:41:52 +0200","Message-Id":"<20200714104212.48683-1-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.27.0","MIME-Version":"1.0","Subject":"[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>","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>"},"content":"Hello,\n  quite a big update compared to v2, even if most changes happens in 3 patches\n\nThe new stream size computations which happens at generateConfiguration()\nand 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\nThis is reflected in how configurations are generated, how the CIO2 size is\ncomputed when no raw stream is requested, and how the YUV streams are adjusted\nto respect this margin constraint and the device required alignment.\n\nMost of this changes happens in patch [5/20] and [14/20]\n\nI also have simplified a bit the ImgU pipe parameters calculation. There is\na huge space for improvements there probably, but I'm very cautious in touching\nthis. The changelog is in the patch for the records.\n\nAlso, compared to v2, the ImgU pipe gets configured only if there's at least\none YUV stream requested, otherwise setting sizes for the IF and BDS rectangle\nwithout actually capturing frames from any of the ImgU output, stalls the\nImgU which require system to be rebooted to work correctly again.\n\nValidated by using all the possible stream roles combinations, and inspecting\nimages which despite the horrible quality (as there's no 3A working) are\nactually there.\n\nI'm sure that poking the system with more size combinations will highlight more\nissues, but I still think this is an acceptable start.\n\nThanks\n  j\n\nv2 -> 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\nJacopo 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\nLaurent 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.\n\n--\n2.27.0"}