Patch Detail
Show a patch.
GET /api/1.1/patches/21509/?format=api
{ "id": 21509, "url": "https://patchwork.libcamera.org/api/1.1/patches/21509/?format=api", "web_url": "https://patchwork.libcamera.org/patch/21509/", "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": "<20241004095946.264537-8-chenghaoyang@google.com>", "date": "2024-10-04T09:59:20", "name": "[15,7/7] libcamera: software_isp: Refactor SoftwareIsp to use DmaBufAllocator::exportBuffers", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "5f98528d63df8d5fec95e0c9da3bdff582bbd04e", "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/21509/mbox/", "series": [ { "id": 4656, "url": "https://patchwork.libcamera.org/api/1.1/series/4656/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4656", "date": "2024-10-04T09:59:14", "name": "[15,1/7] libcamera: add DmaBufAllocator::exportBuffers()", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4656/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/21509/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/21509/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 C67B1C3263\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 4 Oct 2024 10:00:17 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C341163532;\n\tFri, 4 Oct 2024 12:00:16 +0200 (CEST)", "from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com\n\t[IPv6:2607:f8b0:4864:20::42c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B468065365\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 4 Oct 2024 12:00:05 +0200 (CEST)", "by mail-pf1-x42c.google.com with SMTP id\n\td2e1a72fcca58-71957eb256bso1735957b3a.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 04 Oct 2024 03:00:05 -0700 (PDT)", "from chenghaoyang-low.c.googlers.com.com\n\t(27.247.221.35.bc.googleusercontent.com. [35.221.247.27])\n\tby smtp.gmail.com with ESMTPSA id\n\td2e1a72fcca58-71ded2ad931sm316911b3a.41.2024.10.04.03.00.01\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 04 Oct 2024 03:00:03 -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=\"is5ll8ZR\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google; t=1728036004; x=1728640804;\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=7oxGveuNcRHzMqD3QAv03hUxkHXc5hzggXnXt3vxi9U=;\n\tb=is5ll8ZRtrAWWJZFQjWMx5GfbdbbmoqdvKqXfTFt5ErWVpQFo/8+bRmYKBreLiShLl\n\tWsjbpCojqpCAWDXi0pjQyKiOZCFEIKdIOMO+JhAGlY6tnC68NjFJrGbEyDQq9TRgBw9v\n\tmrw7e+EjDdSC6vLfi9tQdj0w1MpDhOobZuZd0=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1728036004; x=1728640804;\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=7oxGveuNcRHzMqD3QAv03hUxkHXc5hzggXnXt3vxi9U=;\n\tb=oGxZaeTklu3z5+8Rc1VFu4ZFmDmxORL99gVzX0IYrkVNebb3g2jyUb/YOMJaEf5LyX\n\tfkpmoLI8t75I55v+Ny+at/2RtYz23CzsDs1sN/mTqSeyLTgnrIM8WXjZZ+wc3BX3aKhE\n\tC1Yo1D0ohnbkkTz+6FZdgMm+DmzcMSd8pJrNNqWHgkk8bhGkf7u9p29vKLITt4ldh7tD\n\ttcUZE96IPLRlGxSe/nWUI7tYnvQUpiq2j6wgIzYq1vKx52dfvQ1omkkwqt8K+nsvzVYw\n\t/8shO3mI6ccr1PpjctvFXl5Ou9RW68lfKgGMFvMmWTV+OHYVjTw+F7T44/giTUcA107D\n\tf4SQ==", "X-Gm-Message-State": "AOJu0YxRUCVYVhYvcFd4pYEk43hDWu2jWDPm1My/cgYb4yZyirReBCFK\n\tlFXKVAivrFBrZOARpcsYIF/6MfPtEp+E3K4gvawGIepziasrdxg3apHon5EEcA3bmwBmZiWBJjO\n\tCSA==", "X-Google-Smtp-Source": "AGHT+IE/QAeFepXHyLksF+1w/7Ao0UB453htpLXPllqzyD+nIPErNIP5r5mU6wiZ06csS63ODlNhcA==", "X-Received": "by 2002:a05:6a00:c94:b0:71d:d1b4:b454 with SMTP id\n\td2e1a72fcca58-71de23a95bemr3084145b3a.2.1728036003508; \n\tFri, 04 Oct 2024 03:00:03 -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>,\n\tMilan Zamazal <mzamazal@redhat.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>", "Subject": "[PATCH 15 7/7] libcamera: software_isp: Refactor SoftwareIsp to use\n\tDmaBufAllocator::exportBuffers", "Date": "Fri, 4 Oct 2024 09:59:20 +0000", "Message-ID": "<20241004095946.264537-8-chenghaoyang@google.com>", "X-Mailer": "git-send-email 2.47.0.rc0.187.ge670bccf7e-goog", "In-Reply-To": "<20241004095946.264537-1-chenghaoyang@google.com>", "References": "<20241004095946.264537-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>\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/libcamera/software_isp/software_isp.cpp | 20 +-------------------\n 1 file changed, 1 insertion(+), 19 deletions(-)", "diff": "diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp\nindex 47677784d..5f58e5e40 100644\n--- a/src/libcamera/software_isp/software_isp.cpp\n+++ b/src/libcamera/software_isp/software_isp.cpp\n@@ -256,25 +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-\n-\treturn count;\n+\treturn dmaHeap_.exportBuffers(count, { debayer_->frameSize() }, buffers);\n }\n \n /**\n", "prefixes": [ "15", "7/7" ] }