{"id":227,"url":"https://patchwork.libcamera.org/api/1.1/covers/227/?format=json","web_url":"https://patchwork.libcamera.org/cover/227/","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":"<20190115140749.8297-1-jacopo@jmondi.org>","date":"2019-01-15T14:07:45","name":"[libcamera-devel,0/4] libcamera: IPU3: Add pipeline handler","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/227/mbox/","series":[{"id":80,"url":"https://patchwork.libcamera.org/api/1.1/series/80/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=80","date":"2019-01-15T14:07:45","name":"libcamera: IPU3: Add pipeline handler","version":1,"mbox":"https://patchwork.libcamera.org/series/80/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/227/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 0843E60C78\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 15 Jan 2019 15:07:47 +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 4CAD120000D;\n\tTue, 15 Jan 2019 14:07:46 +0000 (UTC)"],"From":"Jacopo Mondi <jacopo@jmondi.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Tue, 15 Jan 2019 15:07:45 +0100","Message-Id":"<20190115140749.8297-1-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.20.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 0/4] libcamera: IPU3: Add pipeline handler","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":"Tue, 15 Jan 2019 14:07:47 -0000"},"content":"Hello,\n  this series supersedes the single patch I sent a few days ago:\n[PATCH] libcamera: pipeline: Add Intel IPU3 pipeline skeleton\nwhich adds a simple IPU3 pipeline skeleton that did not much more that\nmatching the media devices reported by the DeviceEnumerator.\n\nThis series includes what was sent there, but completes the pipeline handler\nwith Camera instances creation and link handling on the CIO2 device.\n\nThe series starts by making the list-camera test more verbose and make it use\nthe TestStatus return codes.\n\nThe second patch is temporary, as the lifetime management of Camera instances\nwill be soon reworked, but at the moment to avoid leaks, the pipeline handlers\nthat create cameras shall be able to delete them too.\n\nThe third patch adds a 'function' field to MediaEntities, which\nis used to identify sensor entities in patch number four, where a pipeline\nhandler for the IPU3 device is added. The pipeline handler creates cameras\nidentifying which sensor are connected to which CSI-2 receiver, and sets\nup link between the two.\n\nWhen the list-cameras test is run on Soraka, it now produces the following\noutput:\n\n# ./test/list-cameras\n[0:03:36.564260693]   DBG pipeline_handler.cpp:119 Registered pipeline handler \"PipeHandlerVimc\"\n[0:03:36.564488901]   DBG pipeline_handler.cpp:119 Registered pipeline handler \"PipelineHandlerIPU3\"\n[0:03:36.565105527]   DBG device_enumerator.cpp:214 New media device \"ipu3-imgu\" created from /dev/media1\n[0:03:36.565689706]   DBG device_enumerator.cpp:214 New media device \"ipu3-cio2\" created from /dev/media0\n[0:03:36.566211596]   DBG device_enumerator.cpp:255 Successful match for media device \"ipu3-cio2\"\n[0:03:36.566232617]   DBG device_enumerator.cpp:255 Successful match for media device \"ipu3-imgu\"\n[0:03:36.566253506]   DBG media_device.cpp:672 ov13858 2-0010[0] -> ipu3-csi2 0[0]: 0\n[0:03:36.566259334]   DBG media_device.cpp:672 ov5670 4-0036[0] -> ipu3-csi2 1[0]: 0\n[0:03:36.566288654]   DBG media_device.cpp:672 ov13858 2-0010[0] -> ipu3-csi2 0[0]: 1\n[0:03:36.566325545]   DBG ipu3.cpp:240 Registered Camera[0] \"ov13858\" connected to CSI-2 receiver 0\n[0:03:36.566345257]   DBG media_device.cpp:672 ov5670 4-0036[0] -> ipu3-csi2 1[0]: 1\n[0:03:36.566356247]   DBG ipu3.cpp:240 Registered Camera[1] \"ov5670\" connected to CSI-2 receiver 1\n[0:03:36.566364052]   DBG ipu3.cpp:161 \"Intel IPU3\" pipeline handler initialized with 2 cameras registered\n[0:03:36.566370915]   DBG pipeline_handler.cpp:150 Pipeline handler \"PipelineHandlerIPU3\" matched\nCamera 'ov13858' registered\nCamera 'ov5670' registered\n\nTested locally with Valgrind and VIMC:\n\n==8203== HEAP SUMMARY:\n==8203==     in use at exit: 0 bytes in 0 blocks\n==8203==   total heap usage: 864 allocs, 864 frees, 419,652 bytes allocated\n==8203==\n==8203== All heap blocks were freed -- no leaks are possible\n\nOn Soraka valgrind fails with:\n\nvex amd64->IR: unhandled instruction bytes: 0xF3 0xF 0x1E 0xFA 0x48 0x83 0xEC 0x8\nvex amd64->IR:   REX=0 REX.W=0 REX.R=0 REX.X=0 REX.B=0\nvex amd64->IR:   VEX=0 VEX.L=0 VEX.nVVVV=0x0 ESC=0F\nvex amd64->IR:   PFX.66=0 PFX.F2=0 PFX.F3=1\n==2289== valgrind: Unrecognised instruction at address 0x405e000.\n==2289==    at 0x405E000: ??? (in /home/cam/libcamera_deploy/src/libcamera/libcamera.so)\n==2289==    by 0x4010679: call_init.part.0 (dl-init.c:58)\n==2289==    by 0x40107CA: call_init (dl-init.c:30)\n==2289==    by 0x40107CA: _dl_init (dl-init.c:120)\n==2289==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)\n\nI will investigate further.\n\nThanks\n  j\n\nJacopo Mondi (4):\n  test: list-cameras: Make test output more verbose\n  libcamera: Make Camera destructor public\n  libcamera: media_object: Add functions to entities\n  libcamera: pipeline: Add Intel IPU3 pipeline\n\n include/libcamera/camera.h              |   2 +-\n src/libcamera/include/media_object.h    |   2 +\n src/libcamera/media_object.cpp          |  18 +-\n src/libcamera/pipeline/ipu3/ipu3.cpp    | 249 ++++++++++++++++++++++++\n src/libcamera/pipeline/ipu3/meson.build |   3 +\n src/libcamera/pipeline/meson.build      |   2 +\n src/libcamera/pipeline/vimc.cpp         |   2 +\n test/list-cameras.cpp                   |  52 ++++-\n 8 files changed, 317 insertions(+), 13 deletions(-)\n create mode 100644 src/libcamera/pipeline/ipu3/ipu3.cpp\n create mode 100644 src/libcamera/pipeline/ipu3/meson.build\n\n--\n2.20.1"}