Show a patch.

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

{
    "id": 15427,
    "url": "https://patchwork.libcamera.org/api/patches/15427/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15427/",
    "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": "<20220307124633.115452-3-naush@raspberrypi.com>",
    "date": "2022-03-07T12:46:29",
    "name": "[libcamera-devel,v1,2/6] pipeline: raspberrypi: Move freeBuffers() to the RPiCameraData class",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "5a053ac4811b935215fbbd3ef00542e1bd811547",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/15427/mbox/",
    "series": [
        {
            "id": 2954,
            "url": "https://patchwork.libcamera.org/api/series/2954/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2954",
            "date": "2022-03-07T12:46:27",
            "name": "Raspberry Pi: Efficient start/stop/start sequences",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/2954/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/15427/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15427/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\r\n\t[92.243.16.209])\r\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 1520ABF415\r\n\tfor <parsemail@patchwork.libcamera.org>;\r\n\tMon,  7 Mar 2022 12:46:44 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\r\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F1DAB6118F;\r\n\tMon,  7 Mar 2022 13:46:42 +0100 (CET)",
            "from mail-wm1-x334.google.com (mail-wm1-x334.google.com\r\n\t[IPv6:2a00:1450:4864:20::334])\r\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9303561184\r\n\tfor <libcamera-devel@lists.libcamera.org>;\r\n\tMon,  7 Mar 2022 13:46:40 +0100 (CET)",
            "by mail-wm1-x334.google.com with SMTP id\r\n\to18-20020a05600c4fd200b003826701f847so10674901wmq.4\r\n\tfor <libcamera-devel@lists.libcamera.org>;\r\n\tMon, 07 Mar 2022 04:46:40 -0800 (PST)",
            "from naush-laptop.pitowers.org\r\n\t([2a00:1098:3142:14:c644:e9b3:de0b:54c5])\r\n\tby smtp.gmail.com with ESMTPSA id\r\n\tz6-20020a1cf406000000b0037c4e2d3baesm19759582wma.19.2022.03.07.04.46.39\r\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\r\n\tMon, 07 Mar 2022 04:46:39 -0800 (PST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\r\n\ts=mail; t=1646657203;\r\n\tbh=FyyHGeWhlB5LY2jQX1WYbJUW6Xuvj0MggkhDKWIoB/4=;\r\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\r\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\r\n\tFrom;\r\n\tb=KcpoggUDAC6RUHKsC42UXx4atXB6guIh/GHf/FEwBX2aBDZQ3GFJtEQjscnRRLpTx\r\n\tLyAzNtUzkRnLXFMhHRiukruU4ntmjiprQdwemS/WGRewSe4vCW2MkW63QZlLVQ29ot\r\n\tm2G5h3w6+aaBYDYI53ZEw4NZupdTG9vyiAJd3nV9sx9kbrBgAJYXeJOcJyqExDPp4i\r\n\tl6LYS4hft5XxR8+GcP7zwLRpWfeyMWOru9YsL+98IRJfCz2ZeUfmeU1k3DHrYpHJvZ\r\n\tzRWv14B4cMOtwdU2ltDTwIm1i8KVmid8QSEzhknRqIbsMnxFFeHDDRB+4Z5IyZGakP\r\n\td5SmBi3+hwsUw==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\r\n\td=raspberrypi.com; s=google;\r\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\r\n\t:mime-version:content-transfer-encoding;\r\n\tbh=wi8Ibf1/9HKLHB0vE2sv4ocKlb9cP2TxaZ7cUSBfnZw=;\r\n\tb=UwPGii3NnV5tIrttOPYx+AEtOzGE77qpv25+yKHBmsXQ1CjwoOCTW5B7rTeZugbX9k\r\n\tS6mthUZHSjTBLTM/hqER6kwvZX9MUNBtOZ21PAhUTw3ar9blBp1W+YLjQ5ic1k/axWBi\r\n\tad6qp2Igi3SsldVhvOpWUpLiuTejcTxOMVqRZzy4VR4DA3mGrfuQIS3EVEeDWDmT5ZOQ\r\n\tLOHjsi6fsQAVD3uEJm5BXOWLIXyGC45Zn15T1DO3EAD+spLueY1oBSIranD8oL2keHdC\r\n\tSZGy5fDe/8CcazZeiOvqWW85iXNSza1zrEl6stQDWo5amOVy73tiETfN7DwErmM4qj5d\r\n\tC1/w=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \r\n\tunprotected) header.d=raspberrypi.com\r\n\theader.i=@raspberrypi.com\r\n\theader.b=\"UwPGii3N\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\r\n\td=1e100.net; s=20210112;\r\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r\n\t:references:mime-version:content-transfer-encoding;\r\n\tbh=wi8Ibf1/9HKLHB0vE2sv4ocKlb9cP2TxaZ7cUSBfnZw=;\r\n\tb=0LFzA5XVa6bOCMn/9EDyahhIotErm5VkH2OW1W/mucGnbO0RZjP1acgkQ6PDslf7nt\r\n\tkDi2KT8HDDsh6sZqOPNp8eez6t4If+iPCqinf2EGTks6sgGJ5FZi2JyicPaXm6nIrzzh\r\n\tfrxStKLyEai0Urw8P8sgLk81yUT0JvnUsswjfBj006oiWMcHgOaGnhhe+jd1lj136R2b\r\n\tBjjWmGk2IoY19R6NDM7cbGpGla+92IiTrruuP5PW0HuQv0fJubAHCZBf9fuwThH2Ez7J\r\n\tWQ0bfx2r9VEGsQszOoiAXtbxT4DLn+NNrmZHgXAh/OptVSLLcCgt8qB47QBWOqki2346\r\n\tSuOg==",
        "X-Gm-Message-State": "AOAM532BBthX5wDaO6iStkWAusI1fMDkATptWd8Y2V00n4v1N5OnHi/0\r\n\t2yFJMu2hR67vsd05XaN1jhqaSVSonkF9aQ==",
        "X-Google-Smtp-Source": "ABdhPJw0GUBTMoWa6Yb1gGqo5NQ/JHcK1KojjzJd7sW4APXGdPexncv0HerYDqXQzbXgbqv7E8HUoQ==",
        "X-Received": "by 2002:a7b:cc8f:0:b0:389:844e:9e28 with SMTP id\r\n\tp15-20020a7bcc8f000000b00389844e9e28mr8769874wma.67.1646657200025; \r\n\tMon, 07 Mar 2022 04:46:40 -0800 (PST)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon,  7 Mar 2022 12:46:29 +0000",
        "Message-Id": "<20220307124633.115452-3-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220307124633.115452-1-naush@raspberrypi.com>",
        "References": "<20220307124633.115452-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v1 2/6] pipeline: raspberrypi: Move\r\n\tfreeBuffers() to the RPiCameraData class",
        "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>,\r\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>,\r\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "From": "Naushir Patuck via libcamera-devel\r\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Naushir Patuck <naush@raspberrypi.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "This function used to clear the camera buffers does not belong in the\nPipelineHandlerRPi class as it only access members of the RPiCameraData,\nso move it.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n .../pipeline/raspberrypi/raspberrypi.cpp         | 16 +++++++---------\n 1 file changed, 7 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\r\nindex d604c473c26c..3781e4e0e3c4 100644\r\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\r\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\r\n@@ -189,6 +189,7 @@ public:\r\n \t{\r\n \t}\r\n \r\n+\tvoid freeBuffers();\r\n \tvoid frameStarted(uint32_t sequence);\r\n \r\n \tint loadIPA(ipa::RPi::SensorConfig *sensorConfig);\r\n@@ -329,7 +330,6 @@ private:\r\n \tint registerCamera(MediaDevice *unicam, MediaDevice *isp, MediaEntity *sensorEntity);\r\n \tint queueAllBuffers(Camera *camera);\r\n \tint prepareBuffers(Camera *camera);\r\n-\tvoid freeBuffers(Camera *camera);\r\n \tvoid mapBuffers(Camera *camera, const RPi::BufferMap &buffers, unsigned int mask);\r\n };\r\n \r\n@@ -1049,7 +1049,7 @@ void PipelineHandlerRPi::stopDevice(Camera *camera)\r\n \t/* Stop the IPA. */\r\n \tdata->ipa_->stop();\r\n \r\n-\tfreeBuffers(camera);\r\n+\tdata->freeBuffers();\r\n }\r\n \r\n int PipelineHandlerRPi::queueRequestDevice(Camera *camera, Request *request)\r\n@@ -1445,16 +1445,14 @@ void PipelineHandlerRPi::mapBuffers(Camera *camera, const RPi::BufferMap &buffer\r\n \tdata->ipa_->mapBuffers(ipaBuffers);\r\n }\r\n \r\n-void PipelineHandlerRPi::freeBuffers(Camera *camera)\r\n+void RPiCameraData::freeBuffers()\r\n {\r\n-\tRPiCameraData *data = cameraData(camera);\r\n-\r\n \t/* Copy the buffer ids from the unordered_set to a vector to pass to the IPA. */\r\n-\tstd::vector<unsigned int> ipaBuffers(data->ipaBuffers_.begin(), data->ipaBuffers_.end());\r\n-\tdata->ipa_->unmapBuffers(ipaBuffers);\r\n-\tdata->ipaBuffers_.clear();\r\n+\tstd::vector<unsigned int> ipaBuffers(ipaBuffers_.begin(), ipaBuffers_.end());\r\n+\tipa_->unmapBuffers(ipaBuffers);\r\n+\tipaBuffers_.clear();\r\n \r\n-\tfor (auto const stream : data->streams_)\r\n+\tfor (auto const stream : streams_)\r\n \t\tstream->releaseBuffers();\r\n }",
    "prefixes": [
        "libcamera-devel",
        "v1",
        "2/6"
    ]
}