{"id":746,"url":"https://patchwork.libcamera.org/api/covers/746/?format=json","web_url":"https://patchwork.libcamera.org/cover/746/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20190320163055.22056-1-jacopo@jmondi.org>","date":"2019-03-20T16:30:24","name":"[libcamera-devel,v4,00/31] libcamera: ipu3: Add ImgU support + multiple streams","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"mbox":"https://patchwork.libcamera.org/cover/746/mbox/","series":[{"id":214,"url":"https://patchwork.libcamera.org/api/series/214/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=214","date":"2019-03-20T16:30:24","name":"libcamera: ipu3: Add ImgU support + multiple streams","version":4,"mbox":"https://patchwork.libcamera.org/series/214/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/746/comments/","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[217.70.178.232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C50A3600FC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 20 Mar 2019 17:30:27 +0100 (CET)","from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay12.mail.gandi.net (Postfix) with ESMTPSA id 5188C200010;\n\tWed, 20 Mar 2019 16:30:27 +0000 (UTC)"],"From":"Jacopo Mondi <jacopo@jmondi.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Wed, 20 Mar 2019 17:30:24 +0100","Message-Id":"<20190320163055.22056-1-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.21.0","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v4 00/31] libcamera: ipu3: Add ImgU\n\tsupport + multiple streams","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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>","X-List-Received-Date":"Wed, 20 Mar 2019 16:30:28 -0000"},"content":"Hello,\nI know, 31 patches, it's bad, but please don't run away. Not yet at least.\n\nThis series combines a few things, I decided to keep it together as one part\nis based on the other, but they could be actually considered separate.\n\nThe series includes:\n- Support for IPU3 ImgU unit (patches 01->15)\n  I have sent v1 some time ago, v2 not too long ago and an updated version\n  called v3-part which included and updated version of the first 4 patches only.\n  I have updated the v3-part patches with:\n  - Remove all formats not supported by the IPU3 (only keep 10-bit RAW Bayer)\n  - Standardized printout of formats to remove space wherever possible\n  - Add Kieran's tags\n  Patches from 04->15 are similar to the ones in v2 with small mostly cosmetic\n  updates. Please review these ones if you've not tackled v2 already.\n\n- Support for multiple stream capture in IPU3 pipeline handler (16->26)\n  This part contains a few small changes I consider for inclusion for the\n  Request class and a few I would like to receive feedback for the Pipeline\n  Handler base class to add pre/post memory allocation hooks (marked as RFC).\n  All other patches extends the IPU3 pipeline handler to work with both output\n  and viewfinder, with the quirk that I need to operate the viewfinder and the\n  stat node even when not required as otherwise capture operations stall.\n\n- Hacks on the cam application to support capture of multiple streams (26->31)\n  Mostly hacks to enable my testing, with the very bad ones marked as HACK and\n  the remaining ones I hope might be useful to Niklas to extend format parsing\n  to support multiple streams.\n\nTested on Soraka capturing output, viewfinder and output+viewfinder at the\nsame time in 2560x1920, 1920x1080 and 640x480 resolutions.\n\nA few points still bother me:\n- viewfinder and stat nodes needs to be operated anyhow, otherwise ImgU does\n  work and stall.\n- It is not yet clear to me how to calculate the sizes in the capture pipeline\n  based on the requested output resolutions. Upstream pointed us to an XML\n  file with all sizes hardcoded, which is an unacceptable solution as sizes\n  have to be calculated dynamically based on requested stream configurations.\n- When operating on one of the two ImgU pipes, if the other one is still linked\n  from a previous capture operation, the whole ImgU unit stall. This is maybe\n  expected, but I have not found yet a reasonable way to handle this.\n  Please see 15/31 (marked as RFC for this reason) where I try to explain the\n  issue in a lengthy comment.\n\nI'll do more testing on the above points and get in contact with IPU3 upstream\ndriver developers soon to have clarifications, in the meantime, feedbacks are\nwelcome.\n\nThanks\n   j\n\nJacopo Mondi (31):\n  libcamera: formats: Add toString() methods\n  libcamera: formats: Define FormatEnum type\n  libcamera: ipu3: Make sure sensor provides a compatible format\n  libcamera: ipu3: Set stream configuration from sensor\n  libcamera: ipu3: Initialize and configure CIO2\n  libcamera: ipu3: Initialize and configure ImgUs\n  libcamera: ipu3: Propagate image format\n  libcamera: ipu3: Implement camera start/stop\n  libcamera: ipu3: Implement buffer allocation\n  libcamera: ipu3: Implement buffer release\n  libcamera: ipu3: Queue requests to the pipeline\n  libcamera: ipu3: Connect CIO2 and ImgU bufferReady signals\n  libcamera: ipu3: Use NV12 as default image format\n  HACK: Soraka: Limit resolution to 2560x1920\n  RFC: libcamera: ipu3: Enable ImgU media links\n  libcamera: request: Store the streams in the request\n  libcamera: request: Add camera() getter method\n  libcamera: ipu3: Create camera with 2 streams\n  libcamera: ipu3: Configure 'output' and 'viewfinder'\n  libcamera: ipu3: Add multiple stream memory management\n  RFC: libcamera: pipeline_handlers: Add preAllocateBuffers\n  RFC: libcamera: pipeline_handlers: Add postFreeBuffers\n  libcamera: ipu3: Enable media links conditionally\n  libcamera: ipu3: Queue request for multiple streams\n  libcamera: ipu3: Connect viewfinder's BufferReady signal\n  HACK: cam: Allow camera with multiple streams\n  src: cam: Create requests with multiple streams\n  src: cam: Add output name to frame writer\n  src: cam: Handle multiple streams in request complete\n  HACK: src: cam: Play with streams combinations\n  HACK: cam: Add options to select the stream to use\n\n include/libcamera/request.h              |    3 +\n src/cam/buffer_writer.cpp                |    4 +-\n src/cam/buffer_writer.h                  |    2 +-\n src/cam/main.cpp                         |  132 ++-\n src/libcamera/camera.cpp                 |   12 +-\n src/libcamera/formats.cpp                |   27 +\n src/libcamera/include/formats.h          |   22 +\n src/libcamera/include/pipeline_handler.h |    9 +\n src/libcamera/include/v4l2_device.h      |    2 +\n src/libcamera/include/v4l2_subdevice.h   |    6 +-\n src/libcamera/meson.build                |    1 +\n src/libcamera/pipeline/ipu3/ipu3.cpp     | 1383 +++++++++++++++++++---\n src/libcamera/pipeline_handler.cpp       |   40 +-\n src/libcamera/request.cpp                |   23 +\n src/libcamera/v4l2_device.cpp            |   18 +\n src/libcamera/v4l2_subdevice.cpp         |   23 +-\n 16 files changed, 1478 insertions(+), 229 deletions(-)\n create mode 100644 src/libcamera/formats.cpp\n create mode 100644 src/libcamera/include/formats.h\n\n--\n2.21.0"}