[{"id":37762,"web_url":"https://patchwork.libcamera.org/comment/37762/","msgid":"<20260120151717.GA143894@killaraus>","date":"2026-01-20T15:17:17","subject":"Re: [PATCH v3 2/2] Revert \"libcamera: software_isp: gbm: Add a GBM\n\thelper class for GPU surface access\"","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Tue, Jan 20, 2026 at 01:23:44PM +0100, Robert Mader wrote:\n> GBM is not used any more - remove the helper class.\n> \n> This results in egl.cpp getting build on some setups where it previously\n> didn't, notably Debian 11 on CI, triggering a build issues. Include a\n> workaround suggested by:\n> Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> \n> This reverts commit c60b1ce8193841c2742b655097bb39ccbcb417c2.\n> \n> Signed-off-by: Robert Mader <robert.mader@collabora.com>\n> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n> Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # sm8250/rb5, x1e/Dell Insprion14p\n> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> ---\n> \n> Changes in v3:\n>  - Added Laurents R-B\n> \n> Changes in v2:\n>  - Added tags\n>  - Added build issue workaround - hope it's ok to keep the R-Bs.\n> ---\n>  include/libcamera/internal/egl.h       |   5 ++\n>  include/libcamera/internal/gbm.h       |  55 -------------\n>  include/libcamera/internal/meson.build |   1 -\n>  src/libcamera/gbm.cpp                  | 107 -------------------------\n>  src/libcamera/meson.build              |  12 +--\n>  5 files changed, 6 insertions(+), 174 deletions(-)\n>  delete mode 100644 include/libcamera/internal/gbm.h\n>  delete mode 100644 src/libcamera/gbm.cpp\n> \n> diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h\n> index 630345ea7..ce386554f 100644\n> --- a/include/libcamera/internal/egl.h\n> +++ b/include/libcamera/internal/egl.h\n> @@ -16,6 +16,11 @@\n>  #include <libcamera/base/span.h>\n>  #include <libcamera/base/utils.h>\n>  \n> +/* Workaround for build issues on Mesa < 23.3, see\n> + * https://github.com/KhronosGroup/EGL-Registry/pull/130\n> + */\n\n/*\n * Workaround for build issues on Mesa < 23.3, see\n * https://github.com/KhronosGroup/EGL-Registry/pull/130\n */\n\nNo need for a v4, this can be fixed when applying.\n\nBuuut... now that I notice this, this would belong to a separate patch,\nit's not part of the revert.\n\n> +#define EGL_NO_X11\n> +\n>  #define EGL_EGLEXT_PROTOTYPES\n>  #include <EGL/egl.h>\n>  #include <EGL/eglext.h>\n> diff --git a/include/libcamera/internal/gbm.h b/include/libcamera/internal/gbm.h\n> deleted file mode 100644\n> index c10be06c1..000000000\n> --- a/include/libcamera/internal/gbm.h\n> +++ /dev/null\n> @@ -1,55 +0,0 @@\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> -#include <libcamera/base/unique_fd.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> -\n> -\t/**\n> -\t * \\brief Retrieve the GBM device handle\n> -\t *\n> -\t * \\return Pointer to the gbm_device structure, or nullptr if the device\n> -\t * has not been created\n> -\t */\n> -\tstruct gbm_device *device() const { return gbmDevice_; }\n> -\n> -\t/**\n> -\t * \\brief Retrieve the pixel format\n> -\t *\n> -\t * \\return The PixelFormat used by this GBM instance (ARGB8888)\n> -\t */\n> -\tPixelFormat format() const { return format_; }\n> -\n> -private:\n> -\tLIBCAMERA_DISABLE_COPY_AND_MOVE(GBM)\n> -\n> -\tUniqueFD fd_;\n> -\tstruct gbm_device *gbmDevice_ = nullptr;\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 dc48619e5..4d2a09bd7 100644\n> --- a/include/libcamera/internal/meson.build\n> +++ b/include/libcamera/internal/meson.build\n> @@ -24,7 +24,6 @@ libcamera_internal_headers = files([\n>      'formats.h',\n>      'framebuffer.h',\n>      'egl.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> deleted file mode 100644\n> index d37808b0c..000000000\n> --- a/src/libcamera/gbm.cpp\n> +++ /dev/null\n> @@ -1,107 +0,0 @@\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 uninitialised state.\n> - */\n> -GBM::GBM()\n> -{\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> -\tint fd = open(dri_node, O_RDWR | O_CLOEXEC | O_NOCTTY);\n> -\tif (fd < 0) {\n> -\t\tLOG(GBM, Error) << \"Open \" << dri_node << \" fail \" << strerror(errno);\n> -\t\treturn -errno;\n> -\t}\n> -\tfd_ = UniqueFD(fd);\n> -\n> -\tgbmDevice_ = gbm_create_device(fd_.get());\n> -\tif (!gbmDevice_) {\n> -\t\tLOG(GBM, Error) << \"gbm_create_device fail\" << strerror(errno);\n> -\t\treturn -errno;\n> -\t}\n> -\n> -\tformat_ = libcamera::formats::ARGB8888;\n> -\n> -\treturn 0;\n> -}\n> -\n> -} /* namespace libcamera */\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index 6f952bd98..d15943586 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -70,15 +70,6 @@ libcamera_deps = []\n>  libatomic = cc.find_library('atomic', required : false)\n>  libthreads = dependency('threads')\n>  \n> -libgbm = dependency('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>  mesa_works = cc.check_header('EGL/egl.h', required: false)\n>  libegl = dependency('egl', required : false)\n>  libglesv2 = dependency('glesv2', required : false)\n> @@ -91,7 +82,7 @@ if libglesv2.found()\n>      config_h.set('HAVE_GLESV2', 1)\n>  endif\n>  \n> -if mesa_works and gbm_works\n> +if mesa_works\n>      libcamera_internal_sources += files([\n>          'egl.cpp',\n>      ])\n> @@ -209,7 +200,6 @@ libcamera_deps += [\n>      libcrypto,\n>      libdl,\n>      libegl,\n> -    libgbm,\n>      libglesv2,\n>      liblttng,\n>      libudev,","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 C2094BDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 20 Jan 2026 15:17:21 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D05F661A35;\n\tTue, 20 Jan 2026 16:17:20 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D73D061A35\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 20 Jan 2026 16:17:19 +0100 (CET)","from pendragon.ideasonboard.com\n\t(2001-14ba-703d-e500--2a1.rev.dnainternet.fi\n\t[IPv6:2001:14ba:703d:e500::2a1])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 50A7E2147; \n\tTue, 20 Jan 2026 16:16:48 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"h6qWPYOJ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1768922208;\n\tbh=NEFdt/qEQj8+muZfeyPAawPJItwEQHeWYIRgMHVsJ1E=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=h6qWPYOJjX9IO2TkCmdZRn5eqSiVVXEYR1Df9n/5++gBiIp8ftRC2gwGXOnwItc0W\n\tC4G42jjxdfm3FQttJIMB9h2jX3HOSSkA/svypwSm0vZNWMPH9837j26SQ2bezxl3z8\n\tcnpzGYadcr+ZvGwdK6MwGR8Zt3m9bt5DQFKzPxjk=","Date":"Tue, 20 Jan 2026 17:17:17 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Robert Mader <robert.mader@collabora.com>","Cc":"libcamera-devel@lists.libcamera.org, Bryan O'Donoghue\n\t<bryan.odonoghue@linaro.org>, =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?=\n\t<barnabas.pocze@ideasonboard.com>","Subject":"Re: [PATCH v3 2/2] Revert \"libcamera: software_isp: gbm: Add a GBM\n\thelper class for GPU surface access\"","Message-ID":"<20260120151717.GA143894@killaraus>","References":"<20260120122344.28283-1-robert.mader@collabora.com>\n\t<20260120122344.28283-2-robert.mader@collabora.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20260120122344.28283-2-robert.mader@collabora.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":37764,"web_url":"https://patchwork.libcamera.org/comment/37764/","msgid":"<8736f6d4-e202-4a75-8721-ed617c8c2e67@collabora.com>","date":"2026-01-20T15:19:39","subject":"Re: [PATCH v3 2/2] Revert \"libcamera: software_isp: gbm: Add a GBM\n\thelper class 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 20.01.26 16:17, Laurent Pinchart wrote:\n> On Tue, Jan 20, 2026 at 01:23:44PM +0100, Robert Mader wrote:\n>> GBM is not used any more - remove the helper class.\n>>\n>> This results in egl.cpp getting build on some setups where it previously\n>> didn't, notably Debian 11 on CI, triggering a build issues. Include a\n>> workaround suggested by:\n>> Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n>>\n>> This reverts commit c60b1ce8193841c2742b655097bb39ccbcb417c2.\n>>\n>> Signed-off-by: Robert Mader <robert.mader@collabora.com>\n>> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n>> Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # sm8250/rb5, x1e/Dell Insprion14p\n>> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n>> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>>\n>> ---\n>>\n>> Changes in v3:\n>>   - Added Laurents R-B\n>>\n>> Changes in v2:\n>>   - Added tags\n>>   - Added build issue workaround - hope it's ok to keep the R-Bs.\n>> ---\n>>   include/libcamera/internal/egl.h       |   5 ++\n>>   include/libcamera/internal/gbm.h       |  55 -------------\n>>   include/libcamera/internal/meson.build |   1 -\n>>   src/libcamera/gbm.cpp                  | 107 -------------------------\n>>   src/libcamera/meson.build              |  12 +--\n>>   5 files changed, 6 insertions(+), 174 deletions(-)\n>>   delete mode 100644 include/libcamera/internal/gbm.h\n>>   delete mode 100644 src/libcamera/gbm.cpp\n>>\n>> diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h\n>> index 630345ea7..ce386554f 100644\n>> --- a/include/libcamera/internal/egl.h\n>> +++ b/include/libcamera/internal/egl.h\n>> @@ -16,6 +16,11 @@\n>>   #include <libcamera/base/span.h>\n>>   #include <libcamera/base/utils.h>\n>>   \n>> +/* Workaround for build issues on Mesa < 23.3, see\n>> + * https://github.com/KhronosGroup/EGL-Registry/pull/130\n>> + */\n> /*\n>   * Workaround for build issues on Mesa < 23.3, see\n>   * https://github.com/KhronosGroup/EGL-Registry/pull/130\n>   */\n>\n> No need for a v4, this can be fixed when applying.\n>\n> Buuut... now that I notice this, this would belong to a separate patch,\n> it's not part of the revert.\n\nI generally agree and first did that - however I then pulled it in as \notherwise the commit would break bi-secting on certain setups. Can do \nwhatever you prefer.\n\n>\n>> +#define EGL_NO_X11\n>> +\n>>   #define EGL_EGLEXT_PROTOTYPES\n>>   #include <EGL/egl.h>\n>>   #include <EGL/eglext.h>\n>> diff --git a/include/libcamera/internal/gbm.h b/include/libcamera/internal/gbm.h\n>> deleted file mode 100644\n>> index c10be06c1..000000000\n>> --- a/include/libcamera/internal/gbm.h\n>> +++ /dev/null\n>> @@ -1,55 +0,0 @@\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>> -#include <libcamera/base/unique_fd.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>> -\n>> -\t/**\n>> -\t * \\brief Retrieve the GBM device handle\n>> -\t *\n>> -\t * \\return Pointer to the gbm_device structure, or nullptr if the device\n>> -\t * has not been created\n>> -\t */\n>> -\tstruct gbm_device *device() const { return gbmDevice_; }\n>> -\n>> -\t/**\n>> -\t * \\brief Retrieve the pixel format\n>> -\t *\n>> -\t * \\return The PixelFormat used by this GBM instance (ARGB8888)\n>> -\t */\n>> -\tPixelFormat format() const { return format_; }\n>> -\n>> -private:\n>> -\tLIBCAMERA_DISABLE_COPY_AND_MOVE(GBM)\n>> -\n>> -\tUniqueFD fd_;\n>> -\tstruct gbm_device *gbmDevice_ = nullptr;\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 dc48619e5..4d2a09bd7 100644\n>> --- a/include/libcamera/internal/meson.build\n>> +++ b/include/libcamera/internal/meson.build\n>> @@ -24,7 +24,6 @@ libcamera_internal_headers = files([\n>>       'formats.h',\n>>       'framebuffer.h',\n>>       'egl.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>> deleted file mode 100644\n>> index d37808b0c..000000000\n>> --- a/src/libcamera/gbm.cpp\n>> +++ /dev/null\n>> @@ -1,107 +0,0 @@\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 uninitialised state.\n>> - */\n>> -GBM::GBM()\n>> -{\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>> -\tint fd = open(dri_node, O_RDWR | O_CLOEXEC | O_NOCTTY);\n>> -\tif (fd < 0) {\n>> -\t\tLOG(GBM, Error) << \"Open \" << dri_node << \" fail \" << strerror(errno);\n>> -\t\treturn -errno;\n>> -\t}\n>> -\tfd_ = UniqueFD(fd);\n>> -\n>> -\tgbmDevice_ = gbm_create_device(fd_.get());\n>> -\tif (!gbmDevice_) {\n>> -\t\tLOG(GBM, Error) << \"gbm_create_device fail\" << strerror(errno);\n>> -\t\treturn -errno;\n>> -\t}\n>> -\n>> -\tformat_ = libcamera::formats::ARGB8888;\n>> -\n>> -\treturn 0;\n>> -}\n>> -\n>> -} /* namespace libcamera */\n>> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n>> index 6f952bd98..d15943586 100644\n>> --- a/src/libcamera/meson.build\n>> +++ b/src/libcamera/meson.build\n>> @@ -70,15 +70,6 @@ libcamera_deps = []\n>>   libatomic = cc.find_library('atomic', required : false)\n>>   libthreads = dependency('threads')\n>>   \n>> -libgbm = dependency('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>>   mesa_works = cc.check_header('EGL/egl.h', required: false)\n>>   libegl = dependency('egl', required : false)\n>>   libglesv2 = dependency('glesv2', required : false)\n>> @@ -91,7 +82,7 @@ if libglesv2.found()\n>>       config_h.set('HAVE_GLESV2', 1)\n>>   endif\n>>   \n>> -if mesa_works and gbm_works\n>> +if mesa_works\n>>       libcamera_internal_sources += files([\n>>           'egl.cpp',\n>>       ])\n>> @@ -209,7 +200,6 @@ libcamera_deps += [\n>>       libcrypto,\n>>       libdl,\n>>       libegl,\n>> -    libgbm,\n>>       libglesv2,\n>>       liblttng,\n>>       libudev,","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 22DB0C3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 20 Jan 2026 15:19:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C48BE61FC4;\n\tTue, 20 Jan 2026 16:19: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 8C45A61A35\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 20 Jan 2026 16:19:48 +0100 (CET)","by mx.zohomail.com with SMTPS id 1768922383218519.6473151191806;\n\tTue, 20 Jan 2026 07:19: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=\"h6oSOE9+\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1768922386; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=dlgWYrejh2PPiMMiJS7d00yDNHb0ogcJcNCxISQvg/wf34yfgxiTky4tts2byvoGvLnEu1/ftwOGLnG/xqZHUArv2epAVvhyCgwVJjtxEICAArh3/jUFv9lIbfUjaBlBrj5g8utOfVHOjvDKvF2/dsR89UN4wUs/9tKjUMjSiwU=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1768922386;\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=yP47GjAqRY1ceevvbTodjSvd55O2oAvrMMDUYtzl/eo=; \n\tb=lwk3IWtlZr9AsEqpl/ShDqXiclUTamn8+CQQusqN+xnS294o2/uS03AeyVJWDmE1Ms+Pwesh1tSMLiWbh99kBG+I36Z2nG2AYh6yy3mBX2+wvCoPHshLZhaZn387mi4tO64SYf4Q7+KPli8vXArtt2hZyro7/mDvXaTguzWaOow=","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=1768922386;\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=yP47GjAqRY1ceevvbTodjSvd55O2oAvrMMDUYtzl/eo=;\n\tb=h6oSOE9+p+fGMPah3dx8JXOhw8+KlPbn9WKHyeWhnXZnR+XJCo18bxmhf50IkThl\n\tLl8GtTGrwfqZPzxwlwU6N1mlCFlXrhnbXQV8+Y0rwUggs9jEP8AU6a+3oB3My7+c5ve\n\tlmCOGu8xwiDuA8f0u1o8Qr22rUKW4Vf0yW/uUptc=","Message-ID":"<8736f6d4-e202-4a75-8721-ed617c8c2e67@collabora.com>","Date":"Tue, 20 Jan 2026 16:19:39 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v3 2/2] Revert \"libcamera: software_isp: gbm: Add a GBM\n\thelper class for GPU surface access\"","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, Bryan O'Donoghue\n\t<bryan.odonoghue@linaro.org>, =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?=\n\t<barnabas.pocze@ideasonboard.com>","References":"<20260120122344.28283-1-robert.mader@collabora.com>\n\t<20260120122344.28283-2-robert.mader@collabora.com>\n\t<20260120151717.GA143894@killaraus>","Content-Language":"en-US, de-DE","From":"Robert Mader <robert.mader@collabora.com>","In-Reply-To":"<20260120151717.GA143894@killaraus>","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":37772,"web_url":"https://patchwork.libcamera.org/comment/37772/","msgid":"<20260120174648.GA157464@killaraus>","date":"2026-01-20T17:46:48","subject":"Re: [PATCH v3 2/2] Revert \"libcamera: software_isp: gbm: Add a GBM\n\thelper class for GPU surface access\"","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Tue, Jan 20, 2026 at 04:19:39PM +0100, Robert Mader wrote:\n> On 20.01.26 16:17, Laurent Pinchart wrote:\n> > On Tue, Jan 20, 2026 at 01:23:44PM +0100, Robert Mader wrote:\n> >> GBM is not used any more - remove the helper class.\n> >>\n> >> This results in egl.cpp getting build on some setups where it previously\n> >> didn't, notably Debian 11 on CI, triggering a build issues. Include a\n> >> workaround suggested by:\n> >> Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> >>\n> >> This reverts commit c60b1ce8193841c2742b655097bb39ccbcb417c2.\n> >>\n> >> Signed-off-by: Robert Mader <robert.mader@collabora.com>\n> >> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n> >> Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # sm8250/rb5, x1e/Dell Insprion14p\n> >> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> >> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> >>\n> >> ---\n> >>\n> >> Changes in v3:\n> >>   - Added Laurents R-B\n> >>\n> >> Changes in v2:\n> >>   - Added tags\n> >>   - Added build issue workaround - hope it's ok to keep the R-Bs.\n> >> ---\n> >>   include/libcamera/internal/egl.h       |   5 ++\n> >>   include/libcamera/internal/gbm.h       |  55 -------------\n> >>   include/libcamera/internal/meson.build |   1 -\n> >>   src/libcamera/gbm.cpp                  | 107 -------------------------\n> >>   src/libcamera/meson.build              |  12 +--\n> >>   5 files changed, 6 insertions(+), 174 deletions(-)\n> >>   delete mode 100644 include/libcamera/internal/gbm.h\n> >>   delete mode 100644 src/libcamera/gbm.cpp\n> >>\n> >> diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h\n> >> index 630345ea7..ce386554f 100644\n> >> --- a/include/libcamera/internal/egl.h\n> >> +++ b/include/libcamera/internal/egl.h\n> >> @@ -16,6 +16,11 @@\n> >>   #include <libcamera/base/span.h>\n> >>   #include <libcamera/base/utils.h>\n> >>   \n> >> +/* Workaround for build issues on Mesa < 23.3, see\n> >> + * https://github.com/KhronosGroup/EGL-Registry/pull/130\n> >> + */\n> > /*\n> >   * Workaround for build issues on Mesa < 23.3, see\n> >   * https://github.com/KhronosGroup/EGL-Registry/pull/130\n> >   */\n> >\n> > No need for a v4, this can be fixed when applying.\n> >\n> > Buuut... now that I notice this, this would belong to a separate patch,\n> > it's not part of the revert.\n> \n> I generally agree and first did that - however I then pulled it in as \n> otherwise the commit would break bi-secting on certain setups. Can do \n> whatever you prefer.\n\nWould it break bisection if we define EGL_NO_X11 first and then revert\nthe addition of gbm.{h,cpp} ?\n\n> >> +#define EGL_NO_X11\n> >> +\n> >>   #define EGL_EGLEXT_PROTOTYPES\n> >>   #include <EGL/egl.h>\n> >>   #include <EGL/eglext.h>\n> >> diff --git a/include/libcamera/internal/gbm.h b/include/libcamera/internal/gbm.h\n> >> deleted file mode 100644\n> >> index c10be06c1..000000000\n> >> --- a/include/libcamera/internal/gbm.h\n> >> +++ /dev/null\n> >> @@ -1,55 +0,0 @@\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> >> -#include <libcamera/base/unique_fd.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> >> -\n> >> -\t/**\n> >> -\t * \\brief Retrieve the GBM device handle\n> >> -\t *\n> >> -\t * \\return Pointer to the gbm_device structure, or nullptr if the device\n> >> -\t * has not been created\n> >> -\t */\n> >> -\tstruct gbm_device *device() const { return gbmDevice_; }\n> >> -\n> >> -\t/**\n> >> -\t * \\brief Retrieve the pixel format\n> >> -\t *\n> >> -\t * \\return The PixelFormat used by this GBM instance (ARGB8888)\n> >> -\t */\n> >> -\tPixelFormat format() const { return format_; }\n> >> -\n> >> -private:\n> >> -\tLIBCAMERA_DISABLE_COPY_AND_MOVE(GBM)\n> >> -\n> >> -\tUniqueFD fd_;\n> >> -\tstruct gbm_device *gbmDevice_ = nullptr;\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 dc48619e5..4d2a09bd7 100644\n> >> --- a/include/libcamera/internal/meson.build\n> >> +++ b/include/libcamera/internal/meson.build\n> >> @@ -24,7 +24,6 @@ libcamera_internal_headers = files([\n> >>       'formats.h',\n> >>       'framebuffer.h',\n> >>       'egl.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> >> deleted file mode 100644\n> >> index d37808b0c..000000000\n> >> --- a/src/libcamera/gbm.cpp\n> >> +++ /dev/null\n> >> @@ -1,107 +0,0 @@\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 uninitialised state.\n> >> - */\n> >> -GBM::GBM()\n> >> -{\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> >> -\tint fd = open(dri_node, O_RDWR | O_CLOEXEC | O_NOCTTY);\n> >> -\tif (fd < 0) {\n> >> -\t\tLOG(GBM, Error) << \"Open \" << dri_node << \" fail \" << strerror(errno);\n> >> -\t\treturn -errno;\n> >> -\t}\n> >> -\tfd_ = UniqueFD(fd);\n> >> -\n> >> -\tgbmDevice_ = gbm_create_device(fd_.get());\n> >> -\tif (!gbmDevice_) {\n> >> -\t\tLOG(GBM, Error) << \"gbm_create_device fail\" << strerror(errno);\n> >> -\t\treturn -errno;\n> >> -\t}\n> >> -\n> >> -\tformat_ = libcamera::formats::ARGB8888;\n> >> -\n> >> -\treturn 0;\n> >> -}\n> >> -\n> >> -} /* namespace libcamera */\n> >> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> >> index 6f952bd98..d15943586 100644\n> >> --- a/src/libcamera/meson.build\n> >> +++ b/src/libcamera/meson.build\n> >> @@ -70,15 +70,6 @@ libcamera_deps = []\n> >>   libatomic = cc.find_library('atomic', required : false)\n> >>   libthreads = dependency('threads')\n> >>   \n> >> -libgbm = dependency('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> >>   mesa_works = cc.check_header('EGL/egl.h', required: false)\n> >>   libegl = dependency('egl', required : false)\n> >>   libglesv2 = dependency('glesv2', required : false)\n> >> @@ -91,7 +82,7 @@ if libglesv2.found()\n> >>       config_h.set('HAVE_GLESV2', 1)\n> >>   endif\n> >>   \n> >> -if mesa_works and gbm_works\n> >> +if mesa_works\n> >>       libcamera_internal_sources += files([\n> >>           'egl.cpp',\n> >>       ])\n> >> @@ -209,7 +200,6 @@ libcamera_deps += [\n> >>       libcrypto,\n> >>       libdl,\n> >>       libegl,\n> >> -    libgbm,\n> >>       libglesv2,\n> >>       liblttng,\n> >>       libudev,","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 D5D26BDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 20 Jan 2026 17:46:52 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 12D2261FC9;\n\tTue, 20 Jan 2026 18:46:52 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9DB0261A35\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 20 Jan 2026 18:46:50 +0100 (CET)","from pendragon.ideasonboard.com\n\t(2001-14ba-703d-e500--2a1.rev.dnainternet.fi\n\t[IPv6:2001:14ba:703d:e500::2a1])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 16D882DD;\n\tTue, 20 Jan 2026 18:46:19 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"uX6C7Mfk\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1768931179;\n\tbh=QPa+SYPPTCHbF0882unQsP86cEiKtfZAmOYv6U1Xrsk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=uX6C7MfkQRgxSLYPtIaQ9JAmHJsRUpjWiSIgwWDPGP7ZFH7Mos6SANkIpmK6u0ALU\n\tVYrj928iOm+b7oH/YVESJ5rNoC+1hw5VLwuGtrSeMlRUdruyKOpxzyKYkQ3cZETwNT\n\t9XzmidDPqqlWyeMB4AUfmKuUpHUlKotLb2P0x6gE=","Date":"Tue, 20 Jan 2026 19:46:48 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Robert Mader <robert.mader@collabora.com>","Cc":"libcamera-devel@lists.libcamera.org, Bryan O'Donoghue\n\t<bryan.odonoghue@linaro.org>, =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?=\n\t<barnabas.pocze@ideasonboard.com>","Subject":"Re: [PATCH v3 2/2] Revert \"libcamera: software_isp: gbm: Add a GBM\n\thelper class for GPU surface access\"","Message-ID":"<20260120174648.GA157464@killaraus>","References":"<20260120122344.28283-1-robert.mader@collabora.com>\n\t<20260120122344.28283-2-robert.mader@collabora.com>\n\t<20260120151717.GA143894@killaraus>\n\t<8736f6d4-e202-4a75-8721-ed617c8c2e67@collabora.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<8736f6d4-e202-4a75-8721-ed617c8c2e67@collabora.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":37776,"web_url":"https://patchwork.libcamera.org/comment/37776/","msgid":"<86b1a669-df92-4002-b627-fe7a0bf5868e@collabora.com>","date":"2026-01-20T21:28:17","subject":"Re: [PATCH v3 2/2] Revert \"libcamera: software_isp: gbm: Add a GBM\n\thelper class 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 20.01.26 18:46, Laurent Pinchart wrote:\n> On Tue, Jan 20, 2026 at 04:19:39PM +0100, Robert Mader wrote:\n>> On 20.01.26 16:17, Laurent Pinchart wrote:\n>>> On Tue, Jan 20, 2026 at 01:23:44PM +0100, Robert Mader wrote:\n>>>> GBM is not used any more - remove the helper class.\n>>>>\n>>>> This results in egl.cpp getting build on some setups where it previously\n>>>> didn't, notably Debian 11 on CI, triggering a build issues. Include a\n>>>> workaround suggested by:\n>>>> Barnabás Pőcze<barnabas.pocze@ideasonboard.com>\n>>>>\n>>>> This reverts commit c60b1ce8193841c2742b655097bb39ccbcb417c2.\n>>>>\n>>>> Signed-off-by: Robert Mader<robert.mader@collabora.com>\n>>>> Reviewed-by: Bryan O'Donoghue<bryan.odonoghue@linaro.org>\n>>>> Tested-by: Bryan O'Donoghue<bryan.odonoghue@linaro.org> # sm8250/rb5, x1e/Dell Insprion14p\n>>>> Reviewed-by: Barnabás Pőcze<barnabas.pocze@ideasonboard.com>\n>>>> Reviewed-by: Laurent Pinchart<laurent.pinchart@ideasonboard.com>\n>>>>\n>>>> ---\n>>>>\n>>>> Changes in v3:\n>>>>    - Added Laurents R-B\n>>>>\n>>>> Changes in v2:\n>>>>    - Added tags\n>>>>    - Added build issue workaround - hope it's ok to keep the R-Bs.\n>>>> ---\n>>>>    include/libcamera/internal/egl.h       |   5 ++\n>>>>    include/libcamera/internal/gbm.h       |  55 -------------\n>>>>    include/libcamera/internal/meson.build |   1 -\n>>>>    src/libcamera/gbm.cpp                  | 107 -------------------------\n>>>>    src/libcamera/meson.build              |  12 +--\n>>>>    5 files changed, 6 insertions(+), 174 deletions(-)\n>>>>    delete mode 100644 include/libcamera/internal/gbm.h\n>>>>    delete mode 100644 src/libcamera/gbm.cpp\n>>>>\n>>>> diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h\n>>>> index 630345ea7..ce386554f 100644\n>>>> --- a/include/libcamera/internal/egl.h\n>>>> +++ b/include/libcamera/internal/egl.h\n>>>> @@ -16,6 +16,11 @@\n>>>>    #include <libcamera/base/span.h>\n>>>>    #include <libcamera/base/utils.h>\n>>>>    \n>>>> +/* Workaround for build issues on Mesa < 23.3, see\n>>>> + *https://github.com/KhronosGroup/EGL-Registry/pull/130\n>>>> + */\n>>> /*\n>>>    * Workaround for build issues on Mesa < 23.3, see\n>>>    *https://github.com/KhronosGroup/EGL-Registry/pull/130\n>>>    */\n>>>\n>>> No need for a v4, this can be fixed when applying.\n>>>\n>>> Buuut... now that I notice this, this would belong to a separate patch,\n>>> it's not part of the revert.\n>> I generally agree and first did that - however I then pulled it in as\n>> otherwise the commit would break bi-secting on certain setups. Can do\n>> whatever you prefer.\n> Would it break bisection if we define EGL_NO_X11 first and then revert\n> the addition of gbm.{h,cpp} ?\nErrr, good point 😅 Will send a v4 tomorrow!\n>>>> +#define EGL_NO_X11\n>>>> +\n>>>>    #define EGL_EGLEXT_PROTOTYPES\n>>>>    #include <EGL/egl.h>\n>>>>    #include <EGL/eglext.h>\n>>>> diff --git a/include/libcamera/internal/gbm.h b/include/libcamera/internal/gbm.h\n>>>> deleted file mode 100644\n>>>> index c10be06c1..000000000\n>>>> --- a/include/libcamera/internal/gbm.h\n>>>> +++ /dev/null\n>>>> @@ -1,55 +0,0 @@\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>>>> -#include <libcamera/base/unique_fd.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>>>> -\n>>>> -\t/**\n>>>> -\t * \\brief Retrieve the GBM device handle\n>>>> -\t *\n>>>> -\t * \\return Pointer to the gbm_device structure, or nullptr if the device\n>>>> -\t * has not been created\n>>>> -\t */\n>>>> -\tstruct gbm_device *device() const { return gbmDevice_; }\n>>>> -\n>>>> -\t/**\n>>>> -\t * \\brief Retrieve the pixel format\n>>>> -\t *\n>>>> -\t * \\return The PixelFormat used by this GBM instance (ARGB8888)\n>>>> -\t */\n>>>> -\tPixelFormat format() const { return format_; }\n>>>> -\n>>>> -private:\n>>>> -\tLIBCAMERA_DISABLE_COPY_AND_MOVE(GBM)\n>>>> -\n>>>> -\tUniqueFD fd_;\n>>>> -\tstruct gbm_device *gbmDevice_ = nullptr;\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 dc48619e5..4d2a09bd7 100644\n>>>> --- a/include/libcamera/internal/meson.build\n>>>> +++ b/include/libcamera/internal/meson.build\n>>>> @@ -24,7 +24,6 @@ libcamera_internal_headers = files([\n>>>>        'formats.h',\n>>>>        'framebuffer.h',\n>>>>        'egl.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>>>> deleted file mode 100644\n>>>> index d37808b0c..000000000\n>>>> --- a/src/libcamera/gbm.cpp\n>>>> +++ /dev/null\n>>>> @@ -1,107 +0,0 @@\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 uninitialised state.\n>>>> - */\n>>>> -GBM::GBM()\n>>>> -{\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>>>> -\tint fd = open(dri_node, O_RDWR | O_CLOEXEC | O_NOCTTY);\n>>>> -\tif (fd < 0) {\n>>>> -\t\tLOG(GBM, Error) << \"Open \" << dri_node << \" fail \" << strerror(errno);\n>>>> -\t\treturn -errno;\n>>>> -\t}\n>>>> -\tfd_ = UniqueFD(fd);\n>>>> -\n>>>> -\tgbmDevice_ = gbm_create_device(fd_.get());\n>>>> -\tif (!gbmDevice_) {\n>>>> -\t\tLOG(GBM, Error) << \"gbm_create_device fail\" << strerror(errno);\n>>>> -\t\treturn -errno;\n>>>> -\t}\n>>>> -\n>>>> -\tformat_ = libcamera::formats::ARGB8888;\n>>>> -\n>>>> -\treturn 0;\n>>>> -}\n>>>> -\n>>>> -} /* namespace libcamera */\n>>>> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n>>>> index 6f952bd98..d15943586 100644\n>>>> --- a/src/libcamera/meson.build\n>>>> +++ b/src/libcamera/meson.build\n>>>> @@ -70,15 +70,6 @@ libcamera_deps = []\n>>>>    libatomic = cc.find_library('atomic', required : false)\n>>>>    libthreads = dependency('threads')\n>>>>    \n>>>> -libgbm = dependency('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>>>>    mesa_works = cc.check_header('EGL/egl.h', required: false)\n>>>>    libegl = dependency('egl', required : false)\n>>>>    libglesv2 = dependency('glesv2', required : false)\n>>>> @@ -91,7 +82,7 @@ if libglesv2.found()\n>>>>        config_h.set('HAVE_GLESV2', 1)\n>>>>    endif\n>>>>    \n>>>> -if mesa_works and gbm_works\n>>>> +if mesa_works\n>>>>        libcamera_internal_sources += files([\n>>>>            'egl.cpp',\n>>>>        ])\n>>>> @@ -209,7 +200,6 @@ libcamera_deps += [\n>>>>        libcrypto,\n>>>>        libdl,\n>>>>        libegl,\n>>>> -    libgbm,\n>>>>        libglesv2,\n>>>>        liblttng,\n>>>>        libudev,","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 445BCBDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 20 Jan 2026 21:28:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8B3E061FBF;\n\tTue, 20 Jan 2026 22:28: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 4682161A35\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 20 Jan 2026 22:28:29 +0100 (CET)","by mx.zohomail.com with SMTPS id 1768944501570637.6281087177084;\n\tTue, 20 Jan 2026 13:28:21 -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=\"gBQQwL66\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1768944505; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=CUcqw4ihD8aWY4UtsAl/N4SDn6PLadx99BhjmxuryVg1dnWYn2CqKcrxponLH/+GeNGk03OiwVXQEozplBzYxAD7hNTgJpzG5Kz6Wmksi806T03O+Yd1cKPDHxGDQF1C3IMqSIJG0SUFD6SiCCUhNu1Apu0KkyIdLPaLkRUFRh0=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1768944505;\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=LDzvHznQNwDg6+wOecRX6YcMV6QnkRf64MSHvDVNxKk=; \n\tb=Yf+O202JBpuFwogQtDHwLw9i/cFKHPtmov/x+7rF/N2Tfhy+wrPyh09OhF2IYZg+nySsga7I8a4YFIqQ42qZeBUwlrTrtTphv2nw/C193liucwIb/UreZJVBTLXJ5na6eOnJHOSIYbklgqGdUkEIOG9gVboaMD1HtZUPBuJ3avQ=","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=1768944505;\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=LDzvHznQNwDg6+wOecRX6YcMV6QnkRf64MSHvDVNxKk=;\n\tb=gBQQwL66wct2M+qa22lzOUtG56CzGgy0ldJ4O0izqGIvMWt/bN6uygtZfWUbtff1\n\tFX1vwb2RcJcNmSJd1tcebRcWmHIFJo9HxdL09GSCyl68gsE15arh2DIXDCxT4cNlOrh\n\t+w4K/ru20F8WrxezgxSBcNuXw+evvwLesI3wfYRk=","Content-Type":"multipart/alternative;\n\tboundary=\"------------kYgD8iyT2KZJiKXVh6WzfV7x\"","Message-ID":"<86b1a669-df92-4002-b627-fe7a0bf5868e@collabora.com>","Date":"Tue, 20 Jan 2026 22:28:17 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v3 2/2] Revert \"libcamera: software_isp: gbm: Add a GBM\n\thelper class for GPU surface access\"","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, Bryan O'Donoghue\n\t<bryan.odonoghue@linaro.org>, =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?=\n\t<barnabas.pocze@ideasonboard.com>","References":"<20260120122344.28283-1-robert.mader@collabora.com>\n\t<20260120122344.28283-2-robert.mader@collabora.com>\n\t<20260120151717.GA143894@killaraus>\n\t<8736f6d4-e202-4a75-8721-ed617c8c2e67@collabora.com>\n\t<20260120174648.GA157464@killaraus>","Content-Language":"en-US, de-DE, en-GB","From":"Robert Mader <robert.mader@collabora.com>","In-Reply-To":"<20260120174648.GA157464@killaraus>","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":37777,"web_url":"https://patchwork.libcamera.org/comment/37777/","msgid":"<20260120214559.GC173080@killaraus>","date":"2026-01-20T21:45:59","subject":"Re: [PATCH v3 2/2] Revert \"libcamera: software_isp: gbm: Add a GBM\n\thelper class for GPU surface access\"","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Tue, Jan 20, 2026 at 10:28:17PM +0100, Robert Mader wrote:\n> On 20.01.26 18:46, Laurent Pinchart wrote:\n> > On Tue, Jan 20, 2026 at 04:19:39PM +0100, Robert Mader wrote:\n> >> On 20.01.26 16:17, Laurent Pinchart wrote:\n> >>> On Tue, Jan 20, 2026 at 01:23:44PM +0100, Robert Mader wrote:\n> >>>> GBM is not used any more - remove the helper class.\n> >>>>\n> >>>> This results in egl.cpp getting build on some setups where it previously\n> >>>> didn't, notably Debian 11 on CI, triggering a build issues. Include a\n> >>>> workaround suggested by:\n> >>>> Barnabás Pőcze<barnabas.pocze@ideasonboard.com>\n> >>>>\n> >>>> This reverts commit c60b1ce8193841c2742b655097bb39ccbcb417c2.\n> >>>>\n> >>>> Signed-off-by: Robert Mader<robert.mader@collabora.com>\n> >>>> Reviewed-by: Bryan O'Donoghue<bryan.odonoghue@linaro.org>\n> >>>> Tested-by: Bryan O'Donoghue<bryan.odonoghue@linaro.org> # sm8250/rb5, x1e/Dell Insprion14p\n> >>>> Reviewed-by: Barnabás Pőcze<barnabas.pocze@ideasonboard.com>\n> >>>> Reviewed-by: Laurent Pinchart<laurent.pinchart@ideasonboard.com>\n> >>>>\n> >>>> ---\n> >>>>\n> >>>> Changes in v3:\n> >>>>    - Added Laurents R-B\n> >>>>\n> >>>> Changes in v2:\n> >>>>    - Added tags\n> >>>>    - Added build issue workaround - hope it's ok to keep the R-Bs.\n> >>>> ---\n> >>>>    include/libcamera/internal/egl.h       |   5 ++\n> >>>>    include/libcamera/internal/gbm.h       |  55 -------------\n> >>>>    include/libcamera/internal/meson.build |   1 -\n> >>>>    src/libcamera/gbm.cpp                  | 107 -------------------------\n> >>>>    src/libcamera/meson.build              |  12 +--\n> >>>>    5 files changed, 6 insertions(+), 174 deletions(-)\n> >>>>    delete mode 100644 include/libcamera/internal/gbm.h\n> >>>>    delete mode 100644 src/libcamera/gbm.cpp\n> >>>>\n> >>>> diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h\n> >>>> index 630345ea7..ce386554f 100644\n> >>>> --- a/include/libcamera/internal/egl.h\n> >>>> +++ b/include/libcamera/internal/egl.h\n> >>>> @@ -16,6 +16,11 @@\n> >>>>    #include <libcamera/base/span.h>\n> >>>>    #include <libcamera/base/utils.h>\n> >>>>    \n> >>>> +/* Workaround for build issues on Mesa < 23.3, see\n> >>>> + *https://github.com/KhronosGroup/EGL-Registry/pull/130\n> >>>> + */\n> >>>\n> >>> /*\n> >>>    * Workaround for build issues on Mesa < 23.3, see\n> >>>    *https://github.com/KhronosGroup/EGL-Registry/pull/130\n> >>>    */\n> >>>\n> >>> No need for a v4, this can be fixed when applying.\n> >>>\n> >>> Buuut... now that I notice this, this would belong to a separate patch,\n> >>> it's not part of the revert.\n> >>\n> >> I generally agree and first did that - however I then pulled it in as\n> >> otherwise the commit would break bi-secting on certain setups. Can do\n> >> whatever you prefer.\n> >\n> > Would it break bisection if we define EGL_NO_X11 first and then revert\n> > the addition of gbm.{h,cpp} ?\n>\n> Errr, good point 😅 Will send a v4 tomorrow!\n\nSorry for not noticing it earlier. Let's merge v4 :-)\n\n> >>>> +#define EGL_NO_X11\n> >>>> +\n> >>>>    #define EGL_EGLEXT_PROTOTYPES\n> >>>>    #include <EGL/egl.h>\n> >>>>    #include <EGL/eglext.h>\n> >>>> diff --git a/include/libcamera/internal/gbm.h b/include/libcamera/internal/gbm.h\n> >>>> deleted file mode 100644\n> >>>> index c10be06c1..000000000\n> >>>> --- a/include/libcamera/internal/gbm.h\n> >>>> +++ /dev/null\n> >>>> @@ -1,55 +0,0 @@\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> >>>> -#include <libcamera/base/unique_fd.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> >>>> -\n> >>>> -\t/**\n> >>>> -\t * \\brief Retrieve the GBM device handle\n> >>>> -\t *\n> >>>> -\t * \\return Pointer to the gbm_device structure, or nullptr if the device\n> >>>> -\t * has not been created\n> >>>> -\t */\n> >>>> -\tstruct gbm_device *device() const { return gbmDevice_; }\n> >>>> -\n> >>>> -\t/**\n> >>>> -\t * \\brief Retrieve the pixel format\n> >>>> -\t *\n> >>>> -\t * \\return The PixelFormat used by this GBM instance (ARGB8888)\n> >>>> -\t */\n> >>>> -\tPixelFormat format() const { return format_; }\n> >>>> -\n> >>>> -private:\n> >>>> -\tLIBCAMERA_DISABLE_COPY_AND_MOVE(GBM)\n> >>>> -\n> >>>> -\tUniqueFD fd_;\n> >>>> -\tstruct gbm_device *gbmDevice_ = nullptr;\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 dc48619e5..4d2a09bd7 100644\n> >>>> --- a/include/libcamera/internal/meson.build\n> >>>> +++ b/include/libcamera/internal/meson.build\n> >>>> @@ -24,7 +24,6 @@ libcamera_internal_headers = files([\n> >>>>        'formats.h',\n> >>>>        'framebuffer.h',\n> >>>>        'egl.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> >>>> deleted file mode 100644\n> >>>> index d37808b0c..000000000\n> >>>> --- a/src/libcamera/gbm.cpp\n> >>>> +++ /dev/null\n> >>>> @@ -1,107 +0,0 @@\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 uninitialised state.\n> >>>> - */\n> >>>> -GBM::GBM()\n> >>>> -{\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> >>>> -\tint fd = open(dri_node, O_RDWR | O_CLOEXEC | O_NOCTTY);\n> >>>> -\tif (fd < 0) {\n> >>>> -\t\tLOG(GBM, Error) << \"Open \" << dri_node << \" fail \" << strerror(errno);\n> >>>> -\t\treturn -errno;\n> >>>> -\t}\n> >>>> -\tfd_ = UniqueFD(fd);\n> >>>> -\n> >>>> -\tgbmDevice_ = gbm_create_device(fd_.get());\n> >>>> -\tif (!gbmDevice_) {\n> >>>> -\t\tLOG(GBM, Error) << \"gbm_create_device fail\" << strerror(errno);\n> >>>> -\t\treturn -errno;\n> >>>> -\t}\n> >>>> -\n> >>>> -\tformat_ = libcamera::formats::ARGB8888;\n> >>>> -\n> >>>> -\treturn 0;\n> >>>> -}\n> >>>> -\n> >>>> -} /* namespace libcamera */\n> >>>> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> >>>> index 6f952bd98..d15943586 100644\n> >>>> --- a/src/libcamera/meson.build\n> >>>> +++ b/src/libcamera/meson.build\n> >>>> @@ -70,15 +70,6 @@ libcamera_deps = []\n> >>>>    libatomic = cc.find_library('atomic', required : false)\n> >>>>    libthreads = dependency('threads')\n> >>>>    \n> >>>> -libgbm = dependency('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> >>>>    mesa_works = cc.check_header('EGL/egl.h', required: false)\n> >>>>    libegl = dependency('egl', required : false)\n> >>>>    libglesv2 = dependency('glesv2', required : false)\n> >>>> @@ -91,7 +82,7 @@ if libglesv2.found()\n> >>>>        config_h.set('HAVE_GLESV2', 1)\n> >>>>    endif\n> >>>>    \n> >>>> -if mesa_works and gbm_works\n> >>>> +if mesa_works\n> >>>>        libcamera_internal_sources += files([\n> >>>>            'egl.cpp',\n> >>>>        ])\n> >>>> @@ -209,7 +200,6 @@ libcamera_deps += [\n> >>>>        libcrypto,\n> >>>>        libdl,\n> >>>>        libegl,\n> >>>> -    libgbm,\n> >>>>        libglesv2,\n> >>>>        liblttng,\n> >>>>        libudev,","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 75492C3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 20 Jan 2026 21:46:02 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3996B61FC5;\n\tTue, 20 Jan 2026 22:46:02 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4729161A35\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 20 Jan 2026 22:46:01 +0100 (CET)","from pendragon.ideasonboard.com\n\t(2001-14ba-703d-e500--2a1.rev.dnainternet.fi\n\t[IPv6:2001:14ba:703d:e500::2a1])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id CA589C79;\n\tTue, 20 Jan 2026 22:45:29 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"I4cwHYlH\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1768945530;\n\tbh=cxwDIlslEcM5lAht+Cr4nHQ1UAXPxuCCLqf0yAwGpyw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=I4cwHYlH+HA9bKf7R8G6wUFdGrK0QinUcKLxU4lr8YO3C0saGOFtJxFMwoet6PEji\n\ttCio2eIVspU44ih5uCN0mB8GwHLRjRjVniij0I1WW94wp8yJt/wsuJelqd14wQQyVM\n\tW2jueOKA3wA1//QlTEIcrnGQqqzlH/9xm0IMe3iA=","Date":"Tue, 20 Jan 2026 23:45:59 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Robert Mader <robert.mader@collabora.com>","Cc":"libcamera-devel@lists.libcamera.org, Bryan O'Donoghue\n\t<bryan.odonoghue@linaro.org>, =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?=\n\t<barnabas.pocze@ideasonboard.com>","Subject":"Re: [PATCH v3 2/2] Revert \"libcamera: software_isp: gbm: Add a GBM\n\thelper class for GPU surface access\"","Message-ID":"<20260120214559.GC173080@killaraus>","References":"<20260120122344.28283-1-robert.mader@collabora.com>\n\t<20260120122344.28283-2-robert.mader@collabora.com>\n\t<20260120151717.GA143894@killaraus>\n\t<8736f6d4-e202-4a75-8721-ed617c8c2e67@collabora.com>\n\t<20260120174648.GA157464@killaraus>\n\t<86b1a669-df92-4002-b627-fe7a0bf5868e@collabora.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<86b1a669-df92-4002-b627-fe7a0bf5868e@collabora.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]