Patch Detail
Show a patch.
GET /api/1.1/patches/17759/?format=api
{ "id": 17759, "url": "https://patchwork.libcamera.org/api/1.1/patches/17759/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17759/", "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": "<20221109104940.5799-1-david.plowman@raspberrypi.com>", "date": "2022-11-09T10:49:40", "name": "[libcamera-devel,v2] Revert \"pipeline: raspberrypi: Do not unconditionally free buffers on close\"", "commit_ref": "75e7befb1667f620410f0f15a10eccb32d7df66d", "pull_url": null, "state": "accepted", "archived": false, "hash": "e8760fe422a3538f2b09802b016bcc4c7f6a132f", "submitter": { "id": 42, "url": "https://patchwork.libcamera.org/api/1.1/people/42/?format=api", "name": "David Plowman", "email": "david.plowman@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/17759/mbox/", "series": [ { "id": 3598, "url": "https://patchwork.libcamera.org/api/1.1/series/3598/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3598", "date": "2022-11-09T10:49:40", "name": "[libcamera-devel,v2] Revert \"pipeline: raspberrypi: Do not unconditionally free buffers on close\"", "version": 2, "mbox": "https://patchwork.libcamera.org/series/3598/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17759/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17759/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 50CEABD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 9 Nov 2022 10:49:47 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DC60D6307E;\n\tWed, 9 Nov 2022 11:49:46 +0100 (CET)", "from mail-wm1-x335.google.com (mail-wm1-x335.google.com\n\t[IPv6:2a00:1450:4864:20::335])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2BF5C61F3F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 9 Nov 2022 11:49:45 +0100 (CET)", "by mail-wm1-x335.google.com with SMTP id\n\ta11-20020a05600c2d4b00b003cf6f5fd9f1so987630wmg.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 09 Nov 2022 02:49:45 -0800 (PST)", "from pi4-davidp.pitowers.org\n\t([2a00:1098:3142:14:e4a2:3070:eea4:e434])\n\tby smtp.gmail.com with ESMTPSA id\n\ts25-20020adfa299000000b00236b2804d79sm13238702wra.2.2022.11.09.02.49.43\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 09 Nov 2022 02:49:43 -0800 (PST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1667990986;\n\tbh=jPElKgrSeQI8WHz/23Dasw/F9Cj2KvpZPYZUsHs0eUM=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=qFb7DXZ1ehJrUeGiy17rkYQq/gkX7IPoIfsBXruk9GMu5VkdX5+5p9Gf+fs4wQGBA\n\tpeNTn1R03LZSbzPDxlZSIJ9F3L9GGLI4A0cko6iiTt0Wocxr3EJCWrbKfF5CbDoXf9\n\tlGSuv6cVw12UzYQgkj8/nHsGPn3ClzB6zOSzT20q20w3enjehkkZQ2g7E/2usrem9v\n\tbsVWoIXpT4b++V2mZCSX3z6RBgiTLRsrU0gec86EeSA+Ze9xjocWhPn8rF2ZA4EMjo\n\tUKUE1IUO+DFE9jWnCmPeI+gpLISvCoHlRUDFQRlwmdmk7xVcczOal+r6UnLZMa1BUy\n\tgFuOpIENMsGPw==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=Zkbneysl50+6H5ecz6pXD+0/peJgnlv9umq9jlDMpQQ=;\n\tb=e8+N0y7AMgdLH4IiWJQUKhPMWWkhEeurTq/8Y2RPKGFK1Hhk9KIr2a0eAuC/tJDrT9\n\t6xC3km05mE4VjYXZeKFKlcUk7TMwNmCXycLp+n5SMD0UNMKH8XzwCplvBr0odSap/93B\n\tgb7sMIAFLbJzcug6Ttll6Z+Z3dV94gPF9Ms5HaEAIp3W6ODkbeTXGGHfYDEUtVOh146t\n\tmQn9A7hwlGgd4jVF0M9/SWHybKRWhB67/ir7Pi+qpJOmx9mKKUW7e44+x1ulH9Yruhxu\n\t+PFcSJ6fNRneEE+SeHLIm4p7DstuO0Gvo2KsMCXZGVb09eipvSOSlLqynRb6scXJGz4P\n\t1FKA==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"e8+N0y7A\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=Zkbneysl50+6H5ecz6pXD+0/peJgnlv9umq9jlDMpQQ=;\n\tb=RSx/y9k5hIm6ECgEtMb8UYzmQ4/1mdKkKk9TBsL/5k2mgoIx+cUnSCa7ziEQEC7cNL\n\tufPpJpiVK2lr59RjnusP/R+ZgUJS1TlG14zbe9VZzgYyZY4JHGbf0mmicfYnSrpHJfpr\n\t3Xy9Ya1IN6Mn63QE6Gzqwy/H9gPaJxuWVnNis3JB1oCaQn/V133lUHkQFzCUH3PGetwj\n\tOXKDCDmhgs6gnA9CEyyKH98YVkO8SGQw5HT/e4lDYlDMim0ShQc7oX8yYxPkCMOPeRZ8\n\tVDt6uGzCRCyYLDLuNkisx8yMVUOhGSeehXj6a7KIP+REwULCm0KR17U2reOsgi/2uEAr\n\twOhQ==", "X-Gm-Message-State": "ACrzQf296L5dv0XXYaUpsHTM2iUwbbCao+zEhjS6K3jCIwO12ot+yEHo\n\tn7RpbyhpeniwT60lQNdUPSNTjMUe037H9g==", "X-Google-Smtp-Source": "AMsMyM7ioJTOsNF3NXfM2IKgbg/wXHH9cB8mqlrcoApi5v9L7t6zGZFWJ9RdZjie0a4mfQ87a0OJaw==", "X-Received": "by 2002:a7b:c30c:0:b0:3c6:f26a:590f with SMTP id\n\tk12-20020a7bc30c000000b003c6f26a590fmr40082821wmj.205.1667990984408; \n\tWed, 09 Nov 2022 02:49:44 -0800 (PST)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 9 Nov 2022 10:49:40 +0000", "Message-Id": "<20221109104940.5799-1-david.plowman@raspberrypi.com>", "X-Mailer": "git-send-email 2.30.2", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2] Revert \"pipeline: raspberrypi: Do not\n\tunconditionally free buffers on close\"", "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>", "From": "David Plowman via libcamera-devel <libcamera-devel@lists.libcamera.org>", "Reply-To": "David Plowman <david.plowman@raspberrypi.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "This reverts commit 30d704732badc675f72fe73d14749669cb645c23.\n\nIt turns out that this commit causes some regressions and is in fact\nunnecessary because the related commit \"libcamera: v4l2_videodevice:\nGuard against releasing unallocated buffers\"\n(a2bdff6d0b67475492ac7cf9318866b6d89a28fd) fixes the problem\ncompletely (if the buffers were never allocated, the video device\navoids trying to free them even if the pipeline handler asks).\n\nThe reason for the regressions is that in this new (broken) scheme we\nwould never call clearBuffers() on all the streams if the internal\nbuffers were never allocated (i.e. buffersAllocated_ is never\nset). This causes the stream's bufferMap_ list to get longer and\nlonger if there are multiple back-to-back calls to configure, and\ndev_->importBuffers() will ultimately to fail.\n\nSo either we need to think more carefully about how to stop the\npipeline handler from freeing buffers that it doesn't own, or we just\nleave it as the other commit resolves the problem on its own. In the\ninterim, simply reverting this commit certainly seems like the best\nsolution.\n\nFixes: 30d704732bad (\"pipeline: raspberrypi: Do not unconditionally free buffers on close\")\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 3 ---\n 1 file changed, 3 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 1b599fcc..343f8cb2 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -1506,9 +1506,6 @@ void PipelineHandlerRPi::mapBuffers(Camera *camera, const RPi::BufferMap &buffer\n \n void RPiCameraData::freeBuffers()\n {\n-\tif (!buffersAllocated_)\n-\t\treturn;\n-\n \tif (ipa_) {\n \t\t/*\n \t\t * Copy the buffer ids from the unordered_set to a vector to\n", "prefixes": [ "libcamera-devel", "v2" ] }