Show a patch.

GET /api/1.1/patches/25871/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 25871,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/25871/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25871/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20260120122344.28283-2-robert.mader@collabora.com>",
    "date": "2026-01-20T12:23:44",
    "name": "[v3,2/2] Revert \"libcamera: software_isp: gbm: Add a GBM helper class for GPU surface access\"",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "8b52d42c58244fedc7b06b559a89ba02eb20fa2e",
    "submitter": {
        "id": 140,
        "url": "https://patchwork.libcamera.org/api/1.1/people/140/?format=api",
        "name": "Robert Mader",
        "email": "robert.mader@collabora.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/25871/mbox/",
    "series": [
        {
            "id": 5721,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5721/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5721",
            "date": "2026-01-20T12:23:43",
            "name": "[v3,1/2] egl: Use the Mesa surfaceless platform instead of GBM",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/5721/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/25871/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25871/checks/",
    "tags": {},
    "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 2090EBDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 20 Jan 2026 12:24:11 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BC9AB61FC7;\n\tTue, 20 Jan 2026 13:24:10 +0100 (CET)",
            "from sender4-pp-f119.zoho.com (sender4-pp-f119.zoho.com\n\t[136.143.188.119])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6805F61A35\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 20 Jan 2026 13:24:08 +0100 (CET)",
            "by mx.zohomail.com with SMTPS id 176891184191379.42758502460481;\n\tTue, 20 Jan 2026 04:24:01 -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=\"JpC1pNJG\"; \n\tdkim-atps=neutral",
        "ARC-Seal": "i=1; a=rsa-sha256; t=1768911844; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=n7tFIvZMEXjSni8diqvv3F7kufxaCruGB/EmwvLel1rVOcWW5RhjoWU8P4uV7aLoEEz/snZIkW9ocZY8W5La87h9zdOle3KGPukIiRtzhqL3Wet2buAdo9X24YiB5Mdyp+uE83AhEK6WDRVrM+hfGjpTIhYQ5HJ1ry1kJ6IF9uc=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1768911844;\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=D+VJKpklOl27/I03rp1Z5yNul+GN1rmaqmDHc0AwQ6g=; \n\tb=ROhzr+e2tp+rEPG7tdCYRXBC62nGSTIusjz8VPJ9qGLjf1y8sP18d9Xq0DXjgkY2IZ3uRZK8MxlgFcT5EZtil0Fl+GFDzY+mJ8kUZNhu83n6ezykwY5whihiL1apKYk7KacrQDyyB9OERnrEjFrBzCm4anChyw1VxJJ4ewDqnNo=",
        "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=1768911844;\n\ts=zohomail; d=collabora.com; i=robert.mader@collabora.com;\n\th=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To;\n\tbh=D+VJKpklOl27/I03rp1Z5yNul+GN1rmaqmDHc0AwQ6g=;\n\tb=JpC1pNJG5aNVul/H7A8waaTb1qLqviC0j4RLQCpdV+Ex72f4xFdduBvSd3k6u950\n\tk1hBvtivnKZ8Wi+1uXdvCjERMWHPXMR8eJrwH7LMaDFpwTyxseesaYyxb7xkt+bQ/lD\n\tsp1O50gQoCsHetePGb8WYQhQwUnKvX87JUU1bFaU=",
        "From": "Robert Mader <robert.mader@collabora.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Robert Mader <robert.mader@collabora.com>, Bryan O'Donoghue\n\t<bryan.odonoghue@linaro.org>, =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?=\n\t<barnabas.pocze@ideasonboard.com>, Laurent Pinchart\n\t<laurent.pinchart@ideasonboard.com>",
        "Subject": "[PATCH v3 2/2] Revert \"libcamera: software_isp: gbm: Add a GBM\n\thelper class for GPU surface access\"",
        "Date": "Tue, 20 Jan 2026 13:23:44 +0100",
        "Message-ID": "<20260120122344.28283-2-robert.mader@collabora.com>",
        "X-Mailer": "git-send-email 2.52.0",
        "In-Reply-To": "<20260120122344.28283-1-robert.mader@collabora.com>",
        "References": "<20260120122344.28283-1-robert.mader@collabora.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "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>"
    },
    "content": "GBM is not used any more - remove the helper class.\n\nThis results in egl.cpp getting build on some setups where it previously\ndidn't, notably Debian 11 on CI, triggering a build issues. Include a\nworkaround suggested by:\nBarnabás Pőcze <barnabas.pocze@ideasonboard.com>\n\nThis reverts commit c60b1ce8193841c2742b655097bb39ccbcb417c2.\n\nSigned-off-by: Robert Mader <robert.mader@collabora.com>\nReviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\nTested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # sm8250/rb5, x1e/Dell Insprion14p\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n---\n\nChanges in v3:\n - Added Laurents R-B\n\nChanges 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",
    "diff": "diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h\nindex 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+#define EGL_NO_X11\n+\n #define EGL_EGLEXT_PROTOTYPES\n #include <EGL/egl.h>\n #include <EGL/eglext.h>\ndiff --git a/include/libcamera/internal/gbm.h b/include/libcamera/internal/gbm.h\ndeleted file mode 100644\nindex 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 */\ndiff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\nindex 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',\ndiff --git a/src/libcamera/gbm.cpp b/src/libcamera/gbm.cpp\ndeleted file mode 100644\nindex 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 */\ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex 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,\n",
    "prefixes": [
        "v3",
        "2/2"
    ]
}