[{"id":38681,"web_url":"https://patchwork.libcamera.org/comment/38681/","msgid":"<177781169086.45302.15563379930447819613@ping.linuxembedded.co.uk>","date":"2026-05-03T12:34:50","subject":"Re: [PATCH 1/3] egl: Add more parameters to\n\tcreateInputDMABufTexture2D()","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Robert Mader (2026-05-03 12:40:00)\n> In order to match createTexture2D(). This will allow us to replace the\n> later with the former going forward.\n> \n> Also demote an error log to debug, avoiding flodding the logs in cases\n> where import failure is an expected result.\n> \n> Signed-off-by: Robert Mader <robert.mader@collabora.com>\n> ---\n>  include/libcamera/internal/egl.h |  4 ++--\n>  src/libcamera/egl.cpp            | 37 +++++++++++++++++++++++++-------\n>  2 files changed, 31 insertions(+), 10 deletions(-)\n> \n> diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h\n> index 0ad2320b1..bd2f20e33 100644\n> --- a/include/libcamera/internal/egl.h\n> +++ b/include/libcamera/internal/egl.h\n> @@ -101,7 +101,7 @@ public:\n>  \n>         int initEGLContext();\n>  \n> -       int createInputDMABufTexture2D(eGLImage &eglImage, int fd);\n> +       int createInputDMABufTexture2D(eGLImage &eglImage, GLint format, uint32_t width, uint32_t height, int fd);\n>         int createOutputDMABufTexture2D(eGLImage &eglImage, int fd);\n>         void createTexture2D(eGLImage &eglImage, GLint format, uint32_t width, uint32_t height, void *data);\n>  \n> @@ -133,7 +133,7 @@ private:\n>                           unsigned int shaderDataLen,\n>                           Span<const std::string> shaderEnv);\n>  \n> -       int createDMABufTexture2D(eGLImage &eglImage, int fd, bool output);\n> +       int createDMABufTexture2D(eGLImage &eglImage, int fd, uint32_t drm_format, uint32_t width, uint32_t height, bool output);\n>  \n>         PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glEGLImageTargetTexture2DOES;\n>         PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR;\n> diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp\n> index f65929470..c30ed95a7 100644\n> --- a/src/libcamera/egl.cpp\n> +++ b/src/libcamera/egl.cpp\n> @@ -19,6 +19,7 @@\n>  \n>  #include <libcamera/base/thread.h>\n>  \n> +#include <GLES3/gl32.h>\n>  #include <libdrm/drm_fourcc.h>\n>  \n>  namespace libcamera {\n> @@ -102,6 +103,9 @@ void eGL::syncOutput()\n>   * \\brief Create a DMA-BUF backed 2D texture\n>   * \\param[in,out] eglImage EGL image to associate with the DMA-BUF\n>   * \\param[in] fd DMA-BUF file descriptor\n> + * \\param[in] drm_format the DRM fourcc\n> + * \\param[in] width the buffer width\n> + * \\param[in] height the buffer height\n>   * \\param[in] output If true, create framebuffer for render target\n>   *\n>   * Internal implementation for creating DMA-BUF textures. Creates an EGL\n> @@ -110,15 +114,15 @@ void eGL::syncOutput()\n>   *\n>   * \\return 0 on success, or -ENODEV on failure\n>   */\n> -int eGL::createDMABufTexture2D(eGLImage &eglImage, int fd, bool output)\n> +int eGL::createDMABufTexture2D(eGLImage &eglImage, int fd, uint32_t drm_format, uint32_t width, uint32_t height, bool output)\n>  {\n>         ASSERT(tid_ == Thread::currentId());\n>  \n>         // clang-format off\n>         EGLint image_attrs[] = {\n> -               EGL_WIDTH, (EGLint)eglImage.width_,\n> -               EGL_HEIGHT, (EGLint)eglImage.height_,\n> -               EGL_LINUX_DRM_FOURCC_EXT, DRM_FORMAT_ARGB8888,\n> +               EGL_WIDTH, (EGLint)width,\n> +               EGL_HEIGHT, (EGLint)height,\n> +               EGL_LINUX_DRM_FOURCC_EXT, (EGLint)drm_format,\n>                 EGL_DMA_BUF_PLANE0_FD_EXT, fd,\n>                 EGL_DMA_BUF_PLANE0_OFFSET_EXT, 0,\n>                 EGL_DMA_BUF_PLANE0_PITCH_EXT, (EGLint)eglImage.stride_,\n> @@ -133,7 +137,7 @@ int eGL::createDMABufTexture2D(eGLImage &eglImage, int fd, bool output)\n>                                               NULL, image_attrs);\n>  \n>         if (image == EGL_NO_IMAGE_KHR) {\n> -               LOG(eGL, Error) << \"eglCreateImageKHR fail\";\n> +               LOG(eGL, Debug) << \"eglCreateImageKHR fail\";\n>                 return -ENODEV;\n>         }\n>  \n> @@ -171,6 +175,9 @@ int eGL::createDMABufTexture2D(eGLImage &eglImage, int fd, bool output)\n>  /**\n>   * \\brief Create an input DMA-BUF backed texture\n>   * \\param[in,out] eglImage EGL image to associate with the DMA-BUF\n> + * \\param[in] format the GL format\n> + * \\param[in] width the buffer width\n> + * \\param[in] height the buffer height\n>   * \\param[in] fd DMA-BUF file descriptor\n>   *\n>   * Creates an EGL image from a DMA-BUF file descriptor and binds it to\n> @@ -179,11 +186,25 @@ int eGL::createDMABufTexture2D(eGLImage &eglImage, int fd, bool output)\n>   *\n>   * \\return 0 on success, or -ENODEV on failure\n>   */\n> -int eGL::createInputDMABufTexture2D(eGLImage &eglImage, int fd)\n> +int eGL::createInputDMABufTexture2D(eGLImage &eglImage, GLint format, uint32_t width, uint32_t height, int fd)\n>  {\n> +       EGLint drm_format;\n> +\n>         ASSERT(tid_ == Thread::currentId());\n>  \n> -       return createDMABufTexture2D(eglImage, fd, false);\n> +       switch (format) {\n> +       case GL_LUMINANCE:\n> +               drm_format = DRM_FORMAT_R8;\n> +               break;\n> +       case GL_RG:\n> +               drm_format = DRM_FORMAT_RG88;\n> +               break;\n> +       default:\n> +               LOG(eGL, Error) << \"unhandled GL format\";\n> +               return -ENODEV;\n> +       }\n> +\n> +       return createDMABufTexture2D(eglImage, fd, drm_format, width, height, false);\n>  }\n>  \n>  /**\n> @@ -202,7 +223,7 @@ int eGL::createOutputDMABufTexture2D(eGLImage &eglImage, int fd)\n>  {\n>         ASSERT(tid_ == Thread::currentId());\n>  \n> -       return createDMABufTexture2D(eglImage, fd, true);\n> +       return createDMABufTexture2D(eglImage, fd, DRM_FORMAT_ARGB8888, eglImage.width_, eglImage.height_, true);\n\nThis looks like something wrong perhaps crept in, unless I'm\nmisunderstanding or there's another overload - here we have \n\neGL::createInputDMABufTexture2D(eGLImage &eglImage, GLint format, uint32_t width, uint32_t height, int fd)\n\nbut this usage is\n\n  eGLImage, fd, format, width, height,  bool ?\n\n>  }\n>  \n>  /**\n> -- \n> 2.54.0\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 CD510BDCB5\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun,  3 May 2026 12:34:56 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0072F63022;\n\tSun,  3 May 2026 14:34:55 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B837362FD3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  3 May 2026 14:34:53 +0200 (CEST)","from monstersaurus.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 68409B5;\n\tSun,  3 May 2026 14:34:52 +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=\"mMzSGGZ2\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1777811692;\n\tbh=mrsAUQrlu46Zlu/eqAT22s9xrs0u2Cskw4IE+z/Sxik=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=mMzSGGZ2BAvuj+9Nudcgv5tl2PD1TmJVHYJyc4KoZfg4iBYHeqOHqXTygKGjpyyLi\n\tPSGJWk795bMtLXO+qL+Dqe3LRrYTGQWlb85ctC+eN7VDqvMjgq8/ilDduvqTYf81wj\n\tr3Bmgdfu46LVI6XyAC5OfZ/vfUiFORg6nTaWu7GY=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20260503114002.139255-2-robert.mader@collabora.com>","References":"<20260503114002.139255-1-robert.mader@collabora.com>\n\t<20260503114002.139255-2-robert.mader@collabora.com>","Subject":"Re: [PATCH 1/3] egl: Add more parameters to\n\tcreateInputDMABufTexture2D()","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Robert Mader <robert.mader@collabora.com>","To":"Robert Mader <robert.mader@collabora.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Sun, 03 May 2026 13:34:50 +0100","Message-ID":"<177781169086.45302.15563379930447819613@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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":38682,"web_url":"https://patchwork.libcamera.org/comment/38682/","msgid":"<24dc84ff-8015-4c78-a537-5c7cbc287cfb@collabora.com>","date":"2026-05-03T22:32:23","subject":"Re: [PATCH 1/3] egl: Add more parameters to\n\tcreateInputDMABufTexture2D()","submitter":{"id":140,"url":"https://patchwork.libcamera.org/api/people/140/","name":"Robert Mader","email":"robert.mader@collabora.com"},"content":"Hi,\n\nOn 03.05.26 14:34, Kieran Bingham wrote:\n>> ...\n>>   \n>>   /**\n>> @@ -202,7 +223,7 @@ int eGL::createOutputDMABufTexture2D(eGLImage &eglImage, int fd)\n>>   {\n>>          ASSERT(tid_ == Thread::currentId());\n>>   \n>> -       return createDMABufTexture2D(eglImage, fd, true);\n>> +       return createDMABufTexture2D(eglImage, fd, DRM_FORMAT_ARGB8888, eglImage.width_, eglImage.height_, true);\n> This looks like something wrong perhaps crept in, unless I'm\n> misunderstanding or there's another overload - here we have\n>\n> eGL::createInputDMABufTexture2D(eGLImage &eglImage, GLint format, uint32_t width, uint32_t height, int fd)\n>\n> but this usage is\n>\n>    eGLImage, fd, format, width, height,  bool ?\n\nI think you're confusing `createDMABufTexture2D()` and \n`createInputDMABufTexture2D()` ;)\n\nFWIW., IMO we could consider dropping `createInputDMABufTexture2D()` and \n`createOutputDMABufTexture2D()` - both small wrappers around \n`createDMABufTexture2D()` - and directly expose the later.","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 81598BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun,  3 May 2026 22:32:35 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 69EA263022;\n\tMon,  4 May 2026 00:32:34 +0200 (CEST)","from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com\n\t[136.143.188.112])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 828EC62E6A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  4 May 2026 00:32:32 +0200 (CEST)","by mx.zohomail.com with SMTPS id 1777847545962461.09550483346743; \n\tSun, 3 May 2026 15:32:25 -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=\"iyOUP0kF\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1777847548; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=WJwawv1tR6HS5FhStqrFZSF/+MZBJowDU5MIMdoUB+E/G8nJlBVgGYGUKe1s6FY2/gQRXhFti0efjdNuDrjhsRU6xKwRoxpiesK0cx1OGtgBTb/6KZpDMhMywh8wCkkhEUuKCh2w2mihecdhp3RrMMPGjRwaAvqmjGOiOm/D8ck=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1777847548;\n\th=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc;\n\tbh=LWbaJWHGNm7tNBb8ccKZoK7aUZa2nNPFC9TV68Jyh6M=; \n\tb=kQ/rr9TJv1yRWU2yjQtjpN/prakCkixUqOgLNC/Jyw0/wI2EJiyo2mHC7nWZNUP+aWs/e18cwtpi69hqZwTJPWH3LTirC2NdOLTvG3QAumlHzpqzMyyloWkQ0OnoxX0RMtI4/e2aFVGvjNAxDZW+/+AQeCAH9uJx4J5ZpCql7zU=","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=1777847548;\n\ts=zohomail; d=collabora.com; i=robert.mader@collabora.com;\n\th=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To:Cc;\n\tbh=LWbaJWHGNm7tNBb8ccKZoK7aUZa2nNPFC9TV68Jyh6M=;\n\tb=iyOUP0kFNePCTpBytUYHRnV5kf7YEwRm5vdZLvchv9LV5ENNCO1FGGVt46hP7XPD\n\twxB2pZTjeMaHxmW6RXJg8Tnw5bsCS30wiG63Wq+gjrbTdNMwcvaQIQPysGUI/RawO4r\n\tgKFfOIu/7zi89ys2Ci9579HRmtpF/lv/roY7J+4c=","Message-ID":"<24dc84ff-8015-4c78-a537-5c7cbc287cfb@collabora.com>","Date":"Mon, 4 May 2026 00:32:23 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH 1/3] egl: Add more parameters to\n\tcreateInputDMABufTexture2D()","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20260503114002.139255-1-robert.mader@collabora.com>\n\t<20260503114002.139255-2-robert.mader@collabora.com>\n\t<177781169086.45302.15563379930447819613@ping.linuxembedded.co.uk>","Content-Language":"en-US, de-DE, en-GB","From":"Robert Mader <robert.mader@collabora.com>","In-Reply-To":"<177781169086.45302.15563379930447819613@ping.linuxembedded.co.uk>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","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":38685,"web_url":"https://patchwork.libcamera.org/comment/38685/","msgid":"<177787932816.45302.11269120894486066187@ping.linuxembedded.co.uk>","date":"2026-05-04T07:22:08","subject":"Re: [PATCH 1/3] egl: Add more parameters to\n\tcreateInputDMABufTexture2D()","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Robert Mader (2026-05-03 23:32:23)\n> Hi,\n> \n> On 03.05.26 14:34, Kieran Bingham wrote:\n> >> ...\n> >>   \n> >>   /**\n> >> @@ -202,7 +223,7 @@ int eGL::createOutputDMABufTexture2D(eGLImage &eglImage, int fd)\n> >>   {\n> >>          ASSERT(tid_ == Thread::currentId());\n> >>   \n> >> -       return createDMABufTexture2D(eglImage, fd, true);\n> >> +       return createDMABufTexture2D(eglImage, fd, DRM_FORMAT_ARGB8888, eglImage.width_, eglImage.height_, true);\n> > This looks like something wrong perhaps crept in, unless I'm\n> > misunderstanding or there's another overload - here we have\n> >\n> > eGL::createInputDMABufTexture2D(eGLImage &eglImage, GLint format, uint32_t width, uint32_t height, int fd)\n> >\n> > but this usage is\n> >\n> >    eGLImage, fd, format, width, height,  bool ?\n> \n> I think you're confusing `createDMABufTexture2D()` and \n> `createInputDMABufTexture2D()` ;)\n\nUgh indeed. Sorry, tired eyes and trying to read code in a mail\nclient...\n\n> \n> FWIW., IMO we could consider dropping `createInputDMABufTexture2D()` and \n> `createOutputDMABufTexture2D()` - both small wrappers around \n> `createDMABufTexture2D()` - and directly expose the later.\n\nWell it seems like longSpelledOutNames and longSpelledOutDiffNames can\nbe difficult to spot so if you think there's a cleanup opportunity that\nwould make the code better then maybe it's worth seeing what it looks\nlike - but no specific requirement.\n\nI'll check through the rest of the patches and push up to CI to test.\n\n--\nKieran","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 48703BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  4 May 2026 07:22:14 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F413F6301A;\n\tMon,  4 May 2026 09:22:12 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6ACB96271A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  4 May 2026 09:22:11 +0200 (CEST)","from monstersaurus.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 9BA3F8F;\n\tMon,  4 May 2026 09:22:09 +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=\"N5b6l91l\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1777879329;\n\tbh=1DD5e8YA/hb8xPPgrdMfzmSqDK+UpS+DPgyjN7iqkog=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=N5b6l91lxpshy3dUEMYOf/wUN92uCQ8tmIWybRPYMGl/6J2ECFAMHTqxP0podnsET\n\tt8Ww7fDElwUlAUD3bvsGtECZbq5ObtmFOCGVCEzNTZHn5AR8UEUrFuwTfcKlTayYMN\n\t4Q89xvwz0ViLtGRZShITLYqpxloCNUoTOqhiDbRU=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<24dc84ff-8015-4c78-a537-5c7cbc287cfb@collabora.com>","References":"<20260503114002.139255-1-robert.mader@collabora.com>\n\t<20260503114002.139255-2-robert.mader@collabora.com>\n\t<177781169086.45302.15563379930447819613@ping.linuxembedded.co.uk>\n\t<24dc84ff-8015-4c78-a537-5c7cbc287cfb@collabora.com>","Subject":"Re: [PATCH 1/3] egl: Add more parameters to\n\tcreateInputDMABufTexture2D()","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Robert Mader <robert.mader@collabora.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 04 May 2026 08:22:08 +0100","Message-ID":"<177787932816.45302.11269120894486066187@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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":38688,"web_url":"https://patchwork.libcamera.org/comment/38688/","msgid":"<0f285669-3695-4686-b799-ca161e8c0ca6@collabora.com>","date":"2026-05-04T08:02:14","subject":"Re: [PATCH 1/3] egl: Add more parameters to\n\tcreateInputDMABufTexture2D()","submitter":{"id":140,"url":"https://patchwork.libcamera.org/api/people/140/","name":"Robert Mader","email":"robert.mader@collabora.com"},"content":"On 04.05.26 09:22, Kieran Bingham wrote:\n> Quoting Robert Mader (2026-05-03 23:32:23)\n>> Hi,\n>>\n>> On 03.05.26 14:34, Kieran Bingham wrote:\n>>>> ...\n>>>>    \n>>>>    /**\n>>>> @@ -202,7 +223,7 @@ int eGL::createOutputDMABufTexture2D(eGLImage &eglImage, int fd)\n>>>>    {\n>>>>           ASSERT(tid_ == Thread::currentId());\n>>>>    \n>>>> -       return createDMABufTexture2D(eglImage, fd, true);\n>>>> +       return createDMABufTexture2D(eglImage, fd, DRM_FORMAT_ARGB8888, eglImage.width_, eglImage.height_, true);\n>>> This looks like something wrong perhaps crept in, unless I'm\n>>> misunderstanding or there's another overload - here we have\n>>>\n>>> eGL::createInputDMABufTexture2D(eGLImage &eglImage, GLint format, uint32_t width, uint32_t height, int fd)\n>>>\n>>> but this usage is\n>>>\n>>>     eGLImage, fd, format, width, height,  bool ?\n>> I think you're confusing `createDMABufTexture2D()` and\n>> `createInputDMABufTexture2D()` ;)\n> Ugh indeed. Sorry, tired eyes and trying to read code in a mail\n> client...\n>\n>> FWIW., IMO we could consider dropping `createInputDMABufTexture2D()` and\n>> `createOutputDMABufTexture2D()` - both small wrappers around\n>> `createDMABufTexture2D()` - and directly expose the later.\n> Well it seems like longSpelledOutNames and longSpelledOutDiffNames can\n> be difficult to spot so if you think there's a cleanup opportunity that\n> would make the code better then maybe it's worth seeing what it looks\n> like - but no specific requirement.\n>\n> I'll check through the rest of the patches and push up to CI to test.\n>\n> --\n> Kieran\n\nThanks! Just ran the style checker locally - had a setup issue with that \nyesterday - and there is one wrong indentation in the second patch:\n\n> --- src/libcamera/software_isp/debayer_egl.cpp +++ \n> src/libcamera/software_isp/debayer_egl.cpp @@ -555,7 +555,7 @@ /* \n> Calculate stats for the whole frame */ if (dmaSyncers.empty() && \n> (frame % SwStatsCpu::kStatPerNumFrames) == 0) - \n> dmaSyncBegin(dmaSyncers, input, nullptr); + dmaSyncBegin(dmaSyncers, \n> input, nullptr); stats_->processFrame(frame, 0, input); \n> dmaSyncers.clear();\n\nIn case we don't need a v2 otherwise, is that something you can fix \nup while applying? 😬","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 AAF33BDCB5\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  4 May 2026 08:02:25 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7F7AE6301A;\n\tMon,  4 May 2026 10:02:24 +0200 (CEST)","from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com\n\t[136.143.188.112])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6FC6D6271A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  4 May 2026 10:02:22 +0200 (CEST)","by mx.zohomail.com with SMTPS id 1777881737341293.70577523351324; \n\tMon, 4 May 2026 01:02:17 -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=\"cjcxSRCo\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1777881738; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=i/4vLXC7+W4yOW9Wdi9jyW9FeIz8h4NFeIoSUf4Q6JHVZCRy7whFDUHaPhIouStARc9siCvt+rLXjJXzr2e2KkCcvqxaTb5/4I/HcMhL/Z8pt9jDnrh6aVkzIqWoPG5EVN4u0ik8xLDXm3FrG39zVSx4Jr9o8VISX1JqWt8ZWWM=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1777881738;\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=KLNTIsjMVgio+xiWTDiV52MUWLKZauWRJffc1Hi6zAY=; \n\tb=aHrf8epQKvbqwhWz5saM3hhhc9JET3U1p1atOa9415ZsZqUTPLEZFLXsWCMUJgF8JyS6me/0rPNLqy/Mce6fmA4z5ohuUYH609byq1Om1+Ak31UxktvBjbFvNKb6Ya0E4QJeTRBH7ZXgvXIPYyH7ljZghBs2kdmQEGoGuy+DMbg=","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=1777881738;\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=KLNTIsjMVgio+xiWTDiV52MUWLKZauWRJffc1Hi6zAY=;\n\tb=cjcxSRCoqwzX0t9VPAjn6u7b1ONmn2SSZ9F0nNyBh65oEsBR+tVj5aerROp26LUT\n\tCVod/R3LNF/BPfjrAEy3Sq64QqxMMlQXVFj4YuSp08uXvycjYGbFatzSyJkF9k+GM9C\n\twW/4ZiU+JqHLYPRQ7VHW2XOkQ6WD++ssV+UzPPpg=","Content-Type":"multipart/alternative;\n\tboundary=\"------------29yopKeKmnQwt1gHBv6qrpwL\"","Message-ID":"<0f285669-3695-4686-b799-ca161e8c0ca6@collabora.com>","Date":"Mon, 4 May 2026 10:02:14 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH 1/3] egl: Add more parameters to\n\tcreateInputDMABufTexture2D()","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20260503114002.139255-1-robert.mader@collabora.com>\n\t<20260503114002.139255-2-robert.mader@collabora.com>\n\t<177781169086.45302.15563379930447819613@ping.linuxembedded.co.uk>\n\t<24dc84ff-8015-4c78-a537-5c7cbc287cfb@collabora.com>\n\t<177787932816.45302.11269120894486066187@ping.linuxembedded.co.uk>","Content-Language":"en-US, de-DE","From":"Robert Mader <robert.mader@collabora.com>","In-Reply-To":"<177787932816.45302.11269120894486066187@ping.linuxembedded.co.uk>","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>"}}]