[{"id":2184,"web_url":"https://patchwork.libcamera.org/comment/2184/","msgid":"<20190706121254.GQ17685@bigcity.dyn.berto.se>","date":"2019-07-06T12:12:54","subject":"Re: [libcamera-devel] [PATCH 8/9] libcamera: pipeline: ipu3: Use\n\tbuffer mapping","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Jacopo,\n\nThanks for your work.\n\nOn 2019-07-05 00:53:33 +0200, Jacopo Mondi wrote:\n> In order to support the usage of application provided buffer, retrieve\n> the buffer to use on video devices using the Request in order to allow\n> the stream to perform buffer mapping, if requested.\n> \n> The IPU3 was the only pipeline handler to access the Request map\n> directly instead of using Request::findBuffer().\n\nI now see why we really wish to hide the buffers() method. I think we \nneed to think hard on how to do that. But that could be done on-top of \nthis work.\n\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> ---\n>  src/libcamera/pipeline/ipu3/ipu3.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> index 28dcefe3d19f..49aa27ff20d4 100644\n> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> @@ -725,7 +725,7 @@ int PipelineHandlerIPU3::queueRequest(Camera *camera, Request *request)\n>  \n>  \tfor (auto it : request->buffers()) {\n>  \t\tIPU3Stream *stream = static_cast<IPU3Stream *>(it.first);\n> -\t\tBuffer *buffer = it.second;\n> +\t\tBuffer *buffer = request->findBuffer(stream);\n>  \n>  \t\tint ret = stream->device_->dev->queueBuffer(buffer);\n>  \t\tif (ret < 0)\n> -- \n> 2.21.0\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lj1-x242.google.com (mail-lj1-x242.google.com\n\t[IPv6:2a00:1450:4864:20::242])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2C9BF61568\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  6 Jul 2019 14:12:56 +0200 (CEST)","by mail-lj1-x242.google.com with SMTP id t28so11588937lje.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 06 Jul 2019 05:12:56 -0700 (PDT)","from localhost (customer-145-14-112-32.stosn.net. [145.14.112.32])\n\tby smtp.gmail.com with ESMTPSA id\n\th22sm2360897ljj.105.2019.07.06.05.12.54\n\t(version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256);\n\tSat, 06 Jul 2019 05:12:54 -0700 (PDT)"],"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\t:user-agent; bh=zMQvd8l9Tv5T4kW/Ux/jcZNTVRtk4OhFoGe1iPr3XGs=;\n\tb=xerZe+8KXQQXBXrQl2VBw0VHxaRue7L6hbOiE37Pdio3OSHnJvj6+yVN/sMASK0QnP\n\taCsXsJK/R8ZLk9mtPmc4DnP8dttLgZAd3UuhW0INilUnlbCEcg+UnZFgj6h4DFvMr+DT\n\tuRXsCh+L9DC63nHH1127+h562ysvlW0iACGS3YnTKrSxzKxZD88wr65CBiH1nzHXaL4f\n\tWSXEhifaaFejene7WWzxbH9mHAwTXFGRUtRNAorxQAipLEny7mRkfLVlXynoSaOVD3Qe\n\tmfSHl3gSu+d3Imy1hBeRq2xSlIt6ufRy78VfAbILPVzmVgbhNFUahJr3nPZkQL7I78IF\n\toT2Q==","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:user-agent;\n\tbh=zMQvd8l9Tv5T4kW/Ux/jcZNTVRtk4OhFoGe1iPr3XGs=;\n\tb=iJc4mXbQGiLUNQ96A/8aTwlKIQ51B0mao2Mx0bpuuGxEf9loM60pTHOd3FltMojSgV\n\tcgnkuqtxKBFKCSx9c6VRCnkQ1dVuWYNja1DOMREG5STftUZSS5ZmfLZ6m1/x2/3a7AGG\n\tabCndvoSwnbEfbR7UScRIStz1RRhH70zuEm+nFNPzOcddAZkMW953Pfo6pfM4pCgZ7vr\n\t7RNBNk19/OQor1q8ln6IuXTjz9YY8hYRd+ObNvz6Sd1r4J5PQ0NfauD9vMsTqC/+7+xL\n\t/pRQ8yVB6UUOsPXHWKLk2TPCdcxxQUlFozw6TGrSz2tYanQpQs/bsDkogfr0nA1DWpSD\n\tirww==","X-Gm-Message-State":"APjAAAUoYanGZTMboidbE/eQIgH4W7bSQpB79fFVe556kBySR8jKHHr/\n\tjGzFLoPc6jJeU+Vbl9OccSFYqA==","X-Google-Smtp-Source":"APXvYqyLI1jKJbB81Ynyeeiy7n1ECM0fCak7P0nzMCuno+AEJbdzhW1+t6eIjhOi+kauwEilBsJ6cg==","X-Received":"by 2002:a2e:b60f:: with SMTP id\n\tr15mr2947384ljn.172.1562415175584; \n\tSat, 06 Jul 2019 05:12:55 -0700 (PDT)","Date":"Sat, 6 Jul 2019 14:12:54 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190706121254.GQ17685@bigcity.dyn.berto.se>","References":"<20190704225334.26170-1-jacopo@jmondi.org>\n\t<20190704225334.26170-9-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20190704225334.26170-9-jacopo@jmondi.org>","User-Agent":"Mutt/1.12.1 (2019-06-15)","Subject":"Re: [libcamera-devel] [PATCH 8/9] libcamera: pipeline: ipu3: Use\n\tbuffer mapping","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":"Sat, 06 Jul 2019 12:12:56 -0000"}},{"id":2185,"web_url":"https://patchwork.libcamera.org/comment/2185/","msgid":"<06746dda-9367-f1ba-30b0-a97d7a5db48b@ideasonboard.com>","date":"2019-07-08T09:29:44","subject":"Re: [libcamera-devel] [PATCH 8/9] libcamera: pipeline: ipu3: Use\n\tbuffer mapping","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Jacopo,\n\nOn 06/07/2019 13:12, Niklas Söderlund wrote:\n> Hi Jacopo,\n> \n> Thanks for your work.\n> \n> On 2019-07-05 00:53:33 +0200, Jacopo Mondi wrote:\n>> In order to support the usage of application provided buffer, retrieve\n>> the buffer to use on video devices using the Request in order to allow\n>> the stream to perform buffer mapping, if requested.\n>>\n>> The IPU3 was the only pipeline handler to access the Request map\n>> directly instead of using Request::findBuffer().\n> \n> I now see why we really wish to hide the buffers() method. I think we \n> need to think hard on how to do that. But that could be done on-top of \n> this work.\n> \n>>\n>> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> \n> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> \n>> ---\n>>  src/libcamera/pipeline/ipu3/ipu3.cpp | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>>\n>> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n>> index 28dcefe3d19f..49aa27ff20d4 100644\n>> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n>> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n>> @@ -725,7 +725,7 @@ int PipelineHandlerIPU3::queueRequest(Camera *camera, Request *request)\n>>  \n>>  \tfor (auto it : request->buffers()) {\n>>  \t\tIPU3Stream *stream = static_cast<IPU3Stream *>(it.first);\n>> -\t\tBuffer *buffer = it.second;\n>> +\t\tBuffer *buffer = request->findBuffer(stream);\n\nThis looks really weird ...\n\n\"For each buffer, identify the stream, and then identify the buffer for\nthat stream...\" ... isn't that just ... the buffer(iterator) you started\nwith ?\n\n\nI think from my understanding of the series it's because there are now 2\n'Buffer*' objects for each buffer queued (one to hold the V4L2\ninformation, and one to hold .. the dmabuf?\n\nIn my head, all of this information should be in the same Buffer* ...\n\n\n\n\n\n>>  \n>>  \t\tint ret = stream->device_->dev->queueBuffer(buffer);\n>>  \t\tif (ret < 0)\n>> -- \n>> 2.21.0\n>>\n>> _______________________________________________\n>> libcamera-devel mailing list\n>> libcamera-devel@lists.libcamera.org\n>> https://lists.libcamera.org/listinfo/libcamera-devel\n>","headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","Received":["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 BF5FB60BC8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  8 Jul 2019 11:29:48 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0CECB56A;\n\tMon,  8 Jul 2019 11:29:48 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1562578188;\n\tbh=EhRIbbF/8w6cerkdjg6iT1p53z7GdsJj9oaDhJxYRD8=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=cD5t9YIdXnZzswLyjNAXwxzZSV8F6mkLRg7XYgG3DxHGLBaPnZUCMJ8xypEjw/X6P\n\tGTLARMdIKmruKA2jX/K4P5pj2RJy1tPVu+Mb9Zd2tqFh1AVph7KVKFKXd7zbLuFYm3\n\tX6PuMacTH7lV5C/2PC95z0JwUX13Wxb1IQc4jxfo=","Reply-To":"kieran.bingham@ideasonboard.com","To":"=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>,\n\tJacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20190704225334.26170-1-jacopo@jmondi.org>\n\t<20190704225334.26170-9-jacopo@jmondi.org>\n\t<20190706121254.GQ17685@bigcity.dyn.berto.se>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Openpgp":"preference=signencrypt","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8Xi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xjqfhds2PAhFFvrHQg1XfQR/UF/SjeUmaOmLSczM0s6XMeO\n\tVcE77UFtJ/+hLo4PRFKm5X1Pcar6g5m4xGqa+Xfzi9tRkwC29KMCoQOag1BhHChgqYaUH3yo\n\tUzaPwT/fY75iVI+yD0ih/e6j8qYvP8pvGwMQfrmN9YB0zB39YzCSdaUaNrWGD3iCBxg6lwSO\n\tLKeRhxxfiXCIYEf3vwOsP3YMx2JkD5doseXmWBGW1U0T/oJF+DVfKB6mv5UfsTzpVhJRgee7\n\t4jkjqFq4qsUGxcvF2xtRkfHFpZDbRgRlVmiWkqDkT4qMA+4q1y/dWwshSKi/uwVZNycuLsz+\n\t+OD8xPNCsMTqeUkAKfbD8xW4LCay3r/dD2ckoxRxtMD9eOAyu5wYzo/ydIPTh1QEj9SYyvp8\n\tO0g6CpxEwyHUQtF5oh15O018z3ZLztFJKR3RD42VKVsrnNDKnoY0f4U0z7eJv2NeF8xHMuiU\n\tRCIzqxX1GVYaNkKTnb/Qja8hnYnkUzY1Lc+OtwiGmXTwYsPZjjAaDX35J/RSKAoy5wGo/YFA\n\tJxB1gWThL4kOTbsqqXj9GLcyOImkW0lJGGR3o/fV91Zh63S5TKnf2YGGGzxki+ADdxVQAm+Q\n\tsbsRB8KNNvVXBOVNwko86rQqF9drZuw=","Organization":"Ideas on Board","Message-ID":"<06746dda-9367-f1ba-30b0-a97d7a5db48b@ideasonboard.com>","Date":"Mon, 8 Jul 2019 10:29:44 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.7.1","MIME-Version":"1.0","In-Reply-To":"<20190706121254.GQ17685@bigcity.dyn.berto.se>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH 8/9] libcamera: pipeline: ipu3: Use\n\tbuffer mapping","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":"Mon, 08 Jul 2019 09:29:49 -0000"}},{"id":2199,"web_url":"https://patchwork.libcamera.org/comment/2199/","msgid":"<20190709111549.ggps6rv6qkkkvcsj@uno.localdomain>","date":"2019-07-09T11:15:49","subject":"Re: [libcamera-devel] [PATCH 8/9] libcamera: pipeline: ipu3: Use\n\tbuffer mapping","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Kieran,\n\nOn Mon, Jul 08, 2019 at 10:29:44AM +0100, Kieran Bingham wrote:\n> Hi Jacopo,\n>\n> On 06/07/2019 13:12, Niklas Söderlund wrote:\n> > Hi Jacopo,\n> >\n> > Thanks for your work.\n> >\n> > On 2019-07-05 00:53:33 +0200, Jacopo Mondi wrote:\n> >> In order to support the usage of application provided buffer, retrieve\n> >> the buffer to use on video devices using the Request in order to allow\n> >> the stream to perform buffer mapping, if requested.\n> >>\n> >> The IPU3 was the only pipeline handler to access the Request map\n> >> directly instead of using Request::findBuffer().\n> >\n> > I now see why we really wish to hide the buffers() method. I think we\n> > need to think hard on how to do that. But that could be done on-top of\n> > this work.\n> >\n> >>\n> >> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> >\n> > Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> >\n> >> ---\n> >>  src/libcamera/pipeline/ipu3/ipu3.cpp | 2 +-\n> >>  1 file changed, 1 insertion(+), 1 deletion(-)\n> >>\n> >> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> >> index 28dcefe3d19f..49aa27ff20d4 100644\n> >> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> >> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> >> @@ -725,7 +725,7 @@ int PipelineHandlerIPU3::queueRequest(Camera *camera, Request *request)\n> >>\n> >>  \tfor (auto it : request->buffers()) {\n> >>  \t\tIPU3Stream *stream = static_cast<IPU3Stream *>(it.first);\n> >> -\t\tBuffer *buffer = it.second;\n> >> +\t\tBuffer *buffer = request->findBuffer(stream);\n>\n> This looks really weird ...\n>\n> \"For each buffer, identify the stream, and then identify the buffer for\n> that stream...\" ... isn't that just ... the buffer(iterator) you started\n> with ?\n\nThese are not the same Buffers, one is the one which maps onto the\nV4L2 device one, the other ones comes from outside.\n\nAs a general reply to your \"importBuffers()\" question, what you're\nasking for is in my RFC version, and it has been partially shut down\nbecause that would required application to create pools, and that's\nnot a a problem per-se, it is just not needed :)\n\nFurthermore, I think we should move to restrict applications to access\nthe Stream's pool completely, or expose it as read-only objects if we\nreally have to. Pools are an additional abstraction that would require\nmore work for application, which really just need buffers.\n\n>\n>\n> I think from my understanding of the series it's because there are now 2\n> 'Buffer*' objects for each buffer queued (one to hold the V4L2\n> information, and one to hold .. the dmabuf?\n>\n> In my head, all of this information should be in the same Buffer* ...\n\nAs the V4L2 video device works today this is not possible. Buffers are\nalways dequeued from the internal pool, which is not exposed to\napplication (and its buffers should not be used directly, for the\nsimple reason that they are a finite number and we might need to 'map'\na much larger number of different dmabufs file descriptors).\n\nAnyway, this is going through heavy rework as we speech, especially the\nBuffer class and associated objects, so this will be changes a lot. I\nthink the mapping part should stay similar to what's here, so for the\nmoment just please \"hold on\" :)\n\nThanks\n   j\n>\n>\n>\n>\n>\n> >>\n> >>  \t\tint ret = stream->device_->dev->queueBuffer(buffer);\n> >>  \t\tif (ret < 0)\n> >> --\n> >> 2.21.0\n> >>\n> >> _______________________________________________\n> >> libcamera-devel mailing list\n> >> libcamera-devel@lists.libcamera.org\n> >> https://lists.libcamera.org/listinfo/libcamera-devel\n> >\n>\n> --\n> Regards\n> --\n> Kieran","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net\n\t[217.70.183.198])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 17B9560BC8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  9 Jul 2019 13:14:36 +0200 (CEST)","from uno.localdomain (softbank126163157105.bbtec.net\n\t[126.163.157.105]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 51833C0007;\n\tTue,  9 Jul 2019 11:14:33 +0000 (UTC)"],"X-Originating-IP":"126.163.157.105","Date":"Tue, 9 Jul 2019 13:15:49 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>,\n\tlibcamera-devel@lists.libcamera.org","Message-ID":"<20190709111549.ggps6rv6qkkkvcsj@uno.localdomain>","References":"<20190704225334.26170-1-jacopo@jmondi.org>\n\t<20190704225334.26170-9-jacopo@jmondi.org>\n\t<20190706121254.GQ17685@bigcity.dyn.berto.se>\n\t<06746dda-9367-f1ba-30b0-a97d7a5db48b@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"cij54gqy5pq4kfct\"","Content-Disposition":"inline","In-Reply-To":"<06746dda-9367-f1ba-30b0-a97d7a5db48b@ideasonboard.com>","User-Agent":"NeoMutt/20180716","Subject":"Re: [libcamera-devel] [PATCH 8/9] libcamera: pipeline: ipu3: Use\n\tbuffer mapping","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, 09 Jul 2019 11:14:36 -0000"}}]