Show a patch.

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

{
    "id": 19839,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/19839/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/19839/",
    "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": "<20240404101818.21484-1-jacopo.mondi@ideasonboard.com>",
    "date": "2024-04-04T10:18:14",
    "name": "android: camera_device: Always clear descriptors_ in stop()",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "215b2e01b6f57176ec251498f6ccf97ae08e7e42",
    "submitter": {
        "id": 143,
        "url": "https://patchwork.libcamera.org/api/1.1/people/143/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo.mondi@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/19839/mbox/",
    "series": [
        {
            "id": 4247,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4247/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4247",
            "date": "2024-04-04T10:18:14",
            "name": "android: camera_device: Always clear descriptors_ in stop()",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4247/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/19839/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/19839/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 CF754BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  4 Apr 2024 10:18:38 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0FA1B6337D;\n\tThu,  4 Apr 2024 12:18:38 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EDD8C63339\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  4 Apr 2024 12:18:36 +0200 (CEST)",
            "from localhost.localdomain (unknown\n\t[IPv6:2001:b07:5d2e:52c9:cc1e:e404:491f:e6ea])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EE05F1A2;\n\tThu,  4 Apr 2024 12:17:58 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"rR0Lg7SW\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1712225879;\n\tbh=8+RThJFYSLZ4+ulflUpxfmY4nyVnJni7WzofqivoEJs=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=rR0Lg7SW1268Owhg1ny4lk65wsH1SW93YPSzHw7NCN5nW2k2Ii9CLHcNWcJ00pBjU\n\t2A97OU41vOJsYbPebKPfbMzI1l/DLPhEm0lw7ahAdL2Xd2Kb5QJgIObLo3ONkjaBpp\n\tWCJlesN3DxDTgUHmf/KC1422TG8j8OMHxye3Uqyg=",
        "From": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Anle Pan <anle.pan@nxp.com>, Umang Jain <umang.jain@ideasonboard.com>,\n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>",
        "Subject": "[PATCH] android: camera_device: Always clear descriptors_ in stop()",
        "Date": "Thu,  4 Apr 2024 12:18:14 +0200",
        "Message-ID": "<20240404101818.21484-1-jacopo.mondi@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.44.0",
        "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": "From: Anle Pan <anle.pan@nxp.com>\n\nWhen flush() is called and then a new stream configuration is set, the\ndescriptors_ queue might have a chance to be not cleared in stop(), as\nthe Camera is already in Stopped state.\n\nThis will prevent further requests from being completed in\nsendCaptureResults() as the descriptors_ queue is not empty.\n\nTo fix the issue, clear the descriptors_ even if the Camera State is\nStopped. As a drawback the libcamera::Camera::stop() function might be\ncalled twice, but this is allowed by the Camera state machine, and the\nsecond call is guaranteed to be a nop.\n\nSigned-off-by: Anle Pan <anle.pan@nxp.com>\nSigned-off-by: Fang Hui <hui.fang@nxp.com>\nTested-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n\nCTS shows no regressions compared to v0.2.0\n\n---\n src/android/camera_device.cpp | 2 --\n 1 file changed, 2 deletions(-)\n\n--\n2.44.0",
    "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex d2679a9722e2..1b6f3f3a2b29 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -433,8 +433,6 @@ void CameraDevice::flush()\n void CameraDevice::stop()\n {\n \tMutexLocker stateLock(stateMutex_);\n-\tif (state_ == State::Stopped)\n-\t\treturn;\n\n \tcamera_->stop();\n\n",
    "prefixes": []
}