Show a patch.

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

{
    "id": 25905,
    "url": "https://patchwork.libcamera.org/api/patches/25905/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25905/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/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": "<20260121090854.27483-3-robert.mader@collabora.com>",
    "date": "2026-01-21T09:08:54",
    "name": "[v4,3/3] Revert \"libcamera: software_isp: gbm: Add a GBM helper class for GPU surface access\"",
    "commit_ref": "7350d6cc5dd1b5bc724749d21744c07879deb803",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "a11bd5bbe2c440013a866c3c4e5cc1a58add074f",
    "submitter": {
        "id": 140,
        "url": "https://patchwork.libcamera.org/api/people/140/?format=api",
        "name": "Robert Mader",
        "email": "robert.mader@collabora.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/25905/mbox/",
    "series": [
        {
            "id": 5728,
            "url": "https://patchwork.libcamera.org/api/series/5728/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5728",
            "date": "2026-01-21T09:08:52",
            "name": "[v4,1/3] egl: Use the Mesa surfaceless platform instead of GBM",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/5728/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/25905/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25905/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 605A6C327D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 21 Jan 2026 09:09:43 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1456F61FCA;\n\tWed, 21 Jan 2026 10:09:43 +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 92DAE61FC6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 21 Jan 2026 10:09:41 +0100 (CET)",
            "by mx.zohomail.com with SMTPS id 1768986577158128.48417700906577; \n\tWed, 21 Jan 2026 01:09: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=\"CevMCeWg\"; \n\tdkim-atps=neutral",
        "ARC-Seal": "i=1; a=rsa-sha256; t=1768986578; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=J0GeMHo0OtZZAvdjtrudC7gYghdBk9k2EO3edOwyzJNx7jvWX7hpfs66oZSPgnunlG7iM6KP33pm6nWOw9/QEDr18qnxI52038Z55wMnRtSErvd6jo5QCNOJ6TxOMbEnKt46GyLROzApz1Et2weKovlo6EfKWtg5DE1d0FrUQnI=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1768986578;\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=mmnoGi96Frg3kdzUbwoxFDl6Sr66ra4OaelTZOEvRdI=; \n\tb=IRjOHT4wPWk1zQAZ0pWJU+7rjr21yd7DIc2VZCWLNCfN0PkXw9Og1z3QrpLw/QqOHouMxcTChLy3zqKiuXzVmPVuvyyMEL14ZhnpWg8YoYMxQBqOmkJypcOB+45nrjiSISLWGn9S/0u8XzNruzcqBC8+8JiDlw75LuVsxcnz85M=",
        "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=1768986578;\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=mmnoGi96Frg3kdzUbwoxFDl6Sr66ra4OaelTZOEvRdI=;\n\tb=CevMCeWgJ4R34nkL3V4hcAx7Wtipg8wI3Vef6AoY2/g6AndgKVmO7/TvuLx/xkCd\n\tBPfE38Fj54DY9hpZCTVmcnOdrDlX6RVqp+pSPCN9zEypz5n0U2+5TjOlT5eq2JYBLQ8\n\tHoLJTMuP1A3Jsoq4PlxMooLpgPvWg7UF3Uf+d5SU=",
        "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 v4 3/3] Revert \"libcamera: software_isp: gbm: Add a GBM\n\thelper class for GPU surface access\"",
        "Date": "Wed, 21 Jan 2026 10:08:54 +0100",
        "Message-ID": "<20260121090854.27483-3-robert.mader@collabora.com>",
        "X-Mailer": "git-send-email 2.52.0",
        "In-Reply-To": "<20260121090854.27483-1-robert.mader@collabora.com>",
        "References": "<20260121090854.27483-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 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 v4:\n - Move build workaround into a dedicated commit\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/gbm.h       |  55 -------------\n include/libcamera/internal/meson.build |   1 -\n src/libcamera/gbm.cpp                  | 107 -------------------------\n src/libcamera/meson.build              |  12 +--\n 4 files changed, 1 insertion(+), 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/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": [
        "v4",
        "3/3"
    ]
}