[{"id":12162,"web_url":"https://patchwork.libcamera.org/comment/12162/","msgid":"<CAEmqJPpae+ogWz7wA12xKX6OSvvZr60ZJomSyEzN0EQpJSrwzg@mail.gmail.com>","date":"2020-08-27T08:29:43","subject":"Re: [libcamera-devel] [PATCH v6 00/12] Zero-copy RAW stream work","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi,\n\nSorry to pester again, but could I get a review for this patch set\nplease?  Particularly patches 10-12/12 which are new additions.\n\nThanks,\nNaush\n\nOn Tue, 4 Aug 2020 at 10:58, Naushir Patuck <naush@raspberrypi.com> wrote:\n>\n> Hi,\n>\n> Here is the next version of the zero-copy function patchset for the Raspberry Pi\n> platform.  Patches 01-09/12 are identical to the previous patchset, and patches\n> 10-12/12 add functionality to support any external buffer allocation to be used\n> for stream captures.\n>\n> Regards,\n> Naush\n>\n> Naushir Patuck (12):\n>   libcamera: pipeline: raspberrypi: Move RPiStream into a separate file\n>   libcamera: pipeline: ipa: raspberrypi: Rework drop frame signalling\n>   libcamera: pipeline: raspberrypi: Add some debug logging\n>   libcamera: pipeline: raspberrypi: Increase the number of RAW buffers\n>   libcamera: pipeline: raspberrypi: Remove const qualifier from\n>     RPiStream\n>   libcamera: pipeline: raspberrypi: Rework stream buffer logic for\n>     zero-copy\n>   libcamera: pipeline: raspberrypi: Fix bug in passing configuration to\n>     IPA\n>   libcamera: pipeline: raspberrypi: Add more robust stream buffer logic\n>   libcamera: pipeline: ipa: raspberrypi: Remove use of FrameBuffer\n>     cookie\n>   pipeline: raspberrypi: Use an unordered_map for the stream buffer list\n>   pipeline: raspberrypi: Use an unordered_set to store IPA buffer ids\n>   pipeline: ipa: raspberrypi: Handle any externally allocated\n>     FrameBuffer\n>\n>  include/libcamera/ipa/raspberrypi.h           |  13 +-\n>  src/ipa/raspberrypi/raspberrypi.cpp           |  26 +-\n>  .../pipeline/raspberrypi/meson.build          |   1 +\n>  .../pipeline/raspberrypi/raspberrypi.cpp      | 587 ++++++++----------\n>  .../pipeline/raspberrypi/rpi_stream.cpp       | 244 ++++++++\n>  .../pipeline/raspberrypi/rpi_stream.h         | 140 +++++\n>  6 files changed, 662 insertions(+), 349 deletions(-)\n>  create mode 100644 src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n>  create mode 100644 src/libcamera/pipeline/raspberrypi/rpi_stream.h\n>\n> --\n> 2.25.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 533D4BF019\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Aug 2020 08:30:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C0FB6628F7;\n\tThu, 27 Aug 2020 10:30:06 +0200 (CEST)","from mail-lj1-x243.google.com (mail-lj1-x243.google.com\n\t[IPv6:2a00:1450:4864:20::243])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 088E860379\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Aug 2020 10:30:05 +0200 (CEST)","by mail-lj1-x243.google.com with SMTP id y2so5477369ljc.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Aug 2020 01:30:04 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"n08KnVlI\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to;\n\tbh=e6abpcOfFNLX6eH4NVgLhg7gK355H++92RyQ/LdMZ30=;\n\tb=n08KnVlI55ixWTUEQi/2X6WDDGevJmI9Wuh+JOkyN0s3IZdP2OjPZr6tLIWsdDac/W\n\t6Qkm/v3w0zHhWoqFqRdFFwtvfDa/FBXnkA+fTJKxzfGd+PWmSJ7tv2J7PCoKGQbxXmuP\n\t2Q7EyrQeM5vgt61jCpy/u4TgEj7YVFID66SIBjCOnbG9M1u27aZDhPYDC+YS+4jJ2MF3\n\t2idbaKy9zBuBIwD1Uqn1ct7AMZWzvjjlR6CkNOFc6yk82E1QFDQkY0URLKsWvn6nW+ch\n\tCkmLhzn0pnT6ROuRQOJmeTz466Hq0uWIb0VpJaA6a2+5wwTlqSjji79SI7foAaFsA481\n\tWlQQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to;\n\tbh=e6abpcOfFNLX6eH4NVgLhg7gK355H++92RyQ/LdMZ30=;\n\tb=GTwVsbxcDwkWefoIyMP7ZkvClMth5CpaSaAoGSC8dBvFW3hZzkgvUD/cxUQVsLpXWN\n\tFZRy6n1LR5YRD/c4pArakHRn/cvNhM/qu4S5uE//zWQ2gYtw+I2z5cVmeg7+JIeQbddS\n\tfi5K1wYKmWqhvRbZvMRRlMlO9u2lRwTFDV4clq4/DdVI5JXqyO87f2IgiC2jZZ6YkwZE\n\tWqdUBPl+KF242/DG8VLjBowiXzOYv0Tu0DHLcP3tn3sZ1U4HbMiIeVJk/UDxAufx+PdN\n\tvl/FwEk4URiCxHBcTAcipSRQ0B12PvEUV1zuAtA4curvVJ7U9jNIWKepcfOU3+jwn53q\n\tSspA==","X-Gm-Message-State":"AOAM533eWgyELLFn2mBkXGYysbmtpbooLVtzCHUSvjgTQBa70x+xvh9R\n\ttXXiMTWygv2zIJgaOfPbCmSVNeWzRE3qaAXxEWK9Neuf7/Vwug==","X-Google-Smtp-Source":"ABdhPJxFjLIrQozzSsUbsYLlyztJ0KUGX0qdZqQv/S+CoULcnmHI6Hobu5doMugC/aVUE/54aYn03oaSyq4z67Zvxdc=","X-Received":"by 2002:a2e:9852:: with SMTP id\n\te18mr9190002ljj.415.1598517003600; \n\tThu, 27 Aug 2020 01:30:03 -0700 (PDT)","MIME-Version":"1.0","References":"<20200804095850.275499-1-naush@raspberrypi.com>","In-Reply-To":"<20200804095850.275499-1-naush@raspberrypi.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Thu, 27 Aug 2020 09:29:43 +0100","Message-ID":"<CAEmqJPpae+ogWz7wA12xKX6OSvvZr60ZJomSyEzN0EQpJSrwzg@mail.gmail.com>","To":"libcamera-devel@lists.libcamera.org","Subject":"Re: [libcamera-devel] [PATCH v6 00/12] Zero-copy RAW stream work","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>"}},{"id":12225,"web_url":"https://patchwork.libcamera.org/comment/12225/","msgid":"<20200830082208.GA3576105@oden.dyn.berto.se>","date":"2020-08-30T08:22:08","subject":"Re: [libcamera-devel] [PATCH v6 00/12] Zero-copy RAW stream work","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Naushir,\n\nOn 2020-08-27 09:29:43 +0100, Naushir Patuck wrote:\n> Hi,\n> \n> Sorry to pester again, but could I get a review for this patch set\n> please?  Particularly patches 10-12/12 which are new additions.\n\nSorry for taking so long thinking about this series.\n\nAfter rereading it a few times the past week I still think we need to\nscale the scope back a bit. Would it be possible to restructure it to\nonly deal with RAW buffers? I know it's possible to expose the statistic\nand sensor embedded data buffers using the same structure, but this is a\nproblem we overall have not thought about yet. I fear taking this step\nin the RPi pipeline now could be premature and introduce regressions\nwhen we attack this issue on a project level.\n\nOne thing that worries with the current implementation is how the\nstatistic and embedded data buffers are mapped in the IPA on each\nrequest. I think this is something we can't really do and something else\nis needed. What I'm not sure yet.\n\nI'm sorry I was unable to communicate this fear in v5. I was hoping an\nintegration of zero-copy raw would split these two issues naturally. So\nto be able to move both features forward could this series be split in\ntwo, one series intended to go in as soon as possible with the minimum\nto get zero-copy raw working and one on-top of that with a possible\nsolution for exposing statistics and embedded data to applications? I\nfeel with such a solution we could close the RAW topic and get the fixes\nin this series in while creating a good start of discussion for how to\nexpose new type of information to applications.\n\n> \n> Thanks,\n> Naush\n> \n> On Tue, 4 Aug 2020 at 10:58, Naushir Patuck <naush@raspberrypi.com> wrote:\n> >\n> > Hi,\n> >\n> > Here is the next version of the zero-copy function patchset for the Raspberry Pi\n> > platform.  Patches 01-09/12 are identical to the previous patchset, and patches\n> > 10-12/12 add functionality to support any external buffer allocation to be used\n> > for stream captures.\n> >\n> > Regards,\n> > Naush\n> >\n> > Naushir Patuck (12):\n> >   libcamera: pipeline: raspberrypi: Move RPiStream into a separate file\n> >   libcamera: pipeline: ipa: raspberrypi: Rework drop frame signalling\n> >   libcamera: pipeline: raspberrypi: Add some debug logging\n> >   libcamera: pipeline: raspberrypi: Increase the number of RAW buffers\n> >   libcamera: pipeline: raspberrypi: Remove const qualifier from\n> >     RPiStream\n> >   libcamera: pipeline: raspberrypi: Rework stream buffer logic for\n> >     zero-copy\n> >   libcamera: pipeline: raspberrypi: Fix bug in passing configuration to\n> >     IPA\n> >   libcamera: pipeline: raspberrypi: Add more robust stream buffer logic\n> >   libcamera: pipeline: ipa: raspberrypi: Remove use of FrameBuffer\n> >     cookie\n> >   pipeline: raspberrypi: Use an unordered_map for the stream buffer list\n> >   pipeline: raspberrypi: Use an unordered_set to store IPA buffer ids\n> >   pipeline: ipa: raspberrypi: Handle any externally allocated\n> >     FrameBuffer\n> >\n> >  include/libcamera/ipa/raspberrypi.h           |  13 +-\n> >  src/ipa/raspberrypi/raspberrypi.cpp           |  26 +-\n> >  .../pipeline/raspberrypi/meson.build          |   1 +\n> >  .../pipeline/raspberrypi/raspberrypi.cpp      | 587 ++++++++----------\n> >  .../pipeline/raspberrypi/rpi_stream.cpp       | 244 ++++++++\n> >  .../pipeline/raspberrypi/rpi_stream.h         | 140 +++++\n> >  6 files changed, 662 insertions(+), 349 deletions(-)\n> >  create mode 100644 src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n> >  create mode 100644 src/libcamera/pipeline/raspberrypi/rpi_stream.h\n> >\n> > --\n> > 2.25.1\n> >\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","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 92C4DBF019\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 30 Aug 2020 08:22:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1307562912;\n\tSun, 30 Aug 2020 10:22:12 +0200 (CEST)","from mail-lj1-x241.google.com (mail-lj1-x241.google.com\n\t[IPv6:2a00:1450:4864:20::241])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7357E61EA0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 30 Aug 2020 10:22:10 +0200 (CEST)","by mail-lj1-x241.google.com with SMTP id k25so326067ljg.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 30 Aug 2020 01:22:10 -0700 (PDT)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\ty196sm1151288lfa.0.2020.08.30.01.22.09\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSun, 30 Aug 2020 01:22:09 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"d08gKMFT\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=JtY9c3WhSzEralkwjVqCAH49d5Bu2BXS5Q8TxpxyIwg=;\n\tb=d08gKMFTYnLi9CLBK4vUlvdVP2uhxCCuj2UrHCraz41ftrf5VzPOvElRR37hyHv7V9\n\t5hmyLgGOuBY9/9QIkV+jol90xBhs8Nofv7WRalcaFBvxtdHBrOYWGnZKj06Wv4nuEHyu\n\tjmDaJzlhduaNJXRI1gsLxTYRq5UJokQFly6C6PX15fZigh+R6wKbRYcPWr6/Dkufmdsh\n\tOqPb/uqnFqS1qBZCLFroc6zJ8+QV09p4xxtg9V8d7gZ5qNE9TLsenF8w8Xo62vB/sE35\n\tJBGSKX07Axhh2D7GBGHoulW+01tSN1YRXbj2VGcXhJ/IhHSM8UCtYRMRu+g1vwfcDBcA\n\tbWTA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=JtY9c3WhSzEralkwjVqCAH49d5Bu2BXS5Q8TxpxyIwg=;\n\tb=VGEaEL5lylWeoC+zxBm6DAV9m+sFjhi6edbF9TtOiJ3hKvT9X7QV8qmDJ6Vi1IyC1R\n\tXc4iIwO6wVmbWIOZj/KhSDbueTJVlwQ0kbbCJEzwe9wbnBACOMU79JleU1/lIjy3p0Dm\n\tGvOZrQHa+/BtZQX3o4MivdHYib8uvI1qaCTHis1U12tLW61yMffOzPG8ZEgmJFGLPRgS\n\tR18ZgqhAb1cl2e9OPH0lqhsHwkEfYcINrfBaR9kxLqNP2Bkr1rX1PX8NbkYu1ky39Ow4\n\tc0ga2e4tHS8eaTDKrvwn9pxioeLnHbStwDF8yJPCpjzexDfIzqXrDbMSWtFJxl+Fx4U4\n\tc06g==","X-Gm-Message-State":"AOAM533v2Pc2Z0/DK6nzT+M89OKBkX2KBlrbwQy10cudIGAsMkLnD8hf\n\t53YFJjuhfkXFIYLZ2VE0GAEh3ZbpkJzsoQ==","X-Google-Smtp-Source":"ABdhPJzAUGtPna0yws/7cTij01b0W83jkC71ii6U1UzeJlw9fQILUOjfSdktJ7uwb3K4L/U1BTJjAg==","X-Received":"by 2002:a2e:1417:: with SMTP id u23mr3131235ljd.44.1598775729785;\n\tSun, 30 Aug 2020 01:22:09 -0700 (PDT)","Date":"Sun, 30 Aug 2020 10:22:08 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<20200830082208.GA3576105@oden.dyn.berto.se>","References":"<20200804095850.275499-1-naush@raspberrypi.com>\n\t<CAEmqJPpae+ogWz7wA12xKX6OSvvZr60ZJomSyEzN0EQpJSrwzg@mail.gmail.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<CAEmqJPpae+ogWz7wA12xKX6OSvvZr60ZJomSyEzN0EQpJSrwzg@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH v6 00/12] Zero-copy RAW stream work","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=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":12226,"web_url":"https://patchwork.libcamera.org/comment/12226/","msgid":"<CAEmqJPoSnHmROt4B6SjbhmEnT8WQoAsFyOud5V1nY1JVf10CzA@mail.gmail.com>","date":"2020-08-30T19:13:41","subject":"Re: [libcamera-devel] [PATCH v6 00/12] Zero-copy RAW stream work","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Niklas,\n\nThank you for going through all the commits.  Let me try and address\nsome of your concerns below:\n\nOn Sun, 30 Aug 2020 at 09:22, Niklas Söderlund\n<niklas.soderlund@ragnatech.se> wrote:\n>\n> Hi Naushir,\n>\n> On 2020-08-27 09:29:43 +0100, Naushir Patuck wrote:\n> > Hi,\n> >\n> > Sorry to pester again, but could I get a review for this patch set\n> > please?  Particularly patches 10-12/12 which are new additions.\n>\n> Sorry for taking so long thinking about this series.\n>\n> After rereading it a few times the past week I still think we need to\n> scale the scope back a bit. Would it be possible to restructure it to\n> only deal with RAW buffers? I know it's possible to expose the statistic\n> and sensor embedded data buffers using the same structure, but this is a\n> problem we overall have not thought about yet. I fear taking this step\n> in the RPi pipeline now could be premature and introduce regressions\n> when we attack this issue on a project level.\n\nAs you have probably seen from the code, the RPi pipeline handler\ntreats all device streams (images, stats, embedded data) with the same\nabstraction.  This was to allow us to easily provide any stream to the\nIPA and to the application should it request it.  This abstraction has\nbeen there since before I started working on this patch set.  I know\nthat this is a different approach to what the other pipeline handlers\ndo, but Raspberry Pi camera users are a demanding lot :)\nCollectively, they will want access to embedded data and stats in the\napplication, and my approach to the pipeline handlers was to easily\nallow this.\n\nHowever, at present, the pipeline handler only advertises image\nstreams available to the application as there is no mechanism in\nlibcamera yet to request non-image buffers.  So no application will be\nable to request statistics or embedded data buffers just yet.\nDepending on how libcamera decides to enable this feature, I would\nhope there is minimal work to do to the RPi pipeline handler to get\nthese buffers out to the application with the stream abstraction we\nhave.\n\n>\n> One thing that worries with the current implementation is how the\n> statistic and embedded data buffers are mapped in the IPA on each\n> request. I think this is something we can't really do and something else\n> is needed. What I'm not sure yet.\n\nIf a stream buffer (for any stream) has been allocated externally and\npassed into a Request, I cannot see how we can avoid mmapping it if\nthe IPA is to access the buffer.  We could make things more efficient\nby perhaps having a cache of previously used buffers (like we\ndiscussed some time back).  However, note that any buffers that have\nbeen exported by the V4L2 device (and not allocated externally) will\nbe mmaped on startup in a batch, so this path is optimal.  The reason\nI did the simplest thing (mmap and unmap on every external allocated\nbuffer) for externally allocated buffers was because at present, our\nIPA only wants the stats and embedded data buffers, and as I mentioned\nabove, these cannot be requested by the application just yet, so we\nwill always go through the optimal path of doing the mmap up-front.\n\nWe are currently discussing doing some pre-processing on the Bayer\nimage in the IPA, but this is some longer term work, and we may have\nto address the mmapping per-frame issue then.\n\n>\n> I'm sorry I was unable to communicate this fear in v5. I was hoping an\n> integration of zero-copy raw would split these two issues naturally. So\n> to be able to move both features forward could this series be split in\n> two, one series intended to go in as soon as possible with the minimum\n> to get zero-copy raw working and one on-top of that with a possible\n> solution for exposing statistics and embedded data to applications? I\n> feel with such a solution we could close the RAW topic and get the fixes\n> in this series in while creating a good start of discussion for how to\n> expose new type of information to applications.\n\nGiven that the RPi pipeline handler treats all streams the same since\nbefore this patch-set, the work for zero-copy RAW streams will simply\napply to all other streams.  My feeling is it would not be feasible to\nseparate this out now for only RAW streams.  Again, note that we do\nnot advertise non-image streams for the application to request, and\nthey actually cannot request stats or embedded data even if we did :)\n\nSorry this is quite a troublesome patch-set to get through, but I am\nhappy to address all issues that get flagged. It would be good to hear\nyour thoughts after my comments above, and if you have any questions,\nplease do send them my way.\n\nBest Regards,\nNaush\n\n\n>\n> >\n> > Thanks,\n> > Naush\n> >\n> > On Tue, 4 Aug 2020 at 10:58, Naushir Patuck <naush@raspberrypi.com> wrote:\n> > >\n> > > Hi,\n> > >\n> > > Here is the next version of the zero-copy function patchset for the Raspberry Pi\n> > > platform.  Patches 01-09/12 are identical to the previous patchset, and patches\n> > > 10-12/12 add functionality to support any external buffer allocation to be used\n> > > for stream captures.\n> > >\n> > > Regards,\n> > > Naush\n> > >\n> > > Naushir Patuck (12):\n> > >   libcamera: pipeline: raspberrypi: Move RPiStream into a separate file\n> > >   libcamera: pipeline: ipa: raspberrypi: Rework drop frame signalling\n> > >   libcamera: pipeline: raspberrypi: Add some debug logging\n> > >   libcamera: pipeline: raspberrypi: Increase the number of RAW buffers\n> > >   libcamera: pipeline: raspberrypi: Remove const qualifier from\n> > >     RPiStream\n> > >   libcamera: pipeline: raspberrypi: Rework stream buffer logic for\n> > >     zero-copy\n> > >   libcamera: pipeline: raspberrypi: Fix bug in passing configuration to\n> > >     IPA\n> > >   libcamera: pipeline: raspberrypi: Add more robust stream buffer logic\n> > >   libcamera: pipeline: ipa: raspberrypi: Remove use of FrameBuffer\n> > >     cookie\n> > >   pipeline: raspberrypi: Use an unordered_map for the stream buffer list\n> > >   pipeline: raspberrypi: Use an unordered_set to store IPA buffer ids\n> > >   pipeline: ipa: raspberrypi: Handle any externally allocated\n> > >     FrameBuffer\n> > >\n> > >  include/libcamera/ipa/raspberrypi.h           |  13 +-\n> > >  src/ipa/raspberrypi/raspberrypi.cpp           |  26 +-\n> > >  .../pipeline/raspberrypi/meson.build          |   1 +\n> > >  .../pipeline/raspberrypi/raspberrypi.cpp      | 587 ++++++++----------\n> > >  .../pipeline/raspberrypi/rpi_stream.cpp       | 244 ++++++++\n> > >  .../pipeline/raspberrypi/rpi_stream.h         | 140 +++++\n> > >  6 files changed, 662 insertions(+), 349 deletions(-)\n> > >  create mode 100644 src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n> > >  create mode 100644 src/libcamera/pipeline/raspberrypi/rpi_stream.h\n> > >\n> > > --\n> > > 2.25.1\n> > >\n> > _______________________________________________\n> > libcamera-devel mailing list\n> > libcamera-devel@lists.libcamera.org\n> > https://lists.libcamera.org/listinfo/libcamera-devel\n>\n> --\n> Regards,\n> Niklas Söderlund","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 45189BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 30 Aug 2020 19:14:02 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 94ABD62919;\n\tSun, 30 Aug 2020 21:14:01 +0200 (CEST)","from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com\n\t[IPv6:2a00:1450:4864:20::22f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E5C38628D4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 30 Aug 2020 21:13:59 +0200 (CEST)","by mail-lj1-x22f.google.com with SMTP id i10so4318496ljn.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 30 Aug 2020 12:13:59 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"j4FvUGcA\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc:content-transfer-encoding;\n\tbh=BTSIYI3VQEnrjo4y+UtEi7Kl6UbHBpOnz2C/xaH9Nck=;\n\tb=j4FvUGcAsip2foU0cZ22wo8IVj5L5gWDgEtSkmS6ZNy+wwC1OYJS2Ft3ki2zvv7O08\n\t1Zx1P5mQFMl0T919VEROOwr+h1gxcyDwwItBEjckIlurzgHIyGB2AUeHnLIiLos6e1M7\n\ttoxoADZQSiurarM7QHDt3HT8G4xmxYUyL7wD8GdZk3AB9FgT5hmGKKCXL6s1TclUdiSh\n\tQEZUeN2bKyO5bdxW5oR7qz7xpWMtXtIddtpiD2oli2yrWNh9/bsKBxousX7l0WJ6ceSR\n\tzVY3BvIOFLNT7DxSixktos49fRwrP6vSGvl5vcjdXiiPRiNcJ/vGFxFiKwXjrNkjMm6k\n\t1tkw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc:content-transfer-encoding;\n\tbh=BTSIYI3VQEnrjo4y+UtEi7Kl6UbHBpOnz2C/xaH9Nck=;\n\tb=QlpzxQT8UuCaWgsA+l6+8gFJcq4UdWRP+y0fKkgx+R9RfjvFxmwh5Lnab52lwsQww/\n\tfaC0K6vuNjO1e9P0loSs66aKb47OErXY9aRdpInbHeFggkkDJlLZ7bIYmb9Gl2dP0KHw\n\tw/yUKKTrG1FugMN878NES5UNYtqmTapK/w79xXTQI6okwLkK7sXW+dP8VvhKRHJk2Rpu\n\tvPj2HOihNsdLhP3Jul5q1VN4q3hCs0s9NzoNebQy6PR/i2U93dSc2EfJPfxd0Q4Atq15\n\tL71aertwUsdMcnlKajmYuPU1/kq+ilipeQZRrgVEPCc8rK6Ktw/GJzyfcTqg2+bTkQzy\n\t2D/Q==","X-Gm-Message-State":"AOAM531ytfIvPeDm4Ai+lG7tvzwDtJ0qc1ZQ4TpuhRIf0sRmI9w7pqgj\n\tjcn0En/6JMxyYPr3KOIKT4Jl4CYups2Ivb59Vp7/PA==","X-Google-Smtp-Source":"ABdhPJwXG8HERLHVjOU0ptd1nGyTo8XJLoZRXLpKIN53Z7j9tJuQBAgz1b87m3jFZsYtXvgfeXvxh0l2qzqbIDl/0ok=","X-Received":"by 2002:a05:651c:1343:: with SMTP id\n\tj3mr3435280ljb.112.1598814839023; \n\tSun, 30 Aug 2020 12:13:59 -0700 (PDT)","MIME-Version":"1.0","References":"<20200804095850.275499-1-naush@raspberrypi.com>\n\t<CAEmqJPpae+ogWz7wA12xKX6OSvvZr60ZJomSyEzN0EQpJSrwzg@mail.gmail.com>\n\t<20200830082208.GA3576105@oden.dyn.berto.se>","In-Reply-To":"<20200830082208.GA3576105@oden.dyn.berto.se>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Sun, 30 Aug 2020 20:13:41 +0100","Message-ID":"<CAEmqJPoSnHmROt4B6SjbhmEnT8WQoAsFyOud5V1nY1JVf10CzA@mail.gmail.com>","To":"=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Subject":"Re: [libcamera-devel] [PATCH v6 00/12] Zero-copy RAW stream work","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=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]