Patch Detail
Show a patch.
GET /api/1.1/patches/26957/?format=api
{ "id": 26957, "url": "https://patchwork.libcamera.org/api/1.1/patches/26957/?format=api", "web_url": "https://patchwork.libcamera.org/patch/26957/", "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": "<20260618122245.946138-25-bryan.odonoghue@linaro.org>", "date": "2026-06-18T12:22:37", "name": "[24/30] libcamera: software_isp: egl: Add eglBenchMark", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "a13b0c5a42b8ba4bedfe0d14b9fc72580fefdbf0", "submitter": { "id": 175, "url": "https://patchwork.libcamera.org/api/1.1/people/175/?format=api", "name": "Bryan O'Donoghue", "email": "bryan.odonoghue@linaro.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/26957/mbox/", "series": [ { "id": 6005, "url": "https://patchwork.libcamera.org/api/1.1/series/6005/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=6005", "date": "2026-06-18T12:22:13", "name": "RFC/RFT: gpuisp: Multipass with speed optimisations on top", "version": 1, "mbox": "https://patchwork.libcamera.org/series/6005/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/26957/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/26957/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 22DF9C3303\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 18 Jun 2026 12:23:37 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A8E0F656D4;\n\tThu, 18 Jun 2026 14:23:36 +0200 (CEST)", "from mail-wm1-x333.google.com (mail-wm1-x333.google.com\n\t[IPv6:2a00:1450:4864:20::333])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 86C7D656C2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Jun 2026 14:23:16 +0200 (CEST)", "by mail-wm1-x333.google.com with SMTP id\n\t5b1f17b1804b1-490afc47455so3172485e9.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Jun 2026 05:23:16 -0700 (PDT)", "from inspiron14p-linux ([109.76.144.236])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-4922fa3a4easm275198015e9.3.2026.06.18.05.23.15\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 18 Jun 2026 05:23:15 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"PgaR1UcK\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1781785396; x=1782390196;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=plXVRNtI9PlRM1WZ1wJrleCdMifWh3iZlB+O97cPEp0=;\n\tb=PgaR1UcK0yqmHz/xeFAbehdyQnwLSFcQ8rrPVT1B7ogni8+86Cn9z66Cjrojr8RFYD\n\t9CJPlH4FG7Afevc5pLWb2KKYr3/kiQOdviOvWbpmtiAyB02p1ks7VZJXpCFYg4KNG9bX\n\tl2W2Xgpk9yOqSjDbTcBqCB8PleANhGNTvYeggFKI+Qb8/IT89LFK9GDadxevCWAd5+qB\n\tzax29RXF8SnNI/F+mZnu0n/sQ4Caau0hrijzxp+aSus+74OqAEReHQaCqwT8lyN+aOqU\n\tqtPt28IVxXoLPiExC6DXQ1t1Bbk6dtrpw5t7WLumjgFTu9ddI39KNZeZ1JTeGEg7WxIC\n\t3AxQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1781785396; x=1782390196;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=plXVRNtI9PlRM1WZ1wJrleCdMifWh3iZlB+O97cPEp0=;\n\tb=Isz97a583V7+oTzwjIwLctEtSAApXfQQV23v8Aai07Y5ATLNKoej/NtKb+k/rXNr0S\n\tbzdWYqDKNnRuypVEgdmcL66dRbpSBdHiEcCcR1uU1W/ODyhGEH3Rc+FHnOv7JweYGj0i\n\t4gcUaKT3a5nCXmLCk/pCgRP0PTywc52+lr+YOIZtA7ht0tQEXUmdgDCC1YfGNULF7Zs2\n\t3ZjlfBr8gAXQgK00Ql9+cCUKS+GoYt2/PDpxksHTD07vDT5MMp/j49XHUfZVbND9Y1Du\n\tU8SVIyWhvoOUDDYse8jY2gBZr67/D7cTKBhoLFsNNKlyp52koGm6gmS3DIwhLVSUM6FR\n\t0WwA==", "X-Gm-Message-State": "AOJu0YyS0/f4JjFsaojkCc5x5mfrzBynddEiMVflq5SYvMTZvGRlIjO3\n\tYMk/Ov6ScfxhvGpzSkEjAr1zbpgF2+wa/XIfxDVRs1zk4NP2B2L2wH5PGlilMuSu4yzZC58jHDS\n\tCqJtuji8=", "X-Gm-Gg": "AfdE7ckaJMIKnw2MpxrSuE45O6xGyIElIQHKU+sed95f0ibAgMUqMpjZMcPY/L4jJ76\n\tOkAB+va14yPe1VxIGbZkXI3EQ17YhJ69TytybhnfK4PNt88WzS0O/C8eFlb6Zr+k4LSlttiSmPk\n\tkDEjgWa1+bm4GmRJGWJImnaf0FfcsazSuUyGnIDpv+00IrweuOy//I/AbbSGA1dqQsZthCRUEwn\n\tEdo9YDYYn2+aSBKFYain3Xw9lHuAJ13WU9FB5/qVCtXB5+iBhfOwMsnsxXW2HsycXhXaL9smzBd\n\tVi7415AFBLg7qwfE2a0apkkdA3W91ZlREqzgWAGFlhyRE4CTNnIwL666WhofdHNMtKUuikvbnjo\n\t1xaMqY0XZyFO3hCzRjyUWOsDET6dxGh5ixYqG8PNOOZVudDr37FyTgdHcqa/gBID7Nzp3Iz97vB\n\tNgkFWBhaFtxb/6p5tLhoq9Xjax6XoQ", "X-Received": "by 2002:a05:600c:c171:b0:490:9df1:f0d5 with SMTP id\n\t5b1f17b1804b1-4923a9eac1emr29179725e9.28.1781785395976; \n\tThu, 18 Jun 2026 05:23:15 -0700 (PDT)", "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "bryan.odonoghue@linaro.org,\n\tpavel@ucw.cz", "Subject": "[PATCH 24/30] libcamera: software_isp: egl: Add eglBenchMark", "Date": "Thu, 18 Jun 2026 13:22:37 +0100", "Message-ID": "<20260618122245.946138-25-bryan.odonoghue@linaro.org>", "X-Mailer": "git-send-email 2.54.0", "In-Reply-To": "<20260618122245.946138-1-bryan.odonoghue@linaro.org>", "References": "<20260618122245.946138-1-bryan.odonoghue@linaro.org>", "MIME-Version": "1.0", "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": "Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n include/libcamera/internal/egl.h | 52 ++++++++++++++++++++++++++++++++\n 1 file changed, 52 insertions(+)", "diff": "diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h\nindex 0e57678e8..8f905416a 100644\n--- a/include/libcamera/internal/egl.h\n+++ b/include/libcamera/internal/egl.h\n@@ -127,6 +127,8 @@ public:\n \tvoid syncOutput();\n \tvoid flushOutput();\n \n+\tfriend class eGLBenchMark;\n+\n private:\n \tLIBCAMERA_DISABLE_COPY_AND_MOVE(eGL)\n \n@@ -152,4 +154,54 @@ private:\n \tPFNGLGETQUERYOBJECTUIVPROC glGetQueryObjectui64v;\n \tPFNGLGENQUERIESPROC glGenQueries;\n };\n+\n+class eGLBenchMark {\n+public:\n+\teGLBenchMark() {}\n+\t~eGLBenchMark() {}\n+\n+\tvoid init(void)\n+\t{\n+\t\tglGenQueries(1, &glQueryTimeId_); \n+\t}\n+\n+\tvoid begin(eGL &egl)\n+\t{\n+\t\tegl.glBeginQuery(GL_TIME_ELAPSED_EXT, glQueryTimeId_);\n+\t}\n+\n+\tvoid end(eGL &egl)\n+\t{\n+\t\tegl.glEndQuery(GL_TIME_ELAPSED_EXT);\n+\t}\n+\n+\tGLuint64 getTimeElapsedSync(eGL &egl)\n+\t{\n+\t\t// Caution sync will wait until result is available\n+\t\treturn getTimeElapsed(egl, true);\n+\t}\n+\n+\tGLuint64 getTimeElapsedAsync(eGL &egl)\n+\t{\n+\t\treturn getTimeElapsed(egl, false);\n+\t}\n+\n+private:\n+\tGLuint glQueryTimeId_;\n+\n+\tGLuint64 getTimeElapsed(eGL &egl, bool sync)\n+\t{\n+\t\tGLuint time_elapsed_ns = 0;\n+\t\tGLuint available = 0;\n+\n+\t\tif (!sync)\n+\t\t\tegl.glGetQueryObjectuiv(glQueryTimeId_, GL_QUERY_RESULT_AVAILABLE, &available);\n+\n+\t\tif (available || sync)\n+\t\t\tegl.glGetQueryObjectui64v(glQueryTimeId_, GL_QUERY_RESULT, &time_elapsed_ns);\n+\n+\t\treturn time_elapsed_ns;\n+\t}\n+};\n+\n } //namespace libcamera\n", "prefixes": [ "24/30" ] }