[{"id":26677,"web_url":"https://patchwork.libcamera.org/comment/26677/","msgid":"<20230320075600.5u3sk4ye7yvqqexf@uno.localdomain>","date":"2023-03-20T07:56:00","subject":"Re: [libcamera-devel] [PATCH 00/11] Support OV7251 in IPU3 pipeline\n\tand qcam","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Dan\n\nOn Sat, Mar 18, 2023 at 11:40:03PM +0000, Daniel Scally via libcamera-devel wrote:\n> Hello all\n>\n> This series is an attempt at adding support for the OV7251 camera on Microsoft\n> Surface platforms to libcamera. The sensor outputs data in MEDIA_BUS_FMT_Y10_1X10\n> format, which is packed by the CIO2 CSI-2 reciever into V4L2_PIX_FMT_IPU3_Y10. As\n> far as I know, these data are not intended to run through the Imgu at all. Certainly\n\nAren't they ? How can an application generically display Y10 if it\nreceives data packed in a platform-specific format ?\n\n> the kernel's ipu3-imgu driver does not support that format, but given the simplicity\n\nMaybe it is still just missing from the driver ? Should we ask the\nmaintainers of the driver if it is just missing or it is not supported\nat all ? From a quick glance I have't find a trivial way to add Y10\nsupport to imgu_css_formats[]\n\n> of the format we can simply use the CIO2 device's capture-capable devnode as the\n> source of the image data.\n>\n> To facilitate that, I'm identifying sensors which don't have a format that needs\n> the Imgu and simply skipping the Imgu/IPA processing in the IPU3 pipeline for\n> them.\n>\n> What I don't particularly like about the way that I've done things here is that\n> the stream only works for the Raw role, which feels wrong. The advantage is that\n> it's contained within the existing IPU3 pipeline without too much disruption,\n> but I do wonder whether a separate CIO2-only pipeline might not be better. In\n> that case PipelineHandlerIPU3::match() would need amending to check whether the\n> sensor for each \"ipu3-csi-2 n\" instance needed hooking into the Imgu and not adding\n> those to the device match if it found that they didn't need it, so that a new\n> CIO2-only pipeline could claim the media devices. I'd love to hear other people's\n> thoughts about the best way to handle this.\n>\n> Thanks\n> Dan\n>\n> Daniel Scally (11):\n>   pipeline: ipu3: Check if sensor supports test pattern control\n>   include: drm_fourcc: Add Y10 format\n>   libcamera/formats: Add IPU3_Y10 format\n>   pipeline: ipu3: Identify sensors that do not need the Imgu\n>   pipeline: ipu3: Add needsImgu flag to IPU3Frames\n>   pipeline: ipu3: Support sensors using only CIO2\n>   pipeline: ipu3: Allow raw-only streams in IPU3 pipeline\n>   pipeline: ipu3: Support IPU3_Y10 format\n>   apps: qcam: Add support for IPU3_Y10\n>   apps: qcam: Remove restriction on raw-only streams\n>   pipeline: ipu3: Increase maximum connected cameras\n>\n>  include/linux/drm_fourcc.h             |   3 +\n>  src/apps/qcam/format_converter.cpp     |  50 +++++\n>  src/apps/qcam/format_converter.h       |   2 +\n>  src/apps/qcam/main_window.cpp          |   6 -\n>  src/libcamera/formats.cpp              |  10 +\n>  src/libcamera/formats.yaml             |   3 +\n>  src/libcamera/pipeline/ipu3/cio2.cpp   |  21 +++\n>  src/libcamera/pipeline/ipu3/cio2.h     |   4 +\n>  src/libcamera/pipeline/ipu3/frames.cpp |  45 +++--\n>  src/libcamera/pipeline/ipu3/frames.h   |   3 +-\n>  src/libcamera/pipeline/ipu3/ipu3.cpp   | 242 ++++++++++++++-----------\n>  11 files changed, 255 insertions(+), 134 deletions(-)\n>\n> --\n> 2.34.1\n>","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 B45A8BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 20 Mar 2023 07:56:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D511A626DB;\n\tMon, 20 Mar 2023 08:56:05 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E6488603A9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Mar 2023 08:56:03 +0100 (CET)","from ideasonboard.com (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5837D1373;\n\tMon, 20 Mar 2023 08:56:03 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1679298965;\n\tbh=/AIrzICO5ulTl9Gxo8r12bgNkDkIwWkFd7RyWMA7MjA=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=OwAXsddoPiVzBeTZVtD9MDMEJMUzMt95qd7E87IGqhciOjwu08r7mNzxfekRx1qSK\n\tqu6D5zm6fCEMywQXbXTs6TPFhMs3L37BTLqwG2Uk5liKqhNYCN2CRRcSVMG+Yu90Qj\n\tmsiBAEeo9DvI0K8d0WaZHMtkaj3X0LU8oDvdJfC986HhDexIJTad0xXgAp6x5T5Du6\n\tMBUmqzkuoyWXcNgq97AZE68o8U0bSumNXphbFtw1VoMDG2VUPZzvj/UAuw8Ll1iqoe\n\th9FiDr6N42+mBE3ho5MrVt656qkg+3CNbl4uG5/2AS1D9dpfIeiRD6Fd/upgWjr2aB\n\tH/9vlbMv7Z9ew==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1679298963;\n\tbh=/AIrzICO5ulTl9Gxo8r12bgNkDkIwWkFd7RyWMA7MjA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=WLcXFHW+WoJZkQHqoAvlGw+0jJQ7wHM5QbFudhLivzrDXxiEKn8l0UkxToc87OR3t\n\tmKx3pimAJ5BWpiq7uCzfodhWNkbty4mD9Xc4y+hSPfIGxWI/aqXDrqCBDvLVIwa64z\n\tJQ7lvCd8VxELjAbi78K4KE/ngjs8BRtP7IbGUGeE="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"WLcXFHW+\"; dkim-atps=neutral","Date":"Mon, 20 Mar 2023 08:56:00 +0100","To":"Daniel Scally <dan.scally@ideasonboard.com>","Message-ID":"<20230320075600.5u3sk4ye7yvqqexf@uno.localdomain>","References":"<20230318234014.29506-1-dan.scally@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230318234014.29506-1-dan.scally@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 00/11] Support OV7251 in IPU3 pipeline\n\tand qcam","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>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26896,"web_url":"https://patchwork.libcamera.org/comment/26896/","msgid":"<20230418164638.GL30837@pendragon.ideasonboard.com>","date":"2023-04-18T16:46:38","subject":"Re: [libcamera-devel] [PATCH 00/11] Support OV7251 in IPU3 pipeline\n\tand qcam","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Mar 20, 2023 at 08:56:00AM +0100, Jacopo Mondi via libcamera-devel wrote:\n> Hi Dan\n> \n> On Sat, Mar 18, 2023 at 11:40:03PM +0000, Daniel Scally via libcamera-devel wrote:\n> > Hello all\n> >\n> > This series is an attempt at adding support for the OV7251 camera on Microsoft\n> > Surface platforms to libcamera. The sensor outputs data in MEDIA_BUS_FMT_Y10_1X10\n> > format, which is packed by the CIO2 CSI-2 reciever into V4L2_PIX_FMT_IPU3_Y10. As\n> > far as I know, these data are not intended to run through the Imgu at all. Certainly\n> \n> Aren't they ? How can an application generically display Y10 if it\n> receives data packed in a platform-specific format ?\n\nThis will require platform-specific applications :-(\n\n> > the kernel's ipu3-imgu driver does not support that format, but given the simplicity\n> \n> Maybe it is still just missing from the driver ? Should we ask the\n> maintainers of the driver if it is just missing or it is not supported\n> at all ? From a quick glance I have't find a trivial way to add Y10\n> support to imgu_css_formats[]\n\nIt's most likely possible at the hardware level, but the information we\nhave is that at least the firmware doesn't support skipping the CFA\ninterpolation.\n\n> > of the format we can simply use the CIO2 device's capture-capable devnode as the\n> > source of the image data.\n> >\n> > To facilitate that, I'm identifying sensors which don't have a format that needs\n> > the Imgu and simply skipping the Imgu/IPA processing in the IPU3 pipeline for\n> > them.\n> >\n> > What I don't particularly like about the way that I've done things here is that\n> > the stream only works for the Raw role, which feels wrong. The advantage is that\n> > it's contained within the existing IPU3 pipeline without too much disruption,\n> > but I do wonder whether a separate CIO2-only pipeline might not be better. In\n> > that case PipelineHandlerIPU3::match() would need amending to check whether the\n> > sensor for each \"ipu3-csi-2 n\" instance needed hooking into the Imgu and not adding\n> > those to the device match if it found that they didn't need it, so that a new\n> > CIO2-only pipeline could claim the media devices. I'd love to hear other people's\n> > thoughts about the best way to handle this.\n> >\n> > Thanks\n> > Dan\n> >\n> > Daniel Scally (11):\n> >   pipeline: ipu3: Check if sensor supports test pattern control\n> >   include: drm_fourcc: Add Y10 format\n> >   libcamera/formats: Add IPU3_Y10 format\n> >   pipeline: ipu3: Identify sensors that do not need the Imgu\n> >   pipeline: ipu3: Add needsImgu flag to IPU3Frames\n> >   pipeline: ipu3: Support sensors using only CIO2\n> >   pipeline: ipu3: Allow raw-only streams in IPU3 pipeline\n> >   pipeline: ipu3: Support IPU3_Y10 format\n> >   apps: qcam: Add support for IPU3_Y10\n> >   apps: qcam: Remove restriction on raw-only streams\n> >   pipeline: ipu3: Increase maximum connected cameras\n> >\n> >  include/linux/drm_fourcc.h             |   3 +\n> >  src/apps/qcam/format_converter.cpp     |  50 +++++\n> >  src/apps/qcam/format_converter.h       |   2 +\n> >  src/apps/qcam/main_window.cpp          |   6 -\n> >  src/libcamera/formats.cpp              |  10 +\n> >  src/libcamera/formats.yaml             |   3 +\n> >  src/libcamera/pipeline/ipu3/cio2.cpp   |  21 +++\n> >  src/libcamera/pipeline/ipu3/cio2.h     |   4 +\n> >  src/libcamera/pipeline/ipu3/frames.cpp |  45 +++--\n> >  src/libcamera/pipeline/ipu3/frames.h   |   3 +-\n> >  src/libcamera/pipeline/ipu3/ipu3.cpp   | 242 ++++++++++++++-----------\n> >  11 files changed, 255 insertions(+), 134 deletions(-)","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 4379ABE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 18 Apr 2023 16:46:30 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8C5CB627B7;\n\tTue, 18 Apr 2023 18:46:29 +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 BFF12603A2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 18 Apr 2023 18:46:27 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(133-32-181-51.west.xps.vectant.ne.jp [133.32.181.51])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 33EE3DE5;\n\tTue, 18 Apr 2023 18:46:19 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1681836389;\n\tbh=Q67LcIfBXV6PQKQqHOPV3FR+4i2L95xUKev8lUXl8XU=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=NmYEab2hP8VbAmJq2ZCQr2jDKuDtBW5r4JHRSqL7WZ7U25PES7EiYUzqjJ9x4pPsp\n\tF/oZqntA3YCR5acB8UO2lMAvYgQUW6PAKsqKNJadO0i3mXnZ1TfQIj8feDk733NI2j\n\tG2e84m8uIc5L+Wr0uxHIClBxUQ1ZsWYj61ws9eq0MaAC3rm44/zyUvcU2wCn2UA9NH\n\tBBl2yiHGkpvwp559unEslZLnxCygM04CmFJTeubpMGx/UIg0tACyogsPhYDhyirngf\n\tafWDgF6f6JLRtqh8Nzv1tA+iRytLCASYYUpKJpwQM8yrSAy5xp4MpLybxJuw00WOZg\n\t6fFVDQDZ0gkHQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1681836381;\n\tbh=Q67LcIfBXV6PQKQqHOPV3FR+4i2L95xUKev8lUXl8XU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=BaVGCYUP49e1RmMydJXuIt95O0YPMAF7p+nstU7okFvvHDzxy20aw6YA4e9vtlmii\n\ty4VKOAcFIGJ6mVoVI+1QBfI9XwezAmdNOAQZFTg/Uzw1PiA9OkRfo2MZQ+mqZbL6sk\n\teNImRpd5cMc8JSosi6iGFfHdyAFM+ma9yDelncvw="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"BaVGCYUP\"; dkim-atps=neutral","Date":"Tue, 18 Apr 2023 19:46:38 +0300","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Message-ID":"<20230418164638.GL30837@pendragon.ideasonboard.com>","References":"<20230318234014.29506-1-dan.scally@ideasonboard.com>\n\t<20230320075600.5u3sk4ye7yvqqexf@uno.localdomain>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230320075600.5u3sk4ye7yvqqexf@uno.localdomain>","Subject":"Re: [libcamera-devel] [PATCH 00/11] Support OV7251 in IPU3 pipeline\n\tand qcam","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]