[{"id":29684,"web_url":"https://patchwork.libcamera.org/comment/29684/","msgid":"<171710860353.372008.5445378416796981813@ping.linuxembedded.co.uk>","date":"2024-05-30T22:36:43","subject":"Re: [PATCH v2 5/5] libcamera: software_isp: Allow using dma-buffers\n\tfrom /dev/udmabuf","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Hans de Goede (2024-05-30 18:16:00)\n> Allow the DmaBufAllocator used by the software ISP to use memfd() +\n> /dev/udmabuf for the software ISP destination buffers.\n> \n> This is useful on Linux distributions where normal users are not allowed\n> to access /dev/dma_heap/* while they are allowed to access /dev/udmabuf.\n> \n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> Signed-off-by: Hans de Goede <hdegoede@redhat.com>\n> ---\n>  src/libcamera/software_isp/software_isp.cpp | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp\n> index b5eab670..8535db90 100644\n> --- a/src/libcamera/software_isp/software_isp.cpp\n> +++ b/src/libcamera/software_isp/software_isp.cpp\n> @@ -66,7 +66,8 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor)\n>         : debayerParams_{ DebayerParams::kGain10, DebayerParams::kGain10,\n>                           DebayerParams::kGain10, 0.5f, 0 },\n>           dmaHeap_(DmaBufAllocator::DmaBufAllocatorFlag::CmaHeap |\n> -                  DmaBufAllocator::DmaBufAllocatorFlag::SystemHeap)\n> +                  DmaBufAllocator::DmaBufAllocatorFlag::SystemHeap |\n> +                  DmaBufAllocator::DmaBufAllocatorFlag::UDmaBuf)\n>  {\n>         if (!dmaHeap_.isValid()) {\n>                 LOG(SoftwareIsp, Error) << \"Failed to create DmaBufAllocator object\";\n> -- \n> 2.45.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 CA080BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 30 May 2024 22:36:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 72250634BB;\n\tFri, 31 May 2024 00:36:47 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 05A92634B9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 31 May 2024 00:36:46 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8B047A06;\n\tFri, 31 May 2024 00:36:41 +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=\"s541M+wR\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1717108601;\n\tbh=PfIVatwOKNlY6tha7T9QuuOkxjNf6KuppLcqCkz3UR8=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=s541M+wRysR2OnJgVqJ1s1AJTe0l0RuSgj2Bz8zwdqnleorbpkmHkCFxnV7PUfJ1w\n\t343NlS2qEWfhr9/CgRl/cnv+R3ngIMVoAhfwX+pFioURv9dIuzLDmkHbVGynC86OCw\n\tmXNPJBIt63bEQ6y7kbUUqezrcltqYQVAbBxfr9PU=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240530171600.259495-6-hdegoede@redhat.com>","References":"<20240530171600.259495-1-hdegoede@redhat.com>\n\t<20240530171600.259495-6-hdegoede@redhat.com>","Subject":"Re: [PATCH v2 5/5] libcamera: software_isp: Allow using dma-buffers\n\tfrom /dev/udmabuf","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Andrey Konovalov <andrey.konovalov.ynk@gmail.com>,\n\tPavel Machek <pavel@ucw.cz>,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>, \n\tMilan Zamazal <mzamazal@redhat.com>, Maxime Ripard <mripard@redhat.com>, \n\tHans de Goede <hdegoede@redhat.com>","To":"Hans de Goede <hdegoede@redhat.com>, libcamera-devel@lists.libcamera.org","Date":"Thu, 30 May 2024 23:36:43 +0100","Message-ID":"<171710860353.372008.5445378416796981813@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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":29719,"web_url":"https://patchwork.libcamera.org/comment/29719/","msgid":"<20240601135559.GA8475@pendragon.ideasonboard.com>","date":"2024-06-01T13:55:59","subject":"Re: [PATCH v2 5/5] libcamera: software_isp: Allow using dma-buffers\n\tfrom /dev/udmabuf","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Hans,\n\nThank you for the patch.\n\nOn Thu, May 30, 2024 at 07:16:00PM +0200, Hans de Goede wrote:\n> Allow the DmaBufAllocator used by the software ISP to use memfd() +\n> /dev/udmabuf for the software ISP destination buffers.\n> \n> This is useful on Linux distributions where normal users are not allowed\n> to access /dev/dma_heap/* while they are allowed to access /dev/udmabuf.\n> \n> Signed-off-by: Hans de Goede <hdegoede@redhat.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/libcamera/software_isp/software_isp.cpp | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp\n> index b5eab670..8535db90 100644\n> --- a/src/libcamera/software_isp/software_isp.cpp\n> +++ b/src/libcamera/software_isp/software_isp.cpp\n> @@ -66,7 +66,8 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor)\n>  \t: debayerParams_{ DebayerParams::kGain10, DebayerParams::kGain10,\n>  \t\t\t  DebayerParams::kGain10, 0.5f, 0 },\n>  \t  dmaHeap_(DmaBufAllocator::DmaBufAllocatorFlag::CmaHeap |\n> -\t\t   DmaBufAllocator::DmaBufAllocatorFlag::SystemHeap)\n> +\t\t   DmaBufAllocator::DmaBufAllocatorFlag::SystemHeap |\n> +\t\t   DmaBufAllocator::DmaBufAllocatorFlag::UDmaBuf)\n>  {\n>  \tif (!dmaHeap_.isValid()) {\n>  \t\tLOG(SoftwareIsp, Error) << \"Failed to create DmaBufAllocator object\";","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 C19DBBD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  1 Jun 2024 13:56:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DC139634AF;\n\tSat,  1 Jun 2024 15:56:15 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 85092634AF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  1 Jun 2024 15:56:14 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6F27522A;\n\tSat,  1 Jun 2024 15:56:08 +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=\"t6k92GAm\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1717250168;\n\tbh=OYqm9j/hEjKbYxq14eA+e7xnqkXKTQJcRCVqomgQpzc=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=t6k92GAmc60KijW6mUFdIDyEtjDm5nK2TvQaaLi6nR0V5DEzRbgG495X3pzA2t3r1\n\teZ1kKP/5gLF0eysZqMumv1bHcXtTZUNps5IczCBJOtu4oD9jS/M+VsnTxdlNAnczju\n\tK1aQprs3/djCp8qc6aKqRDZr2qHveRG02Zvrkajs=","Date":"Sat, 1 Jun 2024 16:55:59 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Hans de Goede <hdegoede@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tAndrey Konovalov <andrey.konovalov.ynk@gmail.com>,\n\tPavel Machek <pavel@ucw.cz>,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>, \n\tMilan Zamazal <mzamazal@redhat.com>, Maxime Ripard <mripard@redhat.com>","Subject":"Re: [PATCH v2 5/5] libcamera: software_isp: Allow using dma-buffers\n\tfrom /dev/udmabuf","Message-ID":"<20240601135559.GA8475@pendragon.ideasonboard.com>","References":"<20240530171600.259495-1-hdegoede@redhat.com>\n\t<20240530171600.259495-6-hdegoede@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20240530171600.259495-6-hdegoede@redhat.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>"}}]