Patch Detail
Show a patch.
GET /api/1.1/patches/20785/?format=api
{ "id": 20785, "url": "https://patchwork.libcamera.org/api/1.1/patches/20785/?format=api", "web_url": "https://patchwork.libcamera.org/patch/20785/", "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": "<20240805135104.139932-9-chenghaoyang@google.com>", "date": "2024-08-05T13:48:39", "name": "[v8,8/8] libcamera: software_isp: Refactor SoftwareIsp to use DmaBufAllocator::exportBuffers", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "b43e265088171ec39c9e3c6cba0044ce97b61646", "submitter": { "id": 117, "url": "https://patchwork.libcamera.org/api/1.1/people/117/?format=api", "name": "Cheng-Hao Yang", "email": "chenghaoyang@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/20785/mbox/", "series": [ { "id": 4487, "url": "https://patchwork.libcamera.org/api/1.1/series/4487/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4487", "date": "2024-08-05T13:48:31", "name": "Add VirtualPipelineHandler", "version": 8, "mbox": "https://patchwork.libcamera.org/series/4487/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/20785/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/20785/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 23129BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 5 Aug 2024 13:51:27 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 659D86338B;\n\tMon, 5 Aug 2024 15:51:26 +0200 (CEST)", "from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com\n\t[IPv6:2a00:1450:4864:20::32e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 44D9763393\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 5 Aug 2024 15:51:11 +0200 (CEST)", "by mail-wm1-x32e.google.com with SMTP id\n\t5b1f17b1804b1-4281faefea9so60109815e9.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 05 Aug 2024 06:51:11 -0700 (PDT)", "from chenghaoyang-germany.c.googlers.com.com\n\t(49.222.77.34.bc.googleusercontent.com. [34.77.222.49])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-428e8d6555fsm137146675e9.26.2024.08.05.06.51.09\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 05 Aug 2024 06:51:10 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"VzEQ7AXP\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google; t=1722865870; x=1723470670;\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=J7IKhIlglq5fF7Qqiclshc+16FynHBayTS4RmODBsG4=;\n\tb=VzEQ7AXPQwrqRzj3zRGV+Bb6WcSoK9E91H35cDiI6Bt09SjYQJYJDktcei+CcCmKdF\n\tzRU2RFACeZ6s0/yJUXAvmSCyd+CcBCHvloHww58VP3e8JRY64mCXsKGCaXZjbYbey5R3\n\tX5T+KiFyGpIDDpkBzkiWWO2sBoq9rnhrxZUsk=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1722865870; x=1723470670;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=J7IKhIlglq5fF7Qqiclshc+16FynHBayTS4RmODBsG4=;\n\tb=MoYyHOfpp6y0mKsZgkXj/Xci2jw0DA/fuLk+TIvBiET83qOTqdgk8G5tczfsRf/Jqk\n\tVg3XYBpR0SuqNpiIV8Qe7i9y5ZbNK3dLQxrK59PTNYP+8hdVOfSYnioQipiWkiJ+uq6c\n\t0Did8yB/q6upn/u8aRWPuoOFTnUovaX49qHI8bwCcV/AQcGoLAJEv6qIj+IehSxl7XGB\n\tEExxEvAzkCwgM8k7z8OxF+/pB6Ka0/vEP/yqIlZeiSqeh7pWIEzPKPLsAA4z9sSDrDVv\n\tA/2qzP42UXDsaPYXgAYSZO1lDvKReae9pbYw1SrvbLp8aQtDbPrAZ6TP8DoNVCdTMts7\n\t5jtQ==", "X-Gm-Message-State": "AOJu0YwuZ5OdOgPZpXiLwqIYRrh/+IxWVNJn+0aMhrvY32kf6TX236wd\n\tyKzM9tvCUIv1KTWcPlBPqGuozSVu4Zok3l1eyxTtwHhSutFuTQd37mwHb2AImP3Bz6/kJgn5R6I\n\tf5c/UV+A=", "X-Google-Smtp-Source": "AGHT+IG1F+T6ylHDWzslnfgfAb31rW2OIpk+c/uowHVHGW+hAghORSlcgB97cpGAQ5rQGKu6OMjRKg==", "X-Received": "by 2002:a05:600c:1546:b0:426:5f0b:a49b with SMTP id\n\t5b1f17b1804b1-428e6b7c1aemr87442205e9.23.1722865870522; \n\tMon, 05 Aug 2024 06:51:10 -0700 (PDT)", "From": "Harvey Yang <chenghaoyang@chromium.org>", "X-Google-Original-From": "Harvey Yang <chenghaoyang@google.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Harvey Yang <chenghaoyang@google.com>,\n\tHarvey Yang <chenghaoyang@chromium.org>", "Subject": "[PATCH v8 8/8] libcamera: software_isp: Refactor SoftwareIsp to use\n\tDmaBufAllocator::exportBuffers", "Date": "Mon, 5 Aug 2024 13:48:39 +0000", "Message-ID": "<20240805135104.139932-9-chenghaoyang@google.com>", "X-Mailer": "git-send-email 2.46.0.rc2.264.g509ed76dc8-goog", "In-Reply-To": "<20240805135104.139932-1-chenghaoyang@google.com>", "References": "<20240805135104.139932-1-chenghaoyang@google.com>", "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": "As the helper function DmaBufAllocator::exportBuffers is added, we can\navoid some code duplication in SoftwareIsp as well.\n\nSigned-off-by: Harvey Yang <chenghaoyang@chromium.org>\n---\n src/libcamera/software_isp/software_isp.cpp | 18 +-----------------\n 1 file changed, 1 insertion(+), 17 deletions(-)", "diff": "diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp\nindex c8748d88..5240eb3f 100644\n--- a/src/libcamera/software_isp/software_isp.cpp\n+++ b/src/libcamera/software_isp/software_isp.cpp\n@@ -256,23 +256,7 @@ int SoftwareIsp::exportBuffers(const Stream *stream, unsigned int count,\n \tif (stream == nullptr)\n \t\treturn -EINVAL;\n \n-\tfor (unsigned int i = 0; i < count; i++) {\n-\t\tconst std::string name = \"frame-\" + std::to_string(i);\n-\t\tconst size_t frameSize = debayer_->frameSize();\n-\n-\t\tFrameBuffer::Plane outPlane;\n-\t\toutPlane.fd = SharedFD(dmaHeap_.alloc(name.c_str(), frameSize));\n-\t\tif (!outPlane.fd.isValid()) {\n-\t\t\tLOG(SoftwareIsp, Error)\n-\t\t\t\t<< \"failed to allocate a dma_buf\";\n-\t\t\treturn -ENOMEM;\n-\t\t}\n-\t\toutPlane.offset = 0;\n-\t\toutPlane.length = frameSize;\n-\n-\t\tstd::vector<FrameBuffer::Plane> planes{ outPlane };\n-\t\tbuffers->emplace_back(std::make_unique<FrameBuffer>(std::move(planes)));\n-\t}\n+\tdmaHeap_.exportBuffers(count, { debayer_->frameSize() }, buffers);\n \n \treturn count;\n }\n", "prefixes": [ "v8", "8/8" ] }