[{"id":35991,"web_url":"https://patchwork.libcamera.org/comment/35991/","msgid":"<4d256c50-066c-4280-8210-f34e7f14740c@ideasonboard.com>","date":"2025-09-25T15:33:22","subject":"Re: [PATCH v2 06/37] libcamera: MappedFrameBuffer: Add\n\tMappedFrameBuffer::getPlaneFD()","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"Hi\n\n2025. 08. 24. 2:48 keltezéssel, Bryan O'Donoghue írta:\n> Add MappedFrameBuffer::getPlaneFD() which takes a plane index and returns\n> the file descriptor associated with it.\n> \n> This fd will be used to feed into eglCreateImageKHR for both texture\n> creation on upload and directly render-to-texture where the texture buffer\n> comes from the fd given to eglCreateImageKHR.\n> \n> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>\n> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n> ---\n>   include/libcamera/internal/mapped_framebuffer.h |  4 ++++\n>   src/libcamera/mapped_framebuffer.cpp            | 10 ++++++++++\n>   2 files changed, 14 insertions(+)\n> \n> diff --git a/include/libcamera/internal/mapped_framebuffer.h b/include/libcamera/internal/mapped_framebuffer.h\n> index 6aaabf5086b4658363e4e2ed02242248bfffdcbc..f7a6870764c4d035f77544354aa46a70095952a0 100644\n> --- a/include/libcamera/internal/mapped_framebuffer.h\n> +++ b/include/libcamera/internal/mapped_framebuffer.h\n> @@ -55,6 +55,10 @@ public:\n>   \tusing MapFlags = Flags<MapFlag>;\n> \n>   \tMappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags);\n> +\tint getPlaneFD(unsigned int plane);\n> +\n> +private:\n> +\tconst FrameBuffer *buffer_;\n\nI am not a fan of this approach. This is all but guaranteed to be\ndangling in some cases. For example, `mali-c55.cpp:IPAMaliC55::mapBuffers`\nwill keep a whole map of `MappedFrameBuffers` with dangling pointers.\nSimilar thing happens in rpi.\n\nMaybe extending the type stored in `planes_` is an option, but not sure how\nthat is best done due to the inheritance here (the only other derived class\nappears to be `CameraBuffer::Private` in the android layer).\n\n\n>   };\n> \n>   LIBCAMERA_FLAGS_ENABLE_OPERATORS(MappedFrameBuffer::MapFlag)\n> diff --git a/src/libcamera/mapped_framebuffer.cpp b/src/libcamera/mapped_framebuffer.cpp\n> index f54bbf21f10987aecdf02c0a946edbb4931dd4c0..e85030d904ffaa5cd8cfae7b02d4b1b7010452a5 100644\n> --- a/src/libcamera/mapped_framebuffer.cpp\n> +++ b/src/libcamera/mapped_framebuffer.cpp\n> @@ -238,6 +238,16 @@ MappedFrameBuffer::MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags)\n> \n>   \t\tplanes_.emplace_back(info.address + plane.offset, plane.length);\n>   \t}\n> +\n> +\tbuffer_ = buffer;\n> +}\n> +\n> +int MappedFrameBuffer::getPlaneFD(unsigned int plane)\n> +{\n> +\tif (plane > buffer_->planes().size())\n\nThis should be `plane >=` in any case.\n\n\nRegards,\nBarnabás Pőcze\n\n> +\t\treturn -EINVAL;\n> +\n> +\treturn buffer_->planes()[plane].fd.get();\n>   }\n> \n>   } /* namespace libcamera */\n> \n> --\n> 2.50.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 BA922BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 25 Sep 2025 15:33:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AE69B6B5F3;\n\tThu, 25 Sep 2025 17:33:28 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D080269318\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 25 Sep 2025 17:33:26 +0200 (CEST)","from [192.168.33.22] (185.221.140.70.nat.pool.zt.hu\n\t[185.221.140.70])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8F75F1129;\n\tThu, 25 Sep 2025 17:32:01 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"OZobkX/5\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1758814321;\n\tbh=7CK7Sc9Wf8TQIP27amHUQ7XBnlhxUBFruMVkpkenDMQ=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=OZobkX/5h8ZS7OybM8N5s41J7+IYyEkdumhuVoqumw3mBEfHp9LcwaA8WSb+NvTCJ\n\tgi84Lkwv2RbVDIdI2PE2L/2eAFDBpWd7fheTo1QAcSiduyT21InXsHTdjO17svLFsX\n\tP3S1PMU1kWNRtWOuQCbcwqrP7Ia3KtzwWPSHKx24=","Message-ID":"<4d256c50-066c-4280-8210-f34e7f14740c@ideasonboard.com>","Date":"Thu, 25 Sep 2025 17:33:22 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v2 06/37] libcamera: MappedFrameBuffer: Add\n\tMappedFrameBuffer::getPlaneFD()","To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tlibcamera-devel@lists.libcamera.org","Cc":"Milan Zamazal <mzamazal@redhat.com>","References":"<20250824-b4-v0-5-2-gpuisp-v2-a-v2-0-96f4576c814e@linaro.org>\n\t<ZdX-ht3wf-0w774VbF9-9bfM7hVwtocs9BxVnTq7WWDZNsyJkH4AzSXz3wTErbHO_0fAzNmNUgFuKQI3kJAiAA==@protonmail.internalid>\n\t<20250824-b4-v0-5-2-gpuisp-v2-a-v2-6-96f4576c814e@linaro.org>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20250824-b4-v0-5-2-gpuisp-v2-a-v2-6-96f4576c814e@linaro.org>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":36011,"web_url":"https://patchwork.libcamera.org/comment/36011/","msgid":"<570338a9-00b8-49e1-b865-8721c7e9b11b@collabora.com>","date":"2025-09-27T20:15:19","subject":"Re: [PATCH v2 06/37] libcamera: MappedFrameBuffer: Add\n\tMappedFrameBuffer::getPlaneFD()","submitter":{"id":140,"url":"https://patchwork.libcamera.org/api/people/140/","name":"Robert Mader","email":"robert.mader@collabora.com"},"content":"Hi,\n\nOn 9/25/25 17:33, Barnabás Pőcze wrote:\n> Hi\n>\n> 2025. 08. 24. 2:48 keltezéssel, Bryan O'Donoghue írta:\n>> Add MappedFrameBuffer::getPlaneFD() which takes a plane index and \n>> returns\n>> the file descriptor associated with it.\n>>\n>> This fd will be used to feed into eglCreateImageKHR for both texture\n>> creation on upload and directly render-to-texture where the texture \n>> buffer\n>> comes from the fd given to eglCreateImageKHR.\n>>\n>> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>\n>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n>> ---\n>>   include/libcamera/internal/mapped_framebuffer.h |  4 ++++\n>>   src/libcamera/mapped_framebuffer.cpp            | 10 ++++++++++\n>>   2 files changed, 14 insertions(+)\n>>\n>> diff --git a/include/libcamera/internal/mapped_framebuffer.h \n>> b/include/libcamera/internal/mapped_framebuffer.h\n>> index \n>> 6aaabf5086b4658363e4e2ed02242248bfffdcbc..f7a6870764c4d035f77544354aa46a70095952a0 \n>> 100644\n>> --- a/include/libcamera/internal/mapped_framebuffer.h\n>> +++ b/include/libcamera/internal/mapped_framebuffer.h\n>> @@ -55,6 +55,10 @@ public:\n>>       using MapFlags = Flags<MapFlag>;\n>>\n>>       MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags);\n>> +    int getPlaneFD(unsigned int plane);\n>> +\n>> +private:\n>> +    const FrameBuffer *buffer_;\n>\n> I am not a fan of this approach. This is all but guaranteed to be\n> dangling in some cases. For example, \n> `mali-c55.cpp:IPAMaliC55::mapBuffers`\n> will keep a whole map of `MappedFrameBuffers` with dangling pointers.\n> Similar thing happens in rpi.\n>\n> Maybe extending the type stored in `planes_` is an option, but not \n> sure how\n> that is best done due to the inheritance here (the only other derived \n> class\n> appears to be `CameraBuffer::Private` in the android layer).\n\nI'd like to add that using MappedFrameBuffer for querying the planes \nmight be unnecessary as well as undesirable in the first place, for the \nfollowing reasons:\n\n 1. Output buffers should never need to get mapped in the GPU-ISP.\n 2. Input buffer should only get mapped when necessary. If we can\n    directly import buffers to the GPU, that avoids a full buffer copy\n    plus the overhead of mmapping and syncing - and with the commit\n    \"libcamera: software_isp: Run sw-statistics once every 4th frame\" we\n    fully avoid mmaping/syncing the input buffer in many cases.\n 3. Just using the FDs from FrameBuffer seems to work just as well, see\n    A, which is a PoC for the above.\n\nBest regards,\n\nRobert\n\nA.: \nhttps://gitlab.freedesktop.org/rmader/libcamera/-/commit/1f5c2764c4d42c916e52f9c06c44f4ae52519a78\n\n>\n>>   };\n>>\n>>   LIBCAMERA_FLAGS_ENABLE_OPERATORS(MappedFrameBuffer::MapFlag)\n>> diff --git a/src/libcamera/mapped_framebuffer.cpp \n>> b/src/libcamera/mapped_framebuffer.cpp\n>> index \n>> f54bbf21f10987aecdf02c0a946edbb4931dd4c0..e85030d904ffaa5cd8cfae7b02d4b1b7010452a5 \n>> 100644\n>> --- a/src/libcamera/mapped_framebuffer.cpp\n>> +++ b/src/libcamera/mapped_framebuffer.cpp\n>> @@ -238,6 +238,16 @@ MappedFrameBuffer::MappedFrameBuffer(const \n>> FrameBuffer *buffer, MapFlags flags)\n>>\n>>           planes_.emplace_back(info.address + plane.offset, \n>> plane.length);\n>>       }\n>> +\n>> +    buffer_ = buffer;\n>> +}\n>> +\n>> +int MappedFrameBuffer::getPlaneFD(unsigned int plane)\n>> +{\n>> +    if (plane > buffer_->planes().size())\n>\n> This should be `plane >=` in any case.\n>\n>\n> Regards,\n> Barnabás Pőcze\n>\n>> +        return -EINVAL;\n>> +\n>> +    return buffer_->planes()[plane].fd.get();\n>>   }\n>>\n>>   } /* namespace libcamera */\n>>\n>> -- \n>> 2.50.1\n>>\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 BA87ABDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 27 Sep 2025 20:15:30 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5F0736B5F3;\n\tSat, 27 Sep 2025 22:15:29 +0200 (CEST)","from sender4-op-o12.zoho.com (sender4-op-o12.zoho.com\n\t[136.143.188.12])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4CB966B5A2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 27 Sep 2025 22:15:27 +0200 (CEST)","by mx.zohomail.com with SMTPS id 1759004122092916.7084402038859;\n\tSat, 27 Sep 2025 13:15:22 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=collabora.com\n\theader.i=robert.mader@collabora.com header.b=\"JRS8a4gQ\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1759004124; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=aeYq9A55Kl6VhXUzDh9R6iiFCIE/lVje41bnh3VLLXft91RBdXRoWl/4DGX7MZlBIEHjGjg8Wfn5cQkjLWFiKXwqPenB6Jwsx4xd9JrIrW1C5eiINUVD1JVtYAynmDwwESC16pA4yx2t128yB2RIYMgQPI45jorv9gq3cGtmCNk=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1759004124;\n\th=Content-Type:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc;\n\tbh=edxrVdrXTtudW0ZTL3kgfXMI7AvpUB+2/cpdNiVz9pA=; \n\tb=cgomorjeK3Ni/16pUTtk71yxqKelvq6U6cfb5MAiL8n6ONXnFiaMOychJsM2V968Db/BK4FNoIN9Ul3W+/CgvWZPro0hKLEQEbCL+PSiQmGr/i2lngNOpmg4kY+lCzV9xIc7MxJUDY9h6PemQAqbtZQTk6zWRudwmadpu0l+GYw=","ARC-Authentication-Results":"i=1; mx.zohomail.com;\n\tdkim=pass  header.i=collabora.com;\n\tspf=pass  smtp.mailfrom=robert.mader@collabora.com;\n\tdmarc=pass header.from=<robert.mader@collabora.com>","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1759004124;\n\ts=zohomail; d=collabora.com; i=robert.mader@collabora.com;\n\th=Content-Type:Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:References:From:From:In-Reply-To:Message-Id:Reply-To:Cc;\n\tbh=edxrVdrXTtudW0ZTL3kgfXMI7AvpUB+2/cpdNiVz9pA=;\n\tb=JRS8a4gQZB6rw9n1g0JSBH4qhl68979xLQVMZcYBPI4T2Lw5AapzC3J2V7R1IaHZ\n\tK3exMPoGUGfgu0+tj/VqDopLUE1BlCJPoRPiY49/RynTpPJavYUNRwXGJ7I8tT7vqyi\n\t5L8pK5U9zDbHuhP+AvECsBMf23PguiL1hpAPd+Q8=","Content-Type":"multipart/alternative;\n\tboundary=\"------------yCgrlkcrQKoxGIcgklMtJpVs\"","Message-ID":"<570338a9-00b8-49e1-b865-8721c7e9b11b@collabora.com>","Date":"Sat, 27 Sep 2025 22:15:19 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v2 06/37] libcamera: MappedFrameBuffer: Add\n\tMappedFrameBuffer::getPlaneFD()","To":"libcamera-devel@lists.libcamera.org","References":"<20250824-b4-v0-5-2-gpuisp-v2-a-v2-0-96f4576c814e@linaro.org>\n\t<ZdX-ht3wf-0w774VbF9-9bfM7hVwtocs9BxVnTq7WWDZNsyJkH4AzSXz3wTErbHO_0fAzNmNUgFuKQI3kJAiAA==@protonmail.internalid>\n\t<20250824-b4-v0-5-2-gpuisp-v2-a-v2-6-96f4576c814e@linaro.org>\n\t<4d256c50-066c-4280-8210-f34e7f14740c@ideasonboard.com>","Content-Language":"en-US, de-DE, en-GB","From":"Robert Mader <robert.mader@collabora.com>","In-Reply-To":"<4d256c50-066c-4280-8210-f34e7f14740c@ideasonboard.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":36152,"web_url":"https://patchwork.libcamera.org/comment/36152/","msgid":"<27f2bead-1250-4f51-9ef6-260b7878b4bf@nxsw.ie>","date":"2025-10-06T21:00:57","subject":"Re: [PATCH v2 06/37] libcamera: MappedFrameBuffer: Add\n\tMappedFrameBuffer::getPlaneFD()","submitter":{"id":226,"url":"https://patchwork.libcamera.org/api/people/226/","name":"Bryan O'Donoghue","email":"bod.linux@nxsw.ie"},"content":"On 27/09/2025 21:15, Robert Mader wrote:\n> Hi,\n> \n> On 9/25/25 17:33, Barnabás Pőcze wrote:\n>> Hi\n>>\n>> 2025. 08. 24. 2:48 keltezéssel, Bryan O'Donoghue írta:\n>>> Add MappedFrameBuffer::getPlaneFD() which takes a plane index and \n>>> returns\n>>> the file descriptor associated with it.\n>>>\n>>> This fd will be used to feed into eglCreateImageKHR for both texture\n>>> creation on upload and directly render-to-texture where the texture \n>>> buffer\n>>> comes from the fd given to eglCreateImageKHR.\n>>>\n>>> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>\n>>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n>>> ---\n>>>   include/libcamera/internal/mapped_framebuffer.h |  4 ++++\n>>>   src/libcamera/mapped_framebuffer.cpp            | 10 ++++++++++\n>>>   2 files changed, 14 insertions(+)\n>>>\n>>> diff --git a/include/libcamera/internal/mapped_framebuffer.h b/ \n>>> include/libcamera/internal/mapped_framebuffer.h\n>>> index \n>>> 6aaabf5086b4658363e4e2ed02242248bfffdcbc..f7a6870764c4d035f77544354aa46a70095952a0 100644\n>>> --- a/include/libcamera/internal/mapped_framebuffer.h\n>>> +++ b/include/libcamera/internal/mapped_framebuffer.h\n>>> @@ -55,6 +55,10 @@ public:\n>>>       using MapFlags = Flags<MapFlag>;\n>>>\n>>>       MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags);\n>>> +    int getPlaneFD(unsigned int plane);\n>>> +\n>>> +private:\n>>> +    const FrameBuffer *buffer_;\n>>\n>> I am not a fan of this approach. This is all but guaranteed to be\n>> dangling in some cases. For example, `mali- \n>> c55.cpp:IPAMaliC55::mapBuffers`\n>> will keep a whole map of `MappedFrameBuffers` with dangling pointers.\n>> Similar thing happens in rpi.\n>>\n>> Maybe extending the type stored in `planes_` is an option, but not \n>> sure how\n>> that is best done due to the inheritance here (the only other derived \n>> class\n>> appears to be `CameraBuffer::Private` in the android layer).\n> \n> I'd like to add that using MappedFrameBuffer for querying the planes \n> might be unnecessary as well as undesirable in the first place, for the \n> following reasons:\n> \n>  1. Output buffers should never need to get mapped in the GPU-ISP.\n>  2. Input buffer should only get mapped when necessary. If we can\n>     directly import buffers to the GPU, that avoids a full buffer copy\n>     plus the overhead of mmapping and syncing - and with the commit\n>     \"libcamera: software_isp: Run sw-statistics once every 4th frame\" we\n>     fully avoid mmaping/syncing the input buffer in many cases.\n>  3. Just using the FDs from FrameBuffer seems to work just as well, see\n>     A, which is a PoC for the above.\n> \n> Best regards,\n> \n> Robert\n> \n> A.: https://gitlab.freedesktop.org/rmader/libcamera/-/ \n> commit/1f5c2764c4d42c916e52f9c06c44f4ae52519a78\n> \n>>\n>>>   };\n>>>\n>>>   LIBCAMERA_FLAGS_ENABLE_OPERATORS(MappedFrameBuffer::MapFlag)\n>>> diff --git a/src/libcamera/mapped_framebuffer.cpp b/src/libcamera/ \n>>> mapped_framebuffer.cpp\n>>> index \n>>> f54bbf21f10987aecdf02c0a946edbb4931dd4c0..e85030d904ffaa5cd8cfae7b02d4b1b7010452a5 100644\n>>> --- a/src/libcamera/mapped_framebuffer.cpp\n>>> +++ b/src/libcamera/mapped_framebuffer.cpp\n>>> @@ -238,6 +238,16 @@ MappedFrameBuffer::MappedFrameBuffer(const \n>>> FrameBuffer *buffer, MapFlags flags)\n>>>\n>>>           planes_.emplace_back(info.address + plane.offset, \n>>> plane.length);\n>>>       }\n>>> +\n>>> +    buffer_ = buffer;\n>>> +}\n>>> +\n>>> +int MappedFrameBuffer::getPlaneFD(unsigned int plane)\n>>> +{\n>>> +    if (plane > buffer_->planes().size())\n>>\n>> This should be `plane >=` in any case.\nBased on the response here and a code-fragment from Robert, I've dropped \nthis patch for v3.\n\n---\nbod","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 B054CC324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  6 Oct 2025 21:01:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 85C536936E;\n\tMon,  6 Oct 2025 23:01:07 +0200 (CEST)","from mail-10624.protonmail.ch (mail-10624.protonmail.ch\n\t[79.135.106.24])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 422E36936E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  6 Oct 2025 23:01:05 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=nxsw.ie header.i=@nxsw.ie header.b=\"Arjxsbmh\";\n\tdkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxsw.ie;\n\ts=protonmail3; t=1759784462; x=1760043662;\n\tbh=K8DsjfmoPtbTxluxRU+LNuc6P2A6cF8Pk9cTDy84oN0=;\n\th=Date:To:From:Subject:Message-ID:In-Reply-To:References:\n\tFeedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:\n\tMessage-ID:BIMI-Selector;\n\tb=Arjxsbmh0eGoQxxlDAdmUWE1g9CBx5R+LSG4/WLoj1KMDwZgCVRcnoMzC9iqw1xPn\n\t8TvcQNeamvAJNSmxO13VmH2k3JRrY2eaj22DfUlTL5r73yswbPZNZMM+4sxurD9inE\n\tBZzwRrPpm5IYj5D4v2qHfKo+VtphtO67Txbi1LlZOKTI+OYnu40HizUSkVw71htOX8\n\tAXi37hBZxr7r9SzSuZHIwczV85CUoQsiiTpv/COTh/KoYR+uzTM1TCX/0da0mAPSZP\n\tuMV3DzcJZes6V8JiUvkrktOe8ORbfTLEEuHc6O0CYnN327Xr+/AnA7zOIETkyAO3fC\n\tq0RL9eHIljQXQ==","Date":"Mon, 06 Oct 2025 21:00:57 +0000","To":"Robert Mader <robert.mader@collabora.com>,\n\tlibcamera-devel@lists.libcamera.org","From":"Bryan O'Donoghue <bod.linux@nxsw.ie>","Subject":"Re: [PATCH v2 06/37] libcamera: MappedFrameBuffer: Add\n\tMappedFrameBuffer::getPlaneFD()","Message-ID":"<27f2bead-1250-4f51-9ef6-260b7878b4bf@nxsw.ie>","In-Reply-To":"<570338a9-00b8-49e1-b865-8721c7e9b11b@collabora.com>","References":"<20250824-b4-v0-5-2-gpuisp-v2-a-v2-0-96f4576c814e@linaro.org>\n\t<ZdX-ht3wf-0w774VbF9-9bfM7hVwtocs9BxVnTq7WWDZNsyJkH4AzSXz3wTErbHO_0fAzNmNUgFuKQI3kJAiAA==@protonmail.internalid>\n\t<20250824-b4-v0-5-2-gpuisp-v2-a-v2-6-96f4576c814e@linaro.org>\n\t<4d256c50-066c-4280-8210-f34e7f14740c@ideasonboard.com>\n\t<570338a9-00b8-49e1-b865-8721c7e9b11b@collabora.com>","Feedback-ID":"136405006:user:proton","X-Pm-Message-ID":"4b1b945c6980d421f3e66cb2cc67a5b1cbfb6397","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]