[{"id":37324,"web_url":"https://patchwork.libcamera.org/comment/37324/","msgid":"<dbdc25f5-cc16-49ba-bfb4-17410c9ce8e2@collabora.com>","date":"2025-12-12T12:13:35","subject":"Re: [PATCH v8 01/26] libcamera: software_isp: gbm: Add a GBM helper\n\tclass for GPU surface access","submitter":{"id":140,"url":"https://patchwork.libcamera.org/api/people/140/","name":"Robert Mader","email":"robert.mader@collabora.com"},"content":"Hi,\n\nOn 12.12.25 01:29, Bryan O'Donoghue wrote:\n> A helper class to interact with GBM. This will allow us to specify the\n> internal storage format of the GPU when making a texture for the Debayer\n> vertex/fragment shaders and thus ensure we receive an uncompressed and\n> untiled output buffer.\n\nI'm pretty sure we should be able to use the device EGL platform instead \nhere (1), which is generally more robust and simpler than GBM - and \nmeant for usecases like this.\n\nCompression/tiling should not be an issue any more as we import the \nbuffers with linear modifiers in the next patch (see \n\"EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT\") and a major advantage is that we \ndon't have to deal with hardcoded paths like \"/dev/dri/renderD128\". \nInstead we can just use the default/preferred device or enumerate our \noptions with EXT_device_enumeration.\n\nThus we should be able to drop this patch and adopt the EGL \ninitialization, which should make things simpler overall.\n\n1. EGL_EXT_platform_device, equivalent to EGL_MESA_platform_surfaceless \ntogether with EGL_EXT_explicit_device.\n\n> Acked-by: Kieran Bingham<kieran.bingham@ideasonboard.com>\n> Signed-off-by: Bryan O'Donoghue<bryan.odonoghue@linaro.org>\n> ---\n>   include/libcamera/internal/gbm.h       |  39 ++++++++\n>   include/libcamera/internal/meson.build |   1 +\n>   src/libcamera/gbm.cpp                  | 130 +++++++++++++++++++++++++\n>   src/libcamera/meson.build              |  10 ++\n>   4 files changed, 180 insertions(+)\n>   create mode 100644 include/libcamera/internal/gbm.h\n>   create mode 100644 src/libcamera/gbm.cpp\n>\n> diff --git a/include/libcamera/internal/gbm.h b/include/libcamera/internal/gbm.h\n> new file mode 100644\n> index 000000000..09811d1ef\n> --- /dev/null\n> +++ b/include/libcamera/internal/gbm.h\n> @@ -0,0 +1,39 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright (C) 2024, Linaro Ltd.\n> + *\n> + * Authors:\n> + * Bryan O'Donoghue<bryan.odonoghue@linaro.org>\n> + *\n> + * Helper class for managing GBM interactions\n> + */\n> +\n> +#pragma once\n> +\n> +#include <gbm.h>\n> +\n> +#include <libcamera/base/log.h>\n> +\n> +#include <libcamera/formats.h>\n> +\n> +namespace libcamera {\n> +\n> +LOG_DECLARE_CATEGORY(GBM)\n> +\n> +class GBM\n> +{\n> +public:\n> +\tGBM();\n> +\t~GBM();\n> +\n> +\tint createDevice();\n> +\tstruct gbm_device *getDevice();\n> +\tPixelFormat getPixelFormat();\n> +\n> +private:\n> +\tint fd_;\n> +\tstruct gbm_device *gbmDevice_;\n> +\tPixelFormat format_;\n> +};\n> +\n> +} /* namespace libcamera */\n> diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\n> index e9540a2f7..b8324996b 100644\n> --- a/include/libcamera/internal/meson.build\n> +++ b/include/libcamera/internal/meson.build\n> @@ -23,6 +23,7 @@ libcamera_internal_headers = files([\n>       'dma_buf_allocator.h',\n>       'formats.h',\n>       'framebuffer.h',\n> +    'gbm.h',\n>       'global_configuration.h',\n>       'ipa_data_serializer.h',\n>       'ipa_manager.h',\n> diff --git a/src/libcamera/gbm.cpp b/src/libcamera/gbm.cpp\n> new file mode 100644\n> index 000000000..a2e4c7076\n> --- /dev/null\n> +++ b/src/libcamera/gbm.cpp\n> @@ -0,0 +1,130 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright (C) 2024, Linaro Ltd.\n> + *\n> + * Authors:\n> + * Bryan O'Donoghue<bryan.odonoghue@linaro.org>\n> + *\n> + * Helper class for managing GBM interactions\n> + */\n> +\n> +#include \"libcamera/internal/gbm.h\"\n> +\n> +#include <errno.h>\n> +#include <fcntl.h>\n> +#include <sys/ioctl.h>\n> +#include <sys/mman.h>\n> +#include <unistd.h>\n> +\n> +#include <linux/dma-buf.h>\n> +#include <linux/dma-heap.h>\n> +\n> +namespace libcamera {\n> +\n> +LOG_DEFINE_CATEGORY(GBM)\n> +\n> +/**\n> + * \\class GBM\n> + * \\brief Helper class for managing GBM interactions\n> + *\n> + * The GBM class provides a simplified interface for creating and managing\n> + * GBM devices. It handles the initialization and teardown of GBM devices\n> + * used for buffer allocation in graphics and camera pipelines.\n> + *\n> + * This class is responsible for opening a DRI render node, creating a GBM\n> + * device, and providing access to the device and its associated pixel format.\n> + */\n> +\n> +/**\n> + *\\var GBM::fd_\n> + *\\brief file descriptor to DRI device\n> + */\n> +\n> +/**\n> + *\\var GBM::gbmDevice_\n> + *\\brief Pointer to GBM device structure derived from fd_\n> + */\n> +\n> +/**\n> + *\\var GBM::format_\n> + *\\brief Pixel format the GBM surface was created in\n> + */\n> +\n> +/**\n> + *\\brief GBM constructor.\n> + *\n> + * Creates a GBM instance with unitialised state.\n> + */\n> +GBM::GBM()\n> +{\n> +\tfd_ = 0;\n> +\tgbmDevice_ = nullptr;\n> +}\n> +\n> +/**\n> + *\\brief GBM destructor\n> + *\n> + * Cleans up the GBM device if it was successfully created, and closes\n> + * the associated file descriptor.\n> + */\n> +GBM::~GBM()\n> +{\n> +\tif (gbmDevice_)\n> +\t\tgbm_device_destroy(gbmDevice_);\n> +}\n> +\n> +/**\n> + * \\brief Create and initialize a GBM device\n> + *\n> + * \\todo Get dri device name from envOption setting\n> + *\n> + * Opens the DRI render node (/dev/dri/renderD128) and creates a GBM\n> + * device using the libgbm library. Sets the default pixel format to\n> + * ARGB8888.\n> + *\n> + * \\return 0 on success, or a negative error code on failure\n> + */\n> +int GBM::createDevice()\n> +{\n> +\tconst char *dri_node = \"/dev/dri/renderD128\";\n> +\n> +\tfd_ = open(dri_node, O_RDWR | O_CLOEXEC);\n> +\tif (fd_ < 0) {\n> +\t\tLOG(GBM, Error) << \"Open \" << dri_node << \" fail \" << fd_;\n> +\t\treturn fd_;\n> +\t}\n> +\n> +\tgbmDevice_ = gbm_create_device(fd_);\n> +\tif (!gbmDevice_) {\n> +\t\tLOG(GBM, Error) << \"gbm_create_device fail\";\n> +\t\tclose(fd_);\n> +\t\treturn -errno;\n> +\t}\n> +\n> +\tformat_ = libcamera::formats::ARGB8888;\n> +\n> +\treturn 0;\n> +}\n> +\n> +/**\n> + * \\brief Retrieve the GBM device handle\n> + *\n> + * \\return Pointer to the gbm_device structure, or nullptr if the device\n> + * has not been created\n> + */\n> +struct gbm_device * GBM::getDevice()\n> +{\n> +\treturn gbmDevice_;\n> +}\n> +\n> +/**\n> + * \\brief Retrieve the pixel format\n> + *\n> + * \\return The PixelFormat used by this GBM instance (ARGB8888)\n> + */\n> +\n> +PixelFormat GBM::getPixelFormat()\n> +{\n> +\treturn format_;\n> +}\n> +} /* namespace libcamera */\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index 90d434a5a..685213c78 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -70,6 +70,15 @@ libcamera_deps = []\n>   libatomic = cc.find_library('atomic', required : false)\n>   libthreads = dependency('threads')\n>   \n> +libgbm = cc.find_library('gbm', required: false)\n> +gbm_works = cc.check_header('gbm.h', required: false)\n> +\n> +if libgbm.found() and gbm_works\n> +    libcamera_internal_sources += files([\n> +        'gbm.cpp',\n> +    ])\n> +endif\n> +\n>   subdir('base')\n>   subdir('converter')\n>   subdir('ipa')\n> @@ -178,6 +187,7 @@ libcamera_deps += [\n>       libcamera_base_private,\n>       libcrypto,\n>       libdl,\n> +    libgbm,\n>       liblttng,\n>       libudev,\n>       libyaml,","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 9330CBD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Dec 2025 12:13:46 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CFBAE6142F;\n\tFri, 12 Dec 2025 13:13:45 +0100 (CET)","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 E68C16142F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Dec 2025 13:13:43 +0100 (CET)","by mx.zohomail.com with SMTPS id 1765541618040954.716845017278;\n\tFri, 12 Dec 2025 04:13:38 -0800 (PST)"],"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=\"Oxfd9DVJ\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1765541619; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=DcX1bdB0xQIzyR33vMWFqhBYZFg5U/XDej1BQS93M0+2NrouX967johXLADIaL961Ocfn39C5+xqa0rwC67j2orqRyzOq2bgot6H9bddvwHaTNJqIv+5QknxCIu+2XWq1ZjF2CrIR2r71+4ntseZ2d5YwhgPIs7P5T4lDw0UMZw=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1765541619;\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=mcPrFVfwNR4H43NmA1ujp9Biol0MaJqnp7PGuMJCZ8o=; \n\tb=A1+tMKPIVpnjf4qAZQ/wpUvF77L/k+DeUwyyF4Vs8l8vDmYhGSFxv/YTlOk2sMOT3/Vw7sfB6fkJEUEYrctfh+zak3hbj3Vu+vyWfxNajsQ/ieaWFrwl2GWao+9jLgGwqVC7ABKJhhnalvzT21ZhDxaWABj/WhyLLYlepMC8pnQ=","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=1765541619;\n\ts=zohomail; d=collabora.com; i=robert.mader@collabora.com;\n\th=Message-ID:Date:Date:MIME-Version:From:From:Subject:Subject:To:To:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To:Cc;\n\tbh=mcPrFVfwNR4H43NmA1ujp9Biol0MaJqnp7PGuMJCZ8o=;\n\tb=Oxfd9DVJYBwBvK+gXYCSD1eOHs5K7Q8S9vZtRmdpmBh0EPOq10TMPku452w1V6x+\n\tFcbjOeer+dD70PVBzefQvLrhnWrEvTvmMcre35k6HMcDHcGPafRedAq9fT6P3Ao3Tv1\n\t29fl/GNsHShP7kMA6ePdjiMGKpqnXkkQg7tY1+k8=","Message-ID":"<dbdc25f5-cc16-49ba-bfb4-17410c9ce8e2@collabora.com>","Date":"Fri, 12 Dec 2025 13:13:35 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","From":"Robert Mader <robert.mader@collabora.com>","Subject":"Re: [PATCH v8 01/26] libcamera: software_isp: gbm: Add a GBM helper\n\tclass for GPU surface access","To":"libcamera-devel@lists.libcamera.org","References":"<20251212002937.3118-1-bryan.odonoghue@linaro.org>\n\t<20251212002937.3118-2-bryan.odonoghue@linaro.org>","Content-Language":"en-US, de-DE, en-GB","In-Reply-To":"<20251212002937.3118-2-bryan.odonoghue@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":37332,"web_url":"https://patchwork.libcamera.org/comment/37332/","msgid":"<a751cf4b-f649-4b8a-8dfb-c4b61caf2a1e@collabora.com>","date":"2025-12-12T14:21:35","subject":"Re: [PATCH v8 01/26] libcamera: software_isp: gbm: Add a GBM helper\n\tclass for GPU surface access","submitter":{"id":140,"url":"https://patchwork.libcamera.org/api/people/140/","name":"Robert Mader","email":"robert.mader@collabora.com"},"content":"FTR., I gave this a quick try and it seems to work just fine on my test \ndevices. Pushed a commit here: \nhttps://gitlab.freedesktop.org/rmader/libcamera/-/commits/v0.6.0-gpuisp-v8-fixes\n\nOn 12.12.25 13:13, Robert Mader wrote:\n> Hi,\n>\n> On 12.12.25 01:29, Bryan O'Donoghue wrote:\n>> A helper class to interact with GBM. This will allow us to specify the\n>> internal storage format of the GPU when making a texture for the Debayer\n>> vertex/fragment shaders and thus ensure we receive an uncompressed and\n>> untiled output buffer.\n>\n> I'm pretty sure we should be able to use the device EGL platform \n> instead here (1), which is generally more robust and simpler than GBM \n> - and meant for usecases like this.\n>\n> Compression/tiling should not be an issue any more as we import the \n> buffers with linear modifiers in the next patch (see \n> \"EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT\") and a major advantage is that we \n> don't have to deal with hardcoded paths like \"/dev/dri/renderD128\". \n> Instead we can just use the default/preferred device or enumerate our \n> options with EXT_device_enumeration.\n>\n> Thus we should be able to drop this patch and adopt the EGL \n> initialization, which should make things simpler overall.\n>\n> 1. EGL_EXT_platform_device, equivalent to \n> EGL_MESA_platform_surfaceless together with EGL_EXT_explicit_device.\n>\n>> Acked-by: Kieran Bingham<kieran.bingham@ideasonboard.com>\n>> Signed-off-by: Bryan O'Donoghue<bryan.odonoghue@linaro.org>\n>> ---\n>>   include/libcamera/internal/gbm.h       |  39 ++++++++\n>>   include/libcamera/internal/meson.build |   1 +\n>>   src/libcamera/gbm.cpp                  | 130 +++++++++++++++++++++++++\n>>   src/libcamera/meson.build              |  10 ++\n>>   4 files changed, 180 insertions(+)\n>>   create mode 100644 include/libcamera/internal/gbm.h\n>>   create mode 100644 src/libcamera/gbm.cpp\n>>\n>> diff --git a/include/libcamera/internal/gbm.h \n>> b/include/libcamera/internal/gbm.h\n>> new file mode 100644\n>> index 000000000..09811d1ef\n>> --- /dev/null\n>> +++ b/include/libcamera/internal/gbm.h\n>> @@ -0,0 +1,39 @@\n>> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n>> +/*\n>> + * Copyright (C) 2024, Linaro Ltd.\n>> + *\n>> + * Authors:\n>> + * Bryan O'Donoghue<bryan.odonoghue@linaro.org>\n>> + *\n>> + * Helper class for managing GBM interactions\n>> + */\n>> +\n>> +#pragma once\n>> +\n>> +#include <gbm.h>\n>> +\n>> +#include <libcamera/base/log.h>\n>> +\n>> +#include <libcamera/formats.h>\n>> +\n>> +namespace libcamera {\n>> +\n>> +LOG_DECLARE_CATEGORY(GBM)\n>> +\n>> +class GBM\n>> +{\n>> +public:\n>> +    GBM();\n>> +    ~GBM();\n>> +\n>> +    int createDevice();\n>> +    struct gbm_device *getDevice();\n>> +    PixelFormat getPixelFormat();\n>> +\n>> +private:\n>> +    int fd_;\n>> +    struct gbm_device *gbmDevice_;\n>> +    PixelFormat format_;\n>> +};\n>> +\n>> +} /* namespace libcamera */\n>> diff --git a/include/libcamera/internal/meson.build \n>> b/include/libcamera/internal/meson.build\n>> index e9540a2f7..b8324996b 100644\n>> --- a/include/libcamera/internal/meson.build\n>> +++ b/include/libcamera/internal/meson.build\n>> @@ -23,6 +23,7 @@ libcamera_internal_headers = files([\n>>       'dma_buf_allocator.h',\n>>       'formats.h',\n>>       'framebuffer.h',\n>> +    'gbm.h',\n>>       'global_configuration.h',\n>>       'ipa_data_serializer.h',\n>>       'ipa_manager.h',\n>> diff --git a/src/libcamera/gbm.cpp b/src/libcamera/gbm.cpp\n>> new file mode 100644\n>> index 000000000..a2e4c7076\n>> --- /dev/null\n>> +++ b/src/libcamera/gbm.cpp\n>> @@ -0,0 +1,130 @@\n>> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n>> +/*\n>> + * Copyright (C) 2024, Linaro Ltd.\n>> + *\n>> + * Authors:\n>> + * Bryan O'Donoghue<bryan.odonoghue@linaro.org>\n>> + *\n>> + * Helper class for managing GBM interactions\n>> + */\n>> +\n>> +#include \"libcamera/internal/gbm.h\"\n>> +\n>> +#include <errno.h>\n>> +#include <fcntl.h>\n>> +#include <sys/ioctl.h>\n>> +#include <sys/mman.h>\n>> +#include <unistd.h>\n>> +\n>> +#include <linux/dma-buf.h>\n>> +#include <linux/dma-heap.h>\n>> +\n>> +namespace libcamera {\n>> +\n>> +LOG_DEFINE_CATEGORY(GBM)\n>> +\n>> +/**\n>> + * \\class GBM\n>> + * \\brief Helper class for managing GBM interactions\n>> + *\n>> + * The GBM class provides a simplified interface for creating and \n>> managing\n>> + * GBM devices. It handles the initialization and teardown of GBM \n>> devices\n>> + * used for buffer allocation in graphics and camera pipelines.\n>> + *\n>> + * This class is responsible for opening a DRI render node, creating \n>> a GBM\n>> + * device, and providing access to the device and its associated \n>> pixel format.\n>> + */\n>> +\n>> +/**\n>> + *\\var GBM::fd_\n>> + *\\brief file descriptor to DRI device\n>> + */\n>> +\n>> +/**\n>> + *\\var GBM::gbmDevice_\n>> + *\\brief Pointer to GBM device structure derived from fd_\n>> + */\n>> +\n>> +/**\n>> + *\\var GBM::format_\n>> + *\\brief Pixel format the GBM surface was created in\n>> + */\n>> +\n>> +/**\n>> + *\\brief GBM constructor.\n>> + *\n>> + * Creates a GBM instance with unitialised state.\n>> + */\n>> +GBM::GBM()\n>> +{\n>> +    fd_ = 0;\n>> +    gbmDevice_ = nullptr;\n>> +}\n>> +\n>> +/**\n>> + *\\brief GBM destructor\n>> + *\n>> + * Cleans up the GBM device if it was successfully created, and closes\n>> + * the associated file descriptor.\n>> + */\n>> +GBM::~GBM()\n>> +{\n>> +    if (gbmDevice_)\n>> +        gbm_device_destroy(gbmDevice_);\n>> +}\n>> +\n>> +/**\n>> + * \\brief Create and initialize a GBM device\n>> + *\n>> + * \\todo Get dri device name from envOption setting\n>> + *\n>> + * Opens the DRI render node (/dev/dri/renderD128) and creates a GBM\n>> + * device using the libgbm library. Sets the default pixel format to\n>> + * ARGB8888.\n>> + *\n>> + * \\return 0 on success, or a negative error code on failure\n>> + */\n>> +int GBM::createDevice()\n>> +{\n>> +    const char *dri_node = \"/dev/dri/renderD128\";\n>> +\n>> +    fd_ = open(dri_node, O_RDWR | O_CLOEXEC);\n>> +    if (fd_ < 0) {\n>> +        LOG(GBM, Error) << \"Open \" << dri_node << \" fail \" << fd_;\n>> +        return fd_;\n>> +    }\n>> +\n>> +    gbmDevice_ = gbm_create_device(fd_);\n>> +    if (!gbmDevice_) {\n>> +        LOG(GBM, Error) << \"gbm_create_device fail\";\n>> +        close(fd_);\n>> +        return -errno;\n>> +    }\n>> +\n>> +    format_ = libcamera::formats::ARGB8888;\n>> +\n>> +    return 0;\n>> +}\n>> +\n>> +/**\n>> + * \\brief Retrieve the GBM device handle\n>> + *\n>> + * \\return Pointer to the gbm_device structure, or nullptr if the \n>> device\n>> + * has not been created\n>> + */\n>> +struct gbm_device * GBM::getDevice()\n>> +{\n>> +    return gbmDevice_;\n>> +}\n>> +\n>> +/**\n>> + * \\brief Retrieve the pixel format\n>> + *\n>> + * \\return The PixelFormat used by this GBM instance (ARGB8888)\n>> + */\n>> +\n>> +PixelFormat GBM::getPixelFormat()\n>> +{\n>> +    return format_;\n>> +}\n>> +} /* namespace libcamera */\n>> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n>> index 90d434a5a..685213c78 100644\n>> --- a/src/libcamera/meson.build\n>> +++ b/src/libcamera/meson.build\n>> @@ -70,6 +70,15 @@ libcamera_deps = []\n>>   libatomic = cc.find_library('atomic', required : false)\n>>   libthreads = dependency('threads')\n>>   +libgbm = cc.find_library('gbm', required: false)\n>> +gbm_works = cc.check_header('gbm.h', required: false)\n>> +\n>> +if libgbm.found() and gbm_works\n>> +    libcamera_internal_sources += files([\n>> +        'gbm.cpp',\n>> +    ])\n>> +endif\n>> +\n>>   subdir('base')\n>>   subdir('converter')\n>>   subdir('ipa')\n>> @@ -178,6 +187,7 @@ libcamera_deps += [\n>>       libcamera_base_private,\n>>       libcrypto,\n>>       libdl,\n>> +    libgbm,\n>>       liblttng,\n>>       libudev,\n>>       libyaml,","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 69EF3BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Dec 2025 14:21:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8D3FB6168F;\n\tFri, 12 Dec 2025 15:21:44 +0100 (CET)","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 AFC246142F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Dec 2025 15:21:42 +0100 (CET)","by mx.zohomail.com with SMTPS id 1765549297714230.98278454396302; \n\tFri, 12 Dec 2025 06:21:37 -0800 (PST)"],"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=\"GuEF2esG\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1765549298; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=MdfcVEe7/DJE2kEIIJS2L1msLWuza43CJeqRJ6/NDzJ4RBx8lsCo4rIlrK/nhVe0kAikXKQzEqoQDJ02o3v/0SE5sYg9Bnvbe4yPEDJ1nhhR+iAeE4dfpwuC1vEviqXr/SL9pGY7lkYZ/EFxGDeB+0XT0qe3qROhMA3ah+pI9oM=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1765549298;\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=j3wvW8J/SFlidf15Q/u0FS+QXuTI7AAhDReWB7yc4qc=; \n\tb=fV2EZ5zMAuattaUCwach0gtrcH1EWhPFW9+GrH/5b3amHJ7t+PVF2oQnX/HFZowiwtuQWBjOdD9h/OZxzVeK2aCAAzj63HhloXurkYHW5NjCnuKqdSDKkmc4djqppnZV3gg/7sIb6+gDl8vk5vmIsqbAOra/kQdDGDmTLDqGLoo=","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=1765549298;\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=j3wvW8J/SFlidf15Q/u0FS+QXuTI7AAhDReWB7yc4qc=;\n\tb=GuEF2esG/rQdCloa5ly1yEjcKfq77QDfSaWh++zV/odgSI9h7+kKziMRwz5gTOV5\n\ts1TKc1o7Qh99B/JkuSIAWbXOpk9oQvzO9fmUlyqW9V14zlLMDeagnASDeFYr2g3775w\n\tDCYL14W5Eb1wy/SHV8gE/zr0CrC+EBeurm4PfTgI=","Message-ID":"<a751cf4b-f649-4b8a-8dfb-c4b61caf2a1e@collabora.com>","Date":"Fri, 12 Dec 2025 15:21:35 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v8 01/26] libcamera: software_isp: gbm: Add a GBM helper\n\tclass for GPU surface access","To":"libcamera-devel@lists.libcamera.org","References":"<20251212002937.3118-1-bryan.odonoghue@linaro.org>\n\t<20251212002937.3118-2-bryan.odonoghue@linaro.org>\n\t<dbdc25f5-cc16-49ba-bfb4-17410c9ce8e2@collabora.com>","Content-Language":"en-US, de-DE","From":"Robert Mader <robert.mader@collabora.com>","In-Reply-To":"<dbdc25f5-cc16-49ba-bfb4-17410c9ce8e2@collabora.com>","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":37334,"web_url":"https://patchwork.libcamera.org/comment/37334/","msgid":"<cabcbd63-18c0-4c7a-b135-56c058dece0b@collabora.com>","date":"2025-12-12T14:36:16","subject":"Re: [PATCH v8 01/26] libcamera: software_isp: gbm: Add a GBM helper\n\tclass for GPU surface access","submitter":{"id":140,"url":"https://patchwork.libcamera.org/api/people/140/","name":"Robert Mader","email":"robert.mader@collabora.com"},"content":"P.S. (sorry for the noise): another advantage of not using GBM is that \nthat `LIBGL_ALWAYS_SOFTWARE=1` gets respected - making it easy to use \nllvmpipe - and that we can test things more easily on CI / on platforms \nwithout DRI device.\n\nOn 12.12.25 15:21, Robert Mader wrote:\n> FTR., I gave this a quick try and it seems to work just fine on my \n> test devices. Pushed a commit here: \n> https://gitlab.freedesktop.org/rmader/libcamera/-/commits/v0.6.0-gpuisp-v8-fixes\n>\n> On 12.12.25 13:13, Robert Mader wrote:\n>> Hi,\n>>\n>> On 12.12.25 01:29, Bryan O'Donoghue wrote:\n>>> A helper class to interact with GBM. This will allow us to specify the\n>>> internal storage format of the GPU when making a texture for the \n>>> Debayer\n>>> vertex/fragment shaders and thus ensure we receive an uncompressed and\n>>> untiled output buffer.\n>>\n>> I'm pretty sure we should be able to use the device EGL platform \n>> instead here (1), which is generally more robust and simpler than GBM \n>> - and meant for usecases like this.\n>>\n>> Compression/tiling should not be an issue any more as we import the \n>> buffers with linear modifiers in the next patch (see \n>> \"EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT\") and a major advantage is that \n>> we don't have to deal with hardcoded paths like \n>> \"/dev/dri/renderD128\". Instead we can just use the default/preferred \n>> device or enumerate our options with EXT_device_enumeration.\n>>\n>> Thus we should be able to drop this patch and adopt the EGL \n>> initialization, which should make things simpler overall.\n>>\n>> 1. EGL_EXT_platform_device, equivalent to \n>> EGL_MESA_platform_surfaceless together with EGL_EXT_explicit_device.\n>>\n>>> Acked-by: Kieran Bingham<kieran.bingham@ideasonboard.com>\n>>> Signed-off-by: Bryan O'Donoghue<bryan.odonoghue@linaro.org>\n>>> ---\n>>>   include/libcamera/internal/gbm.h       |  39 ++++++++\n>>>   include/libcamera/internal/meson.build |   1 +\n>>>   src/libcamera/gbm.cpp                  | 130 \n>>> +++++++++++++++++++++++++\n>>>   src/libcamera/meson.build              |  10 ++\n>>>   4 files changed, 180 insertions(+)\n>>>   create mode 100644 include/libcamera/internal/gbm.h\n>>>   create mode 100644 src/libcamera/gbm.cpp\n>>>\n>>> diff --git a/include/libcamera/internal/gbm.h \n>>> b/include/libcamera/internal/gbm.h\n>>> new file mode 100644\n>>> index 000000000..09811d1ef\n>>> --- /dev/null\n>>> +++ b/include/libcamera/internal/gbm.h\n>>> @@ -0,0 +1,39 @@\n>>> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n>>> +/*\n>>> + * Copyright (C) 2024, Linaro Ltd.\n>>> + *\n>>> + * Authors:\n>>> + * Bryan O'Donoghue<bryan.odonoghue@linaro.org>\n>>> + *\n>>> + * Helper class for managing GBM interactions\n>>> + */\n>>> +\n>>> +#pragma once\n>>> +\n>>> +#include <gbm.h>\n>>> +\n>>> +#include <libcamera/base/log.h>\n>>> +\n>>> +#include <libcamera/formats.h>\n>>> +\n>>> +namespace libcamera {\n>>> +\n>>> +LOG_DECLARE_CATEGORY(GBM)\n>>> +\n>>> +class GBM\n>>> +{\n>>> +public:\n>>> +    GBM();\n>>> +    ~GBM();\n>>> +\n>>> +    int createDevice();\n>>> +    struct gbm_device *getDevice();\n>>> +    PixelFormat getPixelFormat();\n>>> +\n>>> +private:\n>>> +    int fd_;\n>>> +    struct gbm_device *gbmDevice_;\n>>> +    PixelFormat format_;\n>>> +};\n>>> +\n>>> +} /* namespace libcamera */\n>>> diff --git a/include/libcamera/internal/meson.build \n>>> b/include/libcamera/internal/meson.build\n>>> index e9540a2f7..b8324996b 100644\n>>> --- a/include/libcamera/internal/meson.build\n>>> +++ b/include/libcamera/internal/meson.build\n>>> @@ -23,6 +23,7 @@ libcamera_internal_headers = files([\n>>>       'dma_buf_allocator.h',\n>>>       'formats.h',\n>>>       'framebuffer.h',\n>>> +    'gbm.h',\n>>>       'global_configuration.h',\n>>>       'ipa_data_serializer.h',\n>>>       'ipa_manager.h',\n>>> diff --git a/src/libcamera/gbm.cpp b/src/libcamera/gbm.cpp\n>>> new file mode 100644\n>>> index 000000000..a2e4c7076\n>>> --- /dev/null\n>>> +++ b/src/libcamera/gbm.cpp\n>>> @@ -0,0 +1,130 @@\n>>> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n>>> +/*\n>>> + * Copyright (C) 2024, Linaro Ltd.\n>>> + *\n>>> + * Authors:\n>>> + * Bryan O'Donoghue<bryan.odonoghue@linaro.org>\n>>> + *\n>>> + * Helper class for managing GBM interactions\n>>> + */\n>>> +\n>>> +#include \"libcamera/internal/gbm.h\"\n>>> +\n>>> +#include <errno.h>\n>>> +#include <fcntl.h>\n>>> +#include <sys/ioctl.h>\n>>> +#include <sys/mman.h>\n>>> +#include <unistd.h>\n>>> +\n>>> +#include <linux/dma-buf.h>\n>>> +#include <linux/dma-heap.h>\n>>> +\n>>> +namespace libcamera {\n>>> +\n>>> +LOG_DEFINE_CATEGORY(GBM)\n>>> +\n>>> +/**\n>>> + * \\class GBM\n>>> + * \\brief Helper class for managing GBM interactions\n>>> + *\n>>> + * The GBM class provides a simplified interface for creating and \n>>> managing\n>>> + * GBM devices. It handles the initialization and teardown of GBM \n>>> devices\n>>> + * used for buffer allocation in graphics and camera pipelines.\n>>> + *\n>>> + * This class is responsible for opening a DRI render node, \n>>> creating a GBM\n>>> + * device, and providing access to the device and its associated \n>>> pixel format.\n>>> + */\n>>> +\n>>> +/**\n>>> + *\\var GBM::fd_\n>>> + *\\brief file descriptor to DRI device\n>>> + */\n>>> +\n>>> +/**\n>>> + *\\var GBM::gbmDevice_\n>>> + *\\brief Pointer to GBM device structure derived from fd_\n>>> + */\n>>> +\n>>> +/**\n>>> + *\\var GBM::format_\n>>> + *\\brief Pixel format the GBM surface was created in\n>>> + */\n>>> +\n>>> +/**\n>>> + *\\brief GBM constructor.\n>>> + *\n>>> + * Creates a GBM instance with unitialised state.\n>>> + */\n>>> +GBM::GBM()\n>>> +{\n>>> +    fd_ = 0;\n>>> +    gbmDevice_ = nullptr;\n>>> +}\n>>> +\n>>> +/**\n>>> + *\\brief GBM destructor\n>>> + *\n>>> + * Cleans up the GBM device if it was successfully created, and closes\n>>> + * the associated file descriptor.\n>>> + */\n>>> +GBM::~GBM()\n>>> +{\n>>> +    if (gbmDevice_)\n>>> +        gbm_device_destroy(gbmDevice_);\n>>> +}\n>>> +\n>>> +/**\n>>> + * \\brief Create and initialize a GBM device\n>>> + *\n>>> + * \\todo Get dri device name from envOption setting\n>>> + *\n>>> + * Opens the DRI render node (/dev/dri/renderD128) and creates a GBM\n>>> + * device using the libgbm library. Sets the default pixel format to\n>>> + * ARGB8888.\n>>> + *\n>>> + * \\return 0 on success, or a negative error code on failure\n>>> + */\n>>> +int GBM::createDevice()\n>>> +{\n>>> +    const char *dri_node = \"/dev/dri/renderD128\";\n>>> +\n>>> +    fd_ = open(dri_node, O_RDWR | O_CLOEXEC);\n>>> +    if (fd_ < 0) {\n>>> +        LOG(GBM, Error) << \"Open \" << dri_node << \" fail \" << fd_;\n>>> +        return fd_;\n>>> +    }\n>>> +\n>>> +    gbmDevice_ = gbm_create_device(fd_);\n>>> +    if (!gbmDevice_) {\n>>> +        LOG(GBM, Error) << \"gbm_create_device fail\";\n>>> +        close(fd_);\n>>> +        return -errno;\n>>> +    }\n>>> +\n>>> +    format_ = libcamera::formats::ARGB8888;\n>>> +\n>>> +    return 0;\n>>> +}\n>>> +\n>>> +/**\n>>> + * \\brief Retrieve the GBM device handle\n>>> + *\n>>> + * \\return Pointer to the gbm_device structure, or nullptr if the \n>>> device\n>>> + * has not been created\n>>> + */\n>>> +struct gbm_device * GBM::getDevice()\n>>> +{\n>>> +    return gbmDevice_;\n>>> +}\n>>> +\n>>> +/**\n>>> + * \\brief Retrieve the pixel format\n>>> + *\n>>> + * \\return The PixelFormat used by this GBM instance (ARGB8888)\n>>> + */\n>>> +\n>>> +PixelFormat GBM::getPixelFormat()\n>>> +{\n>>> +    return format_;\n>>> +}\n>>> +} /* namespace libcamera */\n>>> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n>>> index 90d434a5a..685213c78 100644\n>>> --- a/src/libcamera/meson.build\n>>> +++ b/src/libcamera/meson.build\n>>> @@ -70,6 +70,15 @@ libcamera_deps = []\n>>>   libatomic = cc.find_library('atomic', required : false)\n>>>   libthreads = dependency('threads')\n>>>   +libgbm = cc.find_library('gbm', required: false)\n>>> +gbm_works = cc.check_header('gbm.h', required: false)\n>>> +\n>>> +if libgbm.found() and gbm_works\n>>> +    libcamera_internal_sources += files([\n>>> +        'gbm.cpp',\n>>> +    ])\n>>> +endif\n>>> +\n>>>   subdir('base')\n>>>   subdir('converter')\n>>>   subdir('ipa')\n>>> @@ -178,6 +187,7 @@ libcamera_deps += [\n>>>       libcamera_base_private,\n>>>       libcrypto,\n>>>       libdl,\n>>> +    libgbm,\n>>>       liblttng,\n>>>       libudev,\n>>>       libyaml,\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 1B975C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Dec 2025 14:36:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 29D9461698;\n\tFri, 12 Dec 2025 15:36:26 +0100 (CET)","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 C2FCE6142F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Dec 2025 15:36:24 +0100 (CET)","by mx.zohomail.com with SMTPS id 1765550178622958.4857951520385;\n\tFri, 12 Dec 2025 06:36:18 -0800 (PST)"],"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=\"FAaX52EA\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1765550180; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=T41RySHyCJzOdMKOKOctdHcCXQ52xir5ZiwXiCmof0igFXq3wTbJERA7B8IQ/JgOESn3iEl0n5n/6qL2klZxno0xQU7bmSIwinR+yqmDajSGyj1AeMFL0BWFGgD51XYyCeDSNDuSsEL3EtQ5sb116t9VCxbBJ4pHJQYhFm33hZE=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1765550180;\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=t/yW6g8Kq3Q+f9g/b2CN76z0H1yN5OhxpAL4APBVzeM=; \n\tb=Ujs6rTKGjh3d6nd+hWgcx4aBHog/GQjtzmr9qk/0GWphnLngqxoQj/GSkGas+4t9KvuXvrh+C/YkMrAb0ttiLgs4XXK2eN5ZsrRYBjkJYTr0RyemcLG6+qojFe5IL+xKBIB6GmngJ/yoYi6S1+vbUBUJMTRwaulpHSb4cwvJWsk=","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=1765550180;\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=t/yW6g8Kq3Q+f9g/b2CN76z0H1yN5OhxpAL4APBVzeM=;\n\tb=FAaX52EAfZJxcitVivaCLT2lbkse94rqJof98fP4h960SvyRnKxy9aXoJFABtgr/\n\tf1XnTPYub205oJ7oKt52hnYUFfJ5R0dEPhV21UJeVF3cQihd5DbERInirJmEUb6LmOT\n\t6XMqbyBENsVPJ2ZrV8Ny4JBFxpIr56XhlGviUf2U=","Message-ID":"<cabcbd63-18c0-4c7a-b135-56c058dece0b@collabora.com>","Date":"Fri, 12 Dec 2025 15:36:16 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v8 01/26] libcamera: software_isp: gbm: Add a GBM helper\n\tclass for GPU surface access","To":"libcamera-devel@lists.libcamera.org","References":"<20251212002937.3118-1-bryan.odonoghue@linaro.org>\n\t<20251212002937.3118-2-bryan.odonoghue@linaro.org>\n\t<dbdc25f5-cc16-49ba-bfb4-17410c9ce8e2@collabora.com>\n\t<a751cf4b-f649-4b8a-8dfb-c4b61caf2a1e@collabora.com>","Content-Language":"en-US, de-DE","From":"Robert Mader <robert.mader@collabora.com>","In-Reply-To":"<a751cf4b-f649-4b8a-8dfb-c4b61caf2a1e@collabora.com>","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":37343,"web_url":"https://patchwork.libcamera.org/comment/37343/","msgid":"<85sedfqyo6.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2025-12-12T19:37:29","subject":"Re: [PATCH v8 01/26] libcamera: software_isp: gbm: Add a GBM helper\n\tclass for GPU surface access","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Robert Mader <robert.mader@collabora.com> writes:\n\n> FTR., I gave this a quick try and it seems to work just fine on my test\n> devices. Pushed a commit here:\n> https://gitlab.freedesktop.org/rmader/libcamera/-/commits/v0.6.0-gpuisp-v8-fixes\n\nIt fails in my environment with:\n\n  ERROR eGL egl.cpp:309 eglInitialize fail\n\n> On 12.12.25 13:13, Robert Mader wrote:\n>> Hi,\n>>\n>> On 12.12.25 01:29, Bryan O'Donoghue wrote:\n>>> A helper class to interact with GBM. This will allow us to specify the\n>>> internal storage format of the GPU when making a texture for the Debayer\n>>> vertex/fragment shaders and thus ensure we receive an uncompressed and\n>>> untiled output buffer.\n>>\n>> I'm pretty sure we should be able to use the device EGL platform instead here (1),\n>> which is generally more robust and simpler than GBM - and meant for usecases like\n>> this.\n>>\n>> Compression/tiling should not be an issue any more as we import the buffers with\n>> linear modifiers in the next patch (see \"EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT\") and a\n>> major advantage is that we don't have to deal with hardcoded paths like\n>> \"/dev/dri/renderD128\". Instead we can just use the default/preferred device or\n>> enumerate our options with EXT_device_enumeration.\n>>\n>> Thus we should be able to drop this patch and adopt the EGL initialization, which\n>> should make things simpler overall.\n>>\n>> 1. EGL_EXT_platform_device, equivalent to EGL_MESA_platform_surfaceless together\n>> with EGL_EXT_explicit_device.\n>>\n>>> Acked-by: Kieran Bingham<kieran.bingham@ideasonboard.com>\n>>> Signed-off-by: Bryan O'Donoghue<bryan.odonoghue@linaro.org>\n>>> ---\n>>>   include/libcamera/internal/gbm.h       |  39 ++++++++\n>>>   include/libcamera/internal/meson.build |   1 +\n>>>   src/libcamera/gbm.cpp                  | 130 +++++++++++++++++++++++++\n>>>   src/libcamera/meson.build              |  10 ++\n>>>   4 files changed, 180 insertions(+)\n>>>   create mode 100644 include/libcamera/internal/gbm.h\n>>>   create mode 100644 src/libcamera/gbm.cpp\n>>>\n>>> diff --git a/include/libcamera/internal/gbm.h b/include/libcamera/internal/gbm.h\n>>> new file mode 100644\n>>> index 000000000..09811d1ef\n>>> --- /dev/null\n>>> +++ b/include/libcamera/internal/gbm.h\n>>> @@ -0,0 +1,39 @@\n>>> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n>>> +/*\n>>> + * Copyright (C) 2024, Linaro Ltd.\n>>> + *\n>>> + * Authors:\n>>> + * Bryan O'Donoghue<bryan.odonoghue@linaro.org>\n>>> + *\n>>> + * Helper class for managing GBM interactions\n>>> + */\n>>> +\n>>> +#pragma once\n>>> +\n>>> +#include <gbm.h>\n>>> +\n>>> +#include <libcamera/base/log.h>\n>>> +\n>>> +#include <libcamera/formats.h>\n>>> +\n>>> +namespace libcamera {\n>>> +\n>>> +LOG_DECLARE_CATEGORY(GBM)\n>>> +\n>>> +class GBM\n>>> +{\n>>> +public:\n>>> +    GBM();\n>>> +    ~GBM();\n>>> +\n>>> +    int createDevice();\n>>> +    struct gbm_device *getDevice();\n>>> +    PixelFormat getPixelFormat();\n>>> +\n>>> +private:\n>>> +    int fd_;\n>>> +    struct gbm_device *gbmDevice_;\n>>> +    PixelFormat format_;\n>>> +};\n>>> +\n>>> +} /* namespace libcamera */\n>>> diff --git a/include/libcamera/internal/meson.build\n>>> b/include/libcamera/internal/meson.build\n>>> index e9540a2f7..b8324996b 100644\n>>> --- a/include/libcamera/internal/meson.build\n>>> +++ b/include/libcamera/internal/meson.build\n>>> @@ -23,6 +23,7 @@ libcamera_internal_headers = files([\n>>>       'dma_buf_allocator.h',\n>>>       'formats.h',\n>>>       'framebuffer.h',\n>>> +    'gbm.h',\n>>>       'global_configuration.h',\n>>>       'ipa_data_serializer.h',\n>>>       'ipa_manager.h',\n>>> diff --git a/src/libcamera/gbm.cpp b/src/libcamera/gbm.cpp\n>>> new file mode 100644\n>>> index 000000000..a2e4c7076\n>>> --- /dev/null\n>>> +++ b/src/libcamera/gbm.cpp\n>>> @@ -0,0 +1,130 @@\n>>> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n>>> +/*\n>>> + * Copyright (C) 2024, Linaro Ltd.\n>>> + *\n>>> + * Authors:\n>>> + * Bryan O'Donoghue<bryan.odonoghue@linaro.org>\n>>> + *\n>>> + * Helper class for managing GBM interactions\n>>> + */\n>>> +\n>>> +#include \"libcamera/internal/gbm.h\"\n>>> +\n>>> +#include <errno.h>\n>>> +#include <fcntl.h>\n>>> +#include <sys/ioctl.h>\n>>> +#include <sys/mman.h>\n>>> +#include <unistd.h>\n>>> +\n>>> +#include <linux/dma-buf.h>\n>>> +#include <linux/dma-heap.h>\n>>> +\n>>> +namespace libcamera {\n>>> +\n>>> +LOG_DEFINE_CATEGORY(GBM)\n>>> +\n>>> +/**\n>>> + * \\class GBM\n>>> + * \\brief Helper class for managing GBM interactions\n>>> + *\n>>> + * The GBM class provides a simplified interface for creating and managing\n>>> + * GBM devices. It handles the initialization and teardown of GBM devices\n>>> + * used for buffer allocation in graphics and camera pipelines.\n>>> + *\n>>> + * This class is responsible for opening a DRI render node, creating a GBM\n>>> + * device, and providing access to the device and its associated pixel format.\n>>> + */\n>>> +\n>>> +/**\n>>> + *\\var GBM::fd_\n>>> + *\\brief file descriptor to DRI device\n>>> + */\n>>> +\n>>> +/**\n>>> + *\\var GBM::gbmDevice_\n>>> + *\\brief Pointer to GBM device structure derived from fd_\n>>> + */\n>>> +\n>>> +/**\n>>> + *\\var GBM::format_\n>>> + *\\brief Pixel format the GBM surface was created in\n>>> + */\n>>> +\n>>> +/**\n>>> + *\\brief GBM constructor.\n>>> + *\n>>> + * Creates a GBM instance with unitialised state.\n>>> + */\n>>> +GBM::GBM()\n>>> +{\n>>> +    fd_ = 0;\n>>> +    gbmDevice_ = nullptr;\n>>> +}\n>>> +\n>>> +/**\n>>> + *\\brief GBM destructor\n>>> + *\n>>> + * Cleans up the GBM device if it was successfully created, and closes\n>>> + * the associated file descriptor.\n>>> + */\n>>> +GBM::~GBM()\n>>> +{\n>>> +    if (gbmDevice_)\n>>> +        gbm_device_destroy(gbmDevice_);\n>>> +}\n>>> +\n>>> +/**\n>>> + * \\brief Create and initialize a GBM device\n>>> + *\n>>> + * \\todo Get dri device name from envOption setting\n>>> + *\n>>> + * Opens the DRI render node (/dev/dri/renderD128) and creates a GBM\n>>> + * device using the libgbm library. Sets the default pixel format to\n>>> + * ARGB8888.\n>>> + *\n>>> + * \\return 0 on success, or a negative error code on failure\n>>> + */\n>>> +int GBM::createDevice()\n>>> +{\n>>> +    const char *dri_node = \"/dev/dri/renderD128\";\n>>> +\n>>> +    fd_ = open(dri_node, O_RDWR | O_CLOEXEC);\n>>> +    if (fd_ < 0) {\n>>> +        LOG(GBM, Error) << \"Open \" << dri_node << \" fail \" << fd_;\n>>> +        return fd_;\n>>> +    }\n>>> +\n>>> +    gbmDevice_ = gbm_create_device(fd_);\n>>> +    if (!gbmDevice_) {\n>>> +        LOG(GBM, Error) << \"gbm_create_device fail\";\n>>> +        close(fd_);\n>>> +        return -errno;\n>>> +    }\n>>> +\n>>> +    format_ = libcamera::formats::ARGB8888;\n>>> +\n>>> +    return 0;\n>>> +}\n>>> +\n>>> +/**\n>>> + * \\brief Retrieve the GBM device handle\n>>> + *\n>>> + * \\return Pointer to the gbm_device structure, or nullptr if the device\n>>> + * has not been created\n>>> + */\n>>> +struct gbm_device * GBM::getDevice()\n>>> +{\n>>> +    return gbmDevice_;\n>>> +}\n>>> +\n>>> +/**\n>>> + * \\brief Retrieve the pixel format\n>>> + *\n>>> + * \\return The PixelFormat used by this GBM instance (ARGB8888)\n>>> + */\n>>> +\n>>> +PixelFormat GBM::getPixelFormat()\n>>> +{\n>>> +    return format_;\n>>> +}\n>>> +} /* namespace libcamera */\n>>> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n>>> index 90d434a5a..685213c78 100644\n>>> --- a/src/libcamera/meson.build\n>>> +++ b/src/libcamera/meson.build\n>>> @@ -70,6 +70,15 @@ libcamera_deps = []\n>>>   libatomic = cc.find_library('atomic', required : false)\n>>>   libthreads = dependency('threads')\n>>>   +libgbm = cc.find_library('gbm', required: false)\n>>> +gbm_works = cc.check_header('gbm.h', required: false)\n>>> +\n>>> +if libgbm.found() and gbm_works\n>>> +    libcamera_internal_sources += files([\n>>> +        'gbm.cpp',\n>>> +    ])\n>>> +endif\n>>> +\n>>>   subdir('base')\n>>>   subdir('converter')\n>>>   subdir('ipa')\n>>> @@ -178,6 +187,7 @@ libcamera_deps += [\n>>>       libcamera_base_private,\n>>>       libcrypto,\n>>>       libdl,\n>>> +    libgbm,\n>>>       liblttng,\n>>>       libudev,\n>>>       libyaml,","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 4EDF4C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Dec 2025 19:37:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 874686186C;\n\tFri, 12 Dec 2025 20:37:38 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6806F6142F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Dec 2025 20:37:36 +0100 (CET)","from mail-wm1-f70.google.com (mail-wm1-f70.google.com\n\t[209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-171-RtN4g7dEOxuFKqxjYRkevg-1; Fri, 12 Dec 2025 14:37:33 -0500","by mail-wm1-f70.google.com with SMTP id\n\t5b1f17b1804b1-477c49f273fso12211865e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Dec 2025 11:37:33 -0800 (PST)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-47a8f8e90f2sm45950805e9.13.2025.12.12.11.37.30\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 12 Dec 2025 11:37:30 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"FrZXwxL4\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1765568255;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=2T1apK6MTK+JKZbaZ8stXOPr/idml/JJh4+8Mkeegrg=;\n\tb=FrZXwxL4CaEtvnHes0deQTrJB5cPE3xoDL7co7ncrmOPAOn8fxK6f3Hmw57d2NgaP2goe4\n\tcSYKz/vj5TdWtq6YJ5SC8R74gDY81DMGzddcSdxsxIkjjJc1Y8egT/fYW8KVdm93LwwsE+\n\tsx7cf0kjmPq7izwM3TJN5fDybLYVKeI=","X-MC-Unique":"RtN4g7dEOxuFKqxjYRkevg-1","X-Mimecast-MFC-AGG-ID":"RtN4g7dEOxuFKqxjYRkevg_1765568253","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765568252; x=1766173052;\n\th=content-transfer-encoding:mime-version:user-agent:message-id:date\n\t:references:in-reply-to:subject:cc:to:from:x-gm-gg\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=3RSMBf62dm9TbeIBU4UcM3gcu8JjslRanmX0q40PEvE=;\n\tb=koiF/ZnJuyDRV/XpNXBaV77zWlVQ/rHeZ839OJ0fu0qrl3KEB1ep1lcYXaVml+B2KK\n\tcEN6R168L0gepF80jWMwNLLawUkokWVowlqin5H366Egm4JLWjKyReEqFNleqgnlNurK\n\tjaL2cSV3fNw0B5N2ke7Hahnicex3dU3ZAZu3l+so4OdSEvK7YuijN8y7oqL7methjFNf\n\thQ/YzevDmQ1CzTMNISJ4F54TqJjabtUpfKU/WrXEClMLW/o359GmZg8RvFFiFv2eWLVf\n\tvs+lbZgWlPPwPk7KO6hflzPte29EEdTPivM5wxPDHydp7g8J5HjYWf9KX2DjR2o5IKXS\n\t7ecg==","X-Gm-Message-State":"AOJu0YzyzMpDZ6LFcdNPM3nx5eUgwWtrnZgv3jT+UWo52yLDF2MeVHW0\n\tx4U21nU/uRt0tMSQmT0PRr9V084oHu5XnCdzrvyPcZl4xSA0+3eVl9ALXbFquZ2Bl174zofgnv4\n\tlQKWZLxIMO2swJRbbE95+VnXbP1OxEnIsPchttid9qVANFOUYf9z1G8dTaVYJzLyUIY9rVG5qY6\n\tJxTV7C1U+9e55sqM1F4SiyVigGHIGdercWtPFJtYiSCjz8QXLJP9fRfxKaGlA=","X-Gm-Gg":"AY/fxX4fGu9oRCEbLPctY4BilGwA/Ia5AjFb79jqgpJElRKzzuLlfCj8TRrVL/jyL9y\n\t0AI7f0ipxZg8HvLYpQz8KSGEwXD+RDKTFhGbTQyjXkrghRdZArMmeHNUrGew/lLhSHcmralCtT6\n\tea4wGwFAzJjfv3e5z67t8MxnEt+66n8Ev2sEW8Fwx0YR4S2uyuZdqFNG8kVOuoFMludNVd2eelR\n\tLb67KjelltvMfYjdjWM+D+IMK4ozD/BQFU75NAcl2kvJOVlKeT4T43UYblBKrwHAZ5e5kNUMu+V\n\t2vSYxVv9EeRMm+BodsEoEFLtE6VcKzaSI9HLCzMv7By7Auw/3d/u3ccFwBw/62eM1gTBRO3pF7m\n\trq8fdwakyVvdWAUWOJ+97YBIl/nvI05XCnw/8sVJMbWlYfkOAZtm68wCVbl5SAQA=","X-Received":["by 2002:a05:600c:45c9:b0:479:3a87:2eeb with SMTP id\n\t5b1f17b1804b1-47a8f91515amr27593435e9.37.1765568252361; \n\tFri, 12 Dec 2025 11:37:32 -0800 (PST)","by 2002:a05:600c:45c9:b0:479:3a87:2eeb with SMTP id\n\t5b1f17b1804b1-47a8f91515amr27593225e9.37.1765568251749; \n\tFri, 12 Dec 2025 11:37:31 -0800 (PST)"],"X-Google-Smtp-Source":"AGHT+IEKPvNJZQTNkZDsToC26L9LWG72diA8Bi2gjJIsutbqxAu34SuGUFQqhl/UaN2mAEW7z7fKig==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Robert Mader <robert.mader@collabora.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v8 01/26] libcamera: software_isp: gbm: Add a GBM helper\n\tclass for GPU surface access","In-Reply-To":"<a751cf4b-f649-4b8a-8dfb-c4b61caf2a1e@collabora.com> (Robert\n\tMader's message of \"Fri, 12 Dec 2025 15:21:35 +0100\")","References":"<20251212002937.3118-1-bryan.odonoghue@linaro.org>\n\t<20251212002937.3118-2-bryan.odonoghue@linaro.org>\n\t<dbdc25f5-cc16-49ba-bfb4-17410c9ce8e2@collabora.com>\n\t<a751cf4b-f649-4b8a-8dfb-c4b61caf2a1e@collabora.com>","Date":"Fri, 12 Dec 2025 20:37:29 +0100","Message-ID":"<85sedfqyo6.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"kujek79UhKum0C9JF7zMFalv8x5hEUMxYQYXSbwOLnQ_1765568253","X-Mimecast-Originator":"redhat.com","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>"}},{"id":37344,"web_url":"https://patchwork.libcamera.org/comment/37344/","msgid":"<85o6o3qyid.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2025-12-12T19:40:58","subject":"Re: [PATCH v8 01/26] libcamera: software_isp: gbm: Add a GBM helper\n\tclass for GPU surface access","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Bryan O'Donoghue <bryan.odonoghue@linaro.org> writes:\n\n> A helper class to interact with GBM. This will allow us to specify the\n> internal storage format of the GPU when making a texture for the Debayer\n> vertex/fragment shaders and thus ensure we receive an uncompressed and\n> untiled output buffer.\n>\n> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n\nRobert has some interesting points but if we decide to keep the current\nversion for now:\n\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\n\n> ---\n>  include/libcamera/internal/gbm.h       |  39 ++++++++\n>  include/libcamera/internal/meson.build |   1 +\n>  src/libcamera/gbm.cpp                  | 130 +++++++++++++++++++++++++\n>  src/libcamera/meson.build              |  10 ++\n>  4 files changed, 180 insertions(+)\n>  create mode 100644 include/libcamera/internal/gbm.h\n>  create mode 100644 src/libcamera/gbm.cpp\n>\n> diff --git a/include/libcamera/internal/gbm.h b/include/libcamera/internal/gbm.h\n> new file mode 100644\n> index 000000000..09811d1ef\n> --- /dev/null\n> +++ b/include/libcamera/internal/gbm.h\n> @@ -0,0 +1,39 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright (C) 2024, Linaro Ltd.\n> + *\n> + * Authors:\n> + * Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n> + *\n> + * Helper class for managing GBM interactions\n> + */\n> +\n> +#pragma once\n> +\n> +#include <gbm.h>\n> +\n> +#include <libcamera/base/log.h>\n> +\n> +#include <libcamera/formats.h>\n> +\n> +namespace libcamera {\n> +\n> +LOG_DECLARE_CATEGORY(GBM)\n> +\n> +class GBM\n> +{\n> +public:\n> +\tGBM();\n> +\t~GBM();\n> +\n> +\tint createDevice();\n> +\tstruct gbm_device *getDevice();\n> +\tPixelFormat getPixelFormat();\n> +\n> +private:\n> +\tint fd_;\n> +\tstruct gbm_device *gbmDevice_;\n> +\tPixelFormat format_;\n> +};\n> +\n> +} /* namespace libcamera */\n> diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\n> index e9540a2f7..b8324996b 100644\n> --- a/include/libcamera/internal/meson.build\n> +++ b/include/libcamera/internal/meson.build\n> @@ -23,6 +23,7 @@ libcamera_internal_headers = files([\n>      'dma_buf_allocator.h',\n>      'formats.h',\n>      'framebuffer.h',\n> +    'gbm.h',\n>      'global_configuration.h',\n>      'ipa_data_serializer.h',\n>      'ipa_manager.h',\n> diff --git a/src/libcamera/gbm.cpp b/src/libcamera/gbm.cpp\n> new file mode 100644\n> index 000000000..a2e4c7076\n> --- /dev/null\n> +++ b/src/libcamera/gbm.cpp\n> @@ -0,0 +1,130 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright (C) 2024, Linaro Ltd.\n> + *\n> + * Authors:\n> + * Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n> + *\n> + * Helper class for managing GBM interactions\n> + */\n> +\n> +#include \"libcamera/internal/gbm.h\"\n> +\n> +#include <errno.h>\n> +#include <fcntl.h>\n> +#include <sys/ioctl.h>\n> +#include <sys/mman.h>\n> +#include <unistd.h>\n> +\n> +#include <linux/dma-buf.h>\n> +#include <linux/dma-heap.h>\n> +\n> +namespace libcamera {\n> +\n> +LOG_DEFINE_CATEGORY(GBM)\n> +\n> +/**\n> + * \\class GBM\n> + * \\brief Helper class for managing GBM interactions\n> + *\n> + * The GBM class provides a simplified interface for creating and managing\n> + * GBM devices. It handles the initialization and teardown of GBM devices\n> + * used for buffer allocation in graphics and camera pipelines.\n> + *\n> + * This class is responsible for opening a DRI render node, creating a GBM\n> + * device, and providing access to the device and its associated pixel format.\n> + */\n> +\n> +/**\n> + *\\var GBM::fd_\n> + *\\brief file descriptor to DRI device\n> + */\n> +\n> +/**\n> + *\\var GBM::gbmDevice_\n> + *\\brief Pointer to GBM device structure derived from fd_\n> + */\n> +\n> +/**\n> + *\\var GBM::format_\n> + *\\brief Pixel format the GBM surface was created in\n> + */\n> +\n> +/**\n> + *\\brief GBM constructor.\n> + *\n> + * Creates a GBM instance with unitialised state.\n> + */\n> +GBM::GBM()\n> +{\n> +\tfd_ = 0;\n> +\tgbmDevice_ = nullptr;\n> +}\n> +\n> +/**\n> + *\\brief GBM destructor\n> + *\n> + * Cleans up the GBM device if it was successfully created, and closes\n> + * the associated file descriptor.\n> + */\n> +GBM::~GBM()\n> +{\n> +\tif (gbmDevice_)\n> +\t\tgbm_device_destroy(gbmDevice_);\n> +}\n> +\n> +/**\n> + * \\brief Create and initialize a GBM device\n> + *\n> + * \\todo Get dri device name from envOption setting\n> + *\n> + * Opens the DRI render node (/dev/dri/renderD128) and creates a GBM\n> + * device using the libgbm library. Sets the default pixel format to\n> + * ARGB8888.\n> + *\n> + * \\return 0 on success, or a negative error code on failure\n> + */\n> +int GBM::createDevice()\n> +{\n> +\tconst char *dri_node = \"/dev/dri/renderD128\";\n> +\n> +\tfd_ = open(dri_node, O_RDWR | O_CLOEXEC);\n> +\tif (fd_ < 0) {\n> +\t\tLOG(GBM, Error) << \"Open \" << dri_node << \" fail \" << fd_;\n> +\t\treturn fd_;\n> +\t}\n> +\n> +\tgbmDevice_ = gbm_create_device(fd_);\n> +\tif (!gbmDevice_) {\n> +\t\tLOG(GBM, Error) << \"gbm_create_device fail\";\n> +\t\tclose(fd_);\n> +\t\treturn -errno;\n> +\t}\n> +\n> +\tformat_ = libcamera::formats::ARGB8888;\n> +\n> +\treturn 0;\n> +}\n> +\n> +/**\n> + * \\brief Retrieve the GBM device handle\n> + *\n> + * \\return Pointer to the gbm_device structure, or nullptr if the device\n> + * has not been created\n> + */\n> +struct gbm_device * GBM::getDevice()\n> +{\n> +\treturn gbmDevice_;\n> +}\n> +\n> +/**\n> + * \\brief Retrieve the pixel format\n> + *\n> + * \\return The PixelFormat used by this GBM instance (ARGB8888)\n> + */\n> +\n> +PixelFormat GBM::getPixelFormat()\n> +{\n> +\treturn format_;\n> +}\n> +} /* namespace libcamera */\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index 90d434a5a..685213c78 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -70,6 +70,15 @@ libcamera_deps = []\n>  libatomic = cc.find_library('atomic', required : false)\n>  libthreads = dependency('threads')\n>  \n> +libgbm = cc.find_library('gbm', required: false)\n> +gbm_works = cc.check_header('gbm.h', required: false)\n> +\n> +if libgbm.found() and gbm_works\n> +    libcamera_internal_sources += files([\n> +        'gbm.cpp',\n> +    ])\n> +endif\n> +\n>  subdir('base')\n>  subdir('converter')\n>  subdir('ipa')\n> @@ -178,6 +187,7 @@ libcamera_deps += [\n>      libcamera_base_private,\n>      libcrypto,\n>      libdl,\n> +    libgbm,\n>      liblttng,\n>      libudev,\n>      libyaml,","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 339F1BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Dec 2025 19:41:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4971561893;\n\tFri, 12 Dec 2025 20:41:06 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 129896142F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Dec 2025 20:41:04 +0100 (CET)","from mail-wr1-f69.google.com (mail-wr1-f69.google.com\n\t[209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-554-GlcSwminOTaGKFNOBfY56g-1; Fri, 12 Dec 2025 14:41:01 -0500","by mail-wr1-f69.google.com with SMTP id\n\tffacd0b85a97d-42b3c965ce5so1102768f8f.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Dec 2025 11:41:01 -0800 (PST)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-42fb7118267sm4682449f8f.27.2025.12.12.11.40.58\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 12 Dec 2025 11:40:58 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"SUNE5LeI\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1765568463;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=quDdJuf1PgzKjVh7DNv74xbXlshlePy2XyRpdVJnX3c=;\n\tb=SUNE5LeInGXM+nbiE04UAh2c3NSKVgT2IMnsjQUQ2WvgfNmwbaEFDr5IoPL2PFOe9zssqL\n\tDe5kY6S+3wxtTFZD7btKyeDlpj1NKZW6odlK8hH+74T49jtfzv/GrjBcQKUbJR+VeK4JJ5\n\t6r1OBQfSRFwHIZ7hwV7w3ebbiqhuJ1c=","X-MC-Unique":"GlcSwminOTaGKFNOBfY56g-1","X-Mimecast-MFC-AGG-ID":"GlcSwminOTaGKFNOBfY56g_1765568460","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765568460; x=1766173260;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject\n\t:date:message-id:reply-to;\n\tbh=quDdJuf1PgzKjVh7DNv74xbXlshlePy2XyRpdVJnX3c=;\n\tb=Ucn5s7grFIZg4BifPanKqYLzh5l+jG3i5A1vDxHIuiO0Iep17Zw08LclfCNKzCUJtg\n\t4FpjJlnq8VPTRFPW2b/i0FDACCQAFYmDi8xKBGZQaTdhqv6+IE/8RDMc1wX/82+U9wxk\n\tvztgozRFF5x6343NY1Ekywog++BdMB/IjFAXUFfFBf6qiG2LrQqt8Cn5+Gg+iHpyeMwq\n\tpQsuk3b8PzrO+EEFz7SCUuzBZdhh7X7ThY0/f3a7Qs6sVuyckAroUg+KgUitBQXpMGTa\n\tXVD00+Plzsg/XQVyFhF5yXJpf+wBrVwPH9l+ajOLSX1gUm99J0zaEfHiJv7/Jt+NQ+2j\n\ty9/Q==","X-Gm-Message-State":"AOJu0Yw3G10Gr6Mej6mzrE3jmJGfSczr9EuYNx55WTIxSPf/WLOy5bht\n\teuS7iuRXiViyMtsPNbH37o967DCt5yByJrAd4UTlWFxPumo5MdyCHN7SO9urZE0nx1wEqzAqQDr\n\toewvXSUfTJa+8rR8Y/mj6pA8yEPBJvlksZFdMe0m4a4ot5tSC5dcDFvIvqFBoVgFSqiodzYFXpV\n\tE=","X-Gm-Gg":"AY/fxX6E3EKw7gJ7Qewc16Le7VNyyhdOQpK7aYz9n0YtQsrRYHAPeTG1eSh8qqtHuQ8\n\t5486twZYAm90rkM5K1YqAeu9c+VCI+fBi+gu6BpT7f7jV+EkcnRNjl2biRKIKKN+vklxRLt1+Ri\n\tzbjtb532UhDesPHx2P5+gOq9axz11HcEUobfxcJKqdecn8+zRNSFMwd642TxrdczbKLTu02G4c4\n\tuk5Vg/8zHyDyceOvY2H4/zONXJZIF2kPPGodD1UO/tM40uszjfNDscC9Xzr1Y32J61QUgF9QIgx\n\t0vBulI33N0e1sOQlfRWGl3M4+vJX1IkzpMg01g9NUOzp6rcZFhV9wuRw/L8myucP8oq72+j/Kn7\n\tSHZNd4z+2Ov+1bVR2B99H2AjRephsW7jfjYmPazpWCFgWCb3RaEgDsnHgSMa/Dog=","X-Received":["by 2002:a5d:64e8:0:b0:429:cda2:9ffd with SMTP id\n\tffacd0b85a97d-42fb44a3c38mr2895709f8f.9.1765568460042; \n\tFri, 12 Dec 2025 11:41:00 -0800 (PST)","by 2002:a5d:64e8:0:b0:429:cda2:9ffd with SMTP id\n\tffacd0b85a97d-42fb44a3c38mr2895686f8f.9.1765568459544; \n\tFri, 12 Dec 2025 11:40:59 -0800 (PST)"],"X-Google-Smtp-Source":"AGHT+IGB0Y6otrRx4BvkTNIziiAjrRPnC6YCFkV71J7zx+b2fh8uLiRnH4yk6AfFAp/D+8y7S2/DZw==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Cc":"libcamera-devel@lists.libcamera.org,  pavel@ucw.cz,  Kieran Bingham\n\t<kieran.bingham@ideasonboard.com>","Subject":"Re: [PATCH v8 01/26] libcamera: software_isp: gbm: Add a GBM helper\n\tclass for GPU surface access","In-Reply-To":"<20251212002937.3118-2-bryan.odonoghue@linaro.org> (Bryan\n\tO'Donoghue's message of \"Fri, 12 Dec 2025 00:29:12 +0000\")","References":"<20251212002937.3118-1-bryan.odonoghue@linaro.org>\n\t<20251212002937.3118-2-bryan.odonoghue@linaro.org>","Date":"Fri, 12 Dec 2025 20:40:58 +0100","Message-ID":"<85o6o3qyid.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"faqH5xjKRRBTiswH81ons29hKAZ-XUqDDtpdEHu80j0_1765568460","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","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":37345,"web_url":"https://patchwork.libcamera.org/comment/37345/","msgid":"<127d6228-a9f5-485b-9f63-a28f23c1e1c2@collabora.com>","date":"2025-12-12T19:44:21","subject":"Re: [PATCH v8 01/26] libcamera: software_isp: gbm: Add a GBM helper\n\tclass for GPU surface access","submitter":{"id":140,"url":"https://patchwork.libcamera.org/api/people/140/","name":"Robert Mader","email":"robert.mader@collabora.com"},"content":"On 12.12.25 20:37, Milan Zamazal wrote:\n> Robert Mader <robert.mader@collabora.com> writes:\n>\n>> FTR., I gave this a quick try and it seems to work just fine on my test\n>> devices. Pushed a commit here:\n>> https://gitlab.freedesktop.org/rmader/libcamera/-/commits/v0.6.0-gpuisp-v8-fixes\n> It fails in my environment with:\n>\n>    ERROR eGL egl.cpp:309 eglInitialize fail\n\nWhat's the scenario here? Any chance that's because you start e.g. qcam \nvia ssh, i.e. qt wants to initializes EGL with the Wayland or X11 \nplatform and the gpu-isp without? Because that'd be a somewhat special \ncase (single-process app with multiple different EGL contexts) that'd \nneed to get worked out.\n\nIt *should* work if you start the app directly on the device (via some \nlauncher or terminal) or by forcing a display, e.g. \n`WAYLAND_DISPLAY=wayland-0 qcam`","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 EE8A3BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Dec 2025 19:44:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 434C761893;\n\tFri, 12 Dec 2025 20:44:31 +0100 (CET)","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 2FC4C6142F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Dec 2025 20:44:29 +0100 (CET)","by mx.zohomail.com with SMTPS id 1765568663664458.4311689538081;\n\tFri, 12 Dec 2025 11:44:23 -0800 (PST)"],"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=\"QVCIyVMt\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1765568665; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=hFhd7SyvlXbNHQNG2LcRrPVj3JCtcG1D6qWMiHLf7MJEuP7IEw/XDf4wcicSTPZWSJ0bV3pil3NRGmAQ6eoqT6pvYY7kefpyfyfZWdyPo1lcJdbJw0w+cutjT3K39xxw21eQ6A5DGODFhxjHb7iUZNGi5uB0aPIZXRLJOEGuCsI=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1765568665;\n\th=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To;\n\tbh=51K3dNdvJN8QED8ceJ3MZGgopME5mHnESCsgTB4WnHU=; \n\tb=EkKaVP+xO1UqDy1VCwHOATFL7MtNPeXUiV+npHiLZinX5hVVLHMBMvJvnDp/gSokGIj36Q8LcmNnGTz5xtwgrJFYBTgMxIjKi7cUMXk4fodtElSOlD+0JDdVkSUiOp88P6DNzYR2jl2nzQGBf/iYGRJMyKJoMGabC3gwJ0rOP2g=","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=1765568665;\n\ts=zohomail; d=collabora.com; i=robert.mader@collabora.com;\n\th=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:Cc:Cc:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To;\n\tbh=51K3dNdvJN8QED8ceJ3MZGgopME5mHnESCsgTB4WnHU=;\n\tb=QVCIyVMtV8SMmDSgrnWLc5ww8BHFNlb+mSABLJNwZpVVPXNIYldtxxnbPMOkoH5y\n\tJ7lI7Zymh4mSEUmRzHDo4PZQRIrLUyBNGzX0vsia4gpkasl0iUUgyeqGihdctglw/6k\n\t2UGw5L4Mp5O1Cz9WoQ1PxCl/j8WTWHzirS2DaDV8=","Message-ID":"<127d6228-a9f5-485b-9f63-a28f23c1e1c2@collabora.com>","Date":"Fri, 12 Dec 2025 20:44:21 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v8 01/26] libcamera: software_isp: gbm: Add a GBM helper\n\tclass for GPU surface access","To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20251212002937.3118-1-bryan.odonoghue@linaro.org>\n\t<20251212002937.3118-2-bryan.odonoghue@linaro.org>\n\t<dbdc25f5-cc16-49ba-bfb4-17410c9ce8e2@collabora.com>\n\t<a751cf4b-f649-4b8a-8dfb-c4b61caf2a1e@collabora.com>\n\t<85sedfqyo6.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","Content-Language":"en-US, de-DE","From":"Robert Mader <robert.mader@collabora.com>","In-Reply-To":"<85sedfqyo6.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","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":37346,"web_url":"https://patchwork.libcamera.org/comment/37346/","msgid":"<85jyyrqxs1.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2025-12-12T19:56:46","subject":"Re: [PATCH v8 01/26] libcamera: software_isp: gbm: Add a GBM helper\n\tclass for GPU surface access","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Robert Mader <robert.mader@collabora.com> writes:\n\n> On 12.12.25 20:37, Milan Zamazal wrote:\n>> Robert Mader <robert.mader@collabora.com> writes:\n>>\n>>> FTR., I gave this a quick try and it seems to work just fine on my test\n>>> devices. Pushed a commit here:\n>>> https://gitlab.freedesktop.org/rmader/libcamera/-/commits/v0.6.0-gpuisp-v8-fixes\n>> It fails in my environment with:\n>>\n>>    ERROR eGL egl.cpp:309 eglInitialize fail\n>\n> What's the scenario here? Any chance that's because you start e.g. qcam via ssh, i.e. qt wants to\n> initializes EGL with the Wayland or X11 platform and the gpu-isp without? Because that'd be a somewhat\n> special case (single-process app with multiple different EGL contexts) that'd need to get worked out.\n>\n> It *should* work if you start the app directly on the device (via some launcher or terminal) or by forcing\n> a display, e.g. `WAYLAND_DISPLAY=wayland-0 qcam`\n\nThis is with KMS, I connect via ssh and run\n\n  cam -c1 -C -D\n\nin the terminal.  No graphical environment is running on the board.","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 7B318C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Dec 2025 19:56:54 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9848F61893;\n\tFri, 12 Dec 2025 20:56:53 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 56E3F6142F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Dec 2025 20:56:52 +0100 (CET)","from mail-wm1-f69.google.com (mail-wm1-f69.google.com\n\t[209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-370-rLY8PXk_N_is98bziUfTkQ-1; Fri, 12 Dec 2025 14:56:49 -0500","by mail-wm1-f69.google.com with SMTP id\n\t5b1f17b1804b1-477cf25ceccso17994455e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Dec 2025 11:56:49 -0800 (PST)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-47a8f70509bsm18160325e9.6.2025.12.12.11.56.47\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 12 Dec 2025 11:56:47 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"Fe6mzpqt\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1765569411;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=FopNHvEp27elzzOoE3lsQQ/WTICkvz06aILm+F2V054=;\n\tb=Fe6mzpqtoSNHlMLaIOG7htmeuJ3IczxMzD+hWmXhlhCuMETw0r/dJ7Kn4k7tONP3lN0dpl\n\tIsiPsyR10l795z+mCSyjNYCHaeorEPegcOkXbeiy8YaZL0MNtwlt8TfkNCxt+byzXM9q1R\n\tc7vHvj7tz3gxXAzTjwMGW7z5kE7LVFk=","X-MC-Unique":"rLY8PXk_N_is98bziUfTkQ-1","X-Mimecast-MFC-AGG-ID":"rLY8PXk_N_is98bziUfTkQ_1765569409","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765569408; x=1766174208;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject\n\t:date:message-id:reply-to;\n\tbh=FopNHvEp27elzzOoE3lsQQ/WTICkvz06aILm+F2V054=;\n\tb=Sz/Th77DNLwBQHgVGnaBxL6Bb6Y5RyOgZFxaKLIAH2V494J85OY1W5ujW3xot8CNtj\n\tIf+ZG4raext0pkszwhDFIrkiqxyBbT3gSj7L/8EJBxQIE0vBUm4uRY2elLr3SasJ4fFa\n\tVJUcIrsIQ+VjmsrxqamVvLeduA1XVreyAx9oxgyV8QDeWk5xUOlPwDgMxBpnSwuCAYk1\n\t2OTNycJ45bllf/ZHPt9vyvIZXDNmH/9ii/rCI99PKGoA1V5Ox4kqWLtTFGeInZUw1oU2\n\tsTHd4xkhshZkpvmQhoCqKVFRClz93AJo/oy15Ula0G1YpsSFQLgOeAQayO+zjbI7M4nF\n\th5Sg==","X-Gm-Message-State":"AOJu0YyrIpSMOBhRa7Qvj0D8IiS5Jge+D4gO7oEcvwEzs82SxQvzp78b\n\tpqd4a9rPJY2sXXfAqXd0ifEZTjXcqiI9qbPXmOcehTgndx+BIWZEXQuAtWSFFNZ8ZlT2IaILh+F\n\tbGE2NDYBj0snOBMIYczqDjRnTaIh/lKdWuYoMmo4212jWbIfZKA60rFxNW4iaxyD7nXhQAmU97X\n\tHfW9mioG/HwyRrCw5ihFN59jE2BpFl14pbOK5WvyOpIsAiRTeHJcHUplwDlk8=","X-Gm-Gg":"AY/fxX4iVjoNl97XsLadkP8rSzZSysQtFWHyQybo2FPY0/93Tblr9PWS73bIPJNNLhU\n\tOkSbfDmRSRRZwkz1uguF8tYUHObrX2Syi0jsVri/M4sZOkbSY6nN3WUhtzkAoTep0dyPYR3Z5mi\n\tGICwWzewH73Qsah9alBRUhUExlFyMO44UMIv3JXj+uLWIZsGkZmnB2TQX1vOTEaUl/jdz8QqXh7\n\ttCa48SG9oRWHNhiPuhnxHNuPmViw9HLD3neALAjQD7L+YvXXwF2sjLdUaiueNhqpnBV479kFiXu\n\teNpXtrGRZ2iYh45TbutplA1VlR7f4TvPGabNugKa4zDDUARuv0/+iyaPR7aBPT8gBuoVLMws5CT\n\tqqcjxnVofkl3r3XrYcZDO/u5gfEbjlNs+ruEAE4q2pFdEjxtuCOXx4Q6b1MqmtIY=","X-Received":["by 2002:a05:600c:3e8d:b0:475:e067:f23d with SMTP id\n\t5b1f17b1804b1-47a8f90e531mr32155905e9.25.1765569408304; \n\tFri, 12 Dec 2025 11:56:48 -0800 (PST)","by 2002:a05:600c:3e8d:b0:475:e067:f23d with SMTP id\n\t5b1f17b1804b1-47a8f90e531mr32155695e9.25.1765569407755; \n\tFri, 12 Dec 2025 11:56:47 -0800 (PST)"],"X-Google-Smtp-Source":"AGHT+IErUZpgpFBNaA99lCg2YkvV326hdvnqOsJtdS/dG+ZvzFz/IijEsDLIl7M9I9WpeEocuXiIhw==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Robert Mader <robert.mader@collabora.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v8 01/26] libcamera: software_isp: gbm: Add a GBM helper\n\tclass for GPU surface access","In-Reply-To":"<127d6228-a9f5-485b-9f63-a28f23c1e1c2@collabora.com> (Robert\n\tMader's message of \"Fri, 12 Dec 2025 20:44:21 +0100\")","References":"<20251212002937.3118-1-bryan.odonoghue@linaro.org>\n\t<20251212002937.3118-2-bryan.odonoghue@linaro.org>\n\t<dbdc25f5-cc16-49ba-bfb4-17410c9ce8e2@collabora.com>\n\t<a751cf4b-f649-4b8a-8dfb-c4b61caf2a1e@collabora.com>\n\t<85sedfqyo6.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<127d6228-a9f5-485b-9f63-a28f23c1e1c2@collabora.com>","Date":"Fri, 12 Dec 2025 20:56:46 +0100","Message-ID":"<85jyyrqxs1.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"uvBEwsbWtSfck0dxtlX0M6h0NgXa1tGPUXQJJfuPcIw_1765569409","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","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":37354,"web_url":"https://patchwork.libcamera.org/comment/37354/","msgid":"<6e54d722-159b-4043-951a-155de0ab8941@collabora.com>","date":"2025-12-12T23:13:40","subject":"Re: [PATCH v8 01/26] libcamera: software_isp: gbm: Add a GBM helper\n\tclass for GPU surface access","submitter":{"id":140,"url":"https://patchwork.libcamera.org/api/people/140/","name":"Robert Mader","email":"robert.mader@collabora.com"},"content":"On 12.12.25 20:56, Milan Zamazal wrote:\n> Robert Mader<robert.mader@collabora.com> writes:\n>\n>> On 12.12.25 20:37, Milan Zamazal wrote:\n>>> Robert Mader<robert.mader@collabora.com> writes:\n>>>\n>>>> FTR., I gave this a quick try and it seems to work just fine on my test\n>>>> devices. Pushed a commit here:\n>>>> https://gitlab.freedesktop.org/rmader/libcamera/-/commits/v0.6.0-gpuisp-v8-fixes\n>>> It fails in my environment with:\n>>>\n>>>     ERROR eGL egl.cpp:309 eglInitialize fail\n>> What's the scenario here? Any chance that's because you start e.g. qcam via ssh, i.e. qt wants to\n>> initializes EGL with the Wayland or X11 platform and the gpu-isp without? Because that'd be a somewhat\n>> special case (single-process app with multiple different EGL contexts) that'd need to get worked out.\n>>\n>> It *should* work if you start the app directly on the device (via some launcher or terminal) or by forcing\n>> a display, e.g. `WAYLAND_DISPLAY=wayland-0 qcam`\n> This is with KMS, I connect via ssh and run\n>\n>    cam -c1 -C -D\n>\n> in the terminal.  No graphical environment is running on the board.\n\nI see, thanks. I pushed an additional commit that fixes the ssh case for \nme - could you give that a try?","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 BCB77BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Dec 2025 23:13:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CC29561919;\n\tSat, 13 Dec 2025 00:13:49 +0100 (CET)","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 6CF3E609DE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 13 Dec 2025 00:13:48 +0100 (CET)","by mx.zohomail.com with SMTPS id 1765581223596248.21610947697445; \n\tFri, 12 Dec 2025 15:13:43 -0800 (PST)"],"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=\"X5LPVQJM\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1765581224; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=L6h9I/gBSyRY8JdRhu7lkcG7IL8ymXdgt/V1no2sI9vcya2ZOX02aAbasWmhjyCt503IkucKFyVzJnitxTHOxNVtwi0UVpgE9IK2cHt5Lx0HtJb+bN97GxEt64+brfLP0Tgj8Pzwn7ENhEu8d0kAvddjegX/ghk3ptqFv86rfCc=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1765581224;\n\th=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To;\n\tbh=3nJ2KULdci7ksIttZkc6YqQrKfLPZ/8gdNVXjLxbPAw=; \n\tb=fLN2z0FPH7hG6ZE2rV2fZYlV2E1L74mluUuPEj2uvw+urH171+ekxdkZ/bTxwVJcio1vSG8dBjOp1vB12M3t7UBDL9c4e6TqyOKata566ChoDAkaRDqsY6ZWykphwEKg0vtdAv4m6viX8po9V/TKzBeiRZ8wSXDFO60hhYU3shc=","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=1765581224;\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:Cc:Cc:References:From:From:In-Reply-To:Message-Id:Reply-To;\n\tbh=3nJ2KULdci7ksIttZkc6YqQrKfLPZ/8gdNVXjLxbPAw=;\n\tb=X5LPVQJMFgPOWmGyr+Z+6HTY19OXJ22PfDMXhn82TGWeL1hUkp5gETinFloE7FOL\n\tsMYM4C4BORq35tZTSdD3napkSfUYgNXLLX4UhW/g8lF5FWYDuhFiuGRRkNWN8u05HHp\n\t97dolpUo6NhHziTnwQvkXoYAw7grRYbQovGCFHG8=","Content-Type":"multipart/alternative;\n\tboundary=\"------------gpZ7WoMcf1w3RH4t5XezDqM7\"","Message-ID":"<6e54d722-159b-4043-951a-155de0ab8941@collabora.com>","Date":"Sat, 13 Dec 2025 00:13:40 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v8 01/26] libcamera: software_isp: gbm: Add a GBM helper\n\tclass for GPU surface access","To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20251212002937.3118-1-bryan.odonoghue@linaro.org>\n\t<20251212002937.3118-2-bryan.odonoghue@linaro.org>\n\t<dbdc25f5-cc16-49ba-bfb4-17410c9ce8e2@collabora.com>\n\t<a751cf4b-f649-4b8a-8dfb-c4b61caf2a1e@collabora.com>\n\t<85sedfqyo6.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<127d6228-a9f5-485b-9f63-a28f23c1e1c2@collabora.com>\n\t<85jyyrqxs1.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","Content-Language":"en-US, de-DE","From":"Robert Mader <robert.mader@collabora.com>","In-Reply-To":"<85jyyrqxs1.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","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":37383,"web_url":"https://patchwork.libcamera.org/comment/37383/","msgid":"<85a4zjg9eo.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2025-12-15T13:30:07","subject":"Re: [PATCH v8 01/26] libcamera: software_isp: gbm: Add a GBM helper\n\tclass for GPU surface access","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Robert Mader <robert.mader@collabora.com> writes:\n\n> On 12.12.25 20:56, Milan Zamazal wrote:\n>> Robert Mader<robert.mader@collabora.com> writes:\n>>\n>\n>>> On 12.12.25 20:37, Milan Zamazal wrote:\n>>>> Robert Mader<robert.mader@collabora.com> writes:\n>>>>\n>>>>> FTR., I gave this a quick try and it seems to work just fine on my test\n>>>>> devices. Pushed a commit here:\n>>>>> https://gitlab.freedesktop.org/rmader/libcamera/-/commits/v0.6.0-gpuisp-v8-fixes\n>>>> It fails in my environment with:\n>>>>\n>>>>     ERROR eGL egl.cpp:309 eglInitialize fail\n>>> What's the scenario here? Any chance that's because you start e.g. qcam via ssh, i.e. qt wants to\n>>> initializes EGL with the Wayland or X11 platform and the gpu-isp without? Because that'd be a somewhat\n>>> special case (single-process app with multiple different EGL contexts) that'd need to get worked out.\n>>>\n>>> It *should* work if you start the app directly on the device (via some launcher or terminal) or by\n>>> forcing\n>>> a display, e.g. `WAYLAND_DISPLAY=wayland-0 qcam`\n>> This is with KMS, I connect via ssh and run\n>>\n>>    cam -c1 -C -D\n>>\n>> in the terminal.  No graphical environment is running on the board.\n>\n> I see, thanks. I pushed an additional commit that fixes the ssh case for me - could you give that a try?\n\n0.6.0-gpuisp-v9-fixes works for me, thanks.","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 8B9D4C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 15 Dec 2025 13:30:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D98B061977;\n\tMon, 15 Dec 2025 14:30:16 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B4045615B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 15 Dec 2025 14:30:15 +0100 (CET)","from mail-ej1-f72.google.com (mail-ej1-f72.google.com\n\t[209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-83-b5wP12hUPASZ77IGgALhGA-1; Mon, 15 Dec 2025 08:30:13 -0500","by mail-ej1-f72.google.com with SMTP id\n\ta640c23a62f3a-b73599315adso263832266b.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 15 Dec 2025 05:30:12 -0800 (PST)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\ta640c23a62f3a-b7cfa5718dfsm1387803566b.54.2025.12.15.05.30.08\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 15 Dec 2025 05:30:09 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"fVYHCKdD\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1765805414;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=FSjOgeav3QyQ3jkagbEOA7gnUG7Yd8o6IAhKKH3/QpM=;\n\tb=fVYHCKdDQ5b7bXDiRYbAIURwy95TNySOp/1SAxhTeydtCnpG8QrhHYFrJkM9bTJBZINlp7\n\t2m2LGgI3jn69LXk3pL4/19vXTPlvDL2aSkmaXLA2TgnMjdEZ9rlBvlDA9/lXkhMYyIvzU4\n\tZM8Dg6hxgeGauV/mxhARFtsGt3TvlE0=","X-MC-Unique":"b5wP12hUPASZ77IGgALhGA-1","X-Mimecast-MFC-AGG-ID":"b5wP12hUPASZ77IGgALhGA_1765805412","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765805411; x=1766410211;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject\n\t:date:message-id:reply-to;\n\tbh=FSjOgeav3QyQ3jkagbEOA7gnUG7Yd8o6IAhKKH3/QpM=;\n\tb=mnopFkmSeNdNLLAaj2T1mlGb4Ot38pZbkPWxDEWC+jaX+mBCH5fHdgm0d7Lgqr0IyS\n\tXqUUpNeCsoZHhixmbprButScbd/L5Hd2Ii3UmZI87UnSY4WkEONMtBtzMBR9lfteWhIc\n\tOljpN8xWaOnUcpaFdCfLKBXrlqKIYUpKQrn9AEfPAQ73FWBtGSz4bNvwPC0gp3adZw5L\n\t8RTqAHWatpnjJudJWPLrPgl/A/R0CZW0Djmz2xXIe46jN4+btWO3GFqiaji8K09AX8PZ\n\tD4xC+L2HuSvQ5edCBUmxh/OlxfMTL4AQ0Q8XSouSaEFyBP3acXrYZIuhBpoQGHJhWbgk\n\t/arg==","X-Gm-Message-State":"AOJu0YwJbYwhat9YjOpMncvb7HdGqGn1Hrpn9g/vnNBQ3d62qSW6lA+8\n\tasP1ZKcIpC9gszVJk2HVfhFmemhC+bo9kJr9S0Moc9P/pjTa7L4PuQCZVOKPHniZr2mILv36rqs\n\thnDQRHO3io5K59uAdQviLi5Jm6Uj+SPhbKAUxaYxy9kjxj4ACj0TGqLxGoauDN+njCKvXIt/bky\n\tyYUevE8mFinkkLYHC4j1RNaweEOdiWfMXuiU58rr3ZliACx+HrmPCTAE3unX8=","X-Gm-Gg":"AY/fxX7tq1U4xOnnuFM6lAJm3m9H4xTaozv2X23anANVchQF9ciFEmsMCZXLbyiXAGV\n\tEDIGIwz1e2LqiRZ163fy7YQEg9fKrnpSzhbc401VcqGkdDtf7S/Hm/9F8nx2SPJwnIKG62qTr32\n\tQ3w8KL8ecgTwlU8UaL8rP+oEPQyyMAmbH4r5qsmDRuo59Ttrnycy5JWAwvjeOHAZfYsT7m26/Vj\n\t6L3vd5AWzdzNxpAqn8b/G4UNP2n8ji5nBv2euTuKCH92sZ2fYWFlgcek89QOrzBkh8zpW7Wd0on\n\tuYOtwa5uhGBKZjGKUtvNrgj5FZMCkeODg5N34wzjy7roZQzbH+QULafirDALAy29oSvhGWEeM0h\n\tm3/3vkIbGMsvv6EVrm0fBbcawgjrILsmC9lTiS/zizhzlRzmzwC7BbmexdlbOulM=","X-Received":["by 2002:a17:906:c110:b0:b72:77c7:d8ad with SMTP id\n\ta640c23a62f3a-b7d238cefa7mr1066703566b.35.1765805411365; \n\tMon, 15 Dec 2025 05:30:11 -0800 (PST)","by 2002:a17:906:c110:b0:b72:77c7:d8ad with SMTP id\n\ta640c23a62f3a-b7d238cefa7mr1066698866b.35.1765805410788; \n\tMon, 15 Dec 2025 05:30:10 -0800 (PST)"],"X-Google-Smtp-Source":"AGHT+IHV+NVnnnhQ6947Uud3HYW0xpOTVQ224IJcX7I+o4Z9H2SVg8NZ0DX27fYXzLXVrEiqtT8xoQ==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Robert Mader <robert.mader@collabora.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v8 01/26] libcamera: software_isp: gbm: Add a GBM helper\n\tclass for GPU surface access","In-Reply-To":"<6e54d722-159b-4043-951a-155de0ab8941@collabora.com> (Robert\n\tMader's message of \"Sat, 13 Dec 2025 00:13:40 +0100\")","References":"<20251212002937.3118-1-bryan.odonoghue@linaro.org>\n\t<20251212002937.3118-2-bryan.odonoghue@linaro.org>\n\t<dbdc25f5-cc16-49ba-bfb4-17410c9ce8e2@collabora.com>\n\t<a751cf4b-f649-4b8a-8dfb-c4b61caf2a1e@collabora.com>\n\t<85sedfqyo6.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<127d6228-a9f5-485b-9f63-a28f23c1e1c2@collabora.com>\n\t<85jyyrqxs1.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<6e54d722-159b-4043-951a-155de0ab8941@collabora.com>","Date":"Mon, 15 Dec 2025 14:30:07 +0100","Message-ID":"<85a4zjg9eo.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"COJW9XHVh0gr6L74qdqfZRxIsvPsvZDr9PN8Z94SdCo_1765805412","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","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>"}}]