Show a patch.

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

{
    "id": 13183,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/13183/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/13183/",
    "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": "<20210803140237.19302-2-umang.jain@ideasonboard.com>",
    "date": "2021-08-03T14:02:34",
    "name": "[libcamera-devel,v4,1/4] android: Instantiate CameraDevice after checking HAL config validity",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "78ccd24f9ef67b63d838427f2a45e5e6fbfeb5fd",
    "submitter": {
        "id": 86,
        "url": "https://patchwork.libcamera.org/api/1.1/people/86/?format=api",
        "name": "Umang Jain",
        "email": "umang.jain@ideasonboard.com"
    },
    "delegate": {
        "id": 12,
        "url": "https://patchwork.libcamera.org/api/1.1/users/12/?format=api",
        "username": "uajain",
        "first_name": "Umang",
        "last_name": "Jain",
        "email": "umang.jain@ideasonboard.com"
    },
    "mbox": "https://patchwork.libcamera.org/patch/13183/mbox/",
    "series": [
        {
            "id": 2297,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2297/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2297",
            "date": "2021-08-03T14:02:33",
            "name": "android: Handle internal UVC cameras",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/2297/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/13183/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/13183/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 6D822C3232\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  3 Aug 2021 14:02:49 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1EF70687CC;\n\tTue,  3 Aug 2021 16:02:49 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 741D36026A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  3 Aug 2021 16:02:47 +0200 (CEST)",
            "from perceval.ideasonboard.com (unknown [103.238.109.12])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 99A323F0;\n\tTue,  3 Aug 2021 16:02:45 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"O0pH3DvS\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1627999367;\n\tbh=8C+7wH//g53uIiDnnOIVXKLG84mDgoDwvmQoS68ryuI=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=O0pH3DvSMkPp2EQ49lRX+kWVoBDRUmDiTbpVFQpNo0mPlfF0YHZFX/4XGNIanLZxO\n\tKYxzYKymeglsHlcyit1gKetlgmgZqIMiOR+34Dc1NSQRsX2/Lp8qiSyJoKETI6G4dU\n\tG8c99stQsZSRao1fAaZ5zoxNdPuexw/OLFqHmkzI=",
        "From": "Umang Jain <umang.jain@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue,  3 Aug 2021 19:32:34 +0530",
        "Message-Id": "<20210803140237.19302-2-umang.jain@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.31.1",
        "In-Reply-To": "<20210803140237.19302-1-umang.jain@ideasonboard.com>",
        "References": "<20210803140237.19302-1-umang.jain@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v4 1/4] android: Instantiate CameraDevice\n\tafter checking HAL config validity",
        "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": "Currently CameraDevice wrapper is created first and then HAL config\nvalidity is checked. If the validity checks fail, the code path will\nsimply return, in which case, creating CameraDevice seems a futile\nexercise.\n\nThis patch defers the creation of CameraDevice wrapper until the HAL\nconfig validity is checked for internal cameras. This will also enable\nus to infer a few things beforehand, by reading the config file before\ncreating the CameraDevice wrapper.\n\nSigned-off-by: Umang Jain <umang.jain@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n src/android/camera_hal_manager.cpp | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp\nindex 4cd67544..b364f62a 100644\n--- a/src/android/camera_hal_manager.cpp\n+++ b/src/android/camera_hal_manager.cpp\n@@ -133,9 +133,6 @@ void CameraHalManager::cameraAdded(std::shared_ptr<Camera> cam)\n \t\t}\n \t}\n \n-\t/* Create a CameraDevice instance to wrap the libcamera Camera. */\n-\tstd::unique_ptr<CameraDevice> camera = CameraDevice::create(id, cam);\n-\n \t/*\n \t * The configuration file must be valid, and contain a corresponding\n \t * entry for internal cameras. External cameras can be initialized\n@@ -155,6 +152,9 @@ void CameraHalManager::cameraAdded(std::shared_ptr<Camera> cam)\n \t\treturn;\n \t}\n \n+\t/* Create a CameraDevice instance to wrap the libcamera Camera. */\n+\tstd::unique_ptr<CameraDevice> camera = CameraDevice::create(id, cam);\n+\n \tint ret = camera->initialize(cameraConfigData);\n \tif (ret) {\n \t\tLOG(HAL, Error) << \"Failed to initialize camera: \" << cam->id();\n",
    "prefixes": [
        "libcamera-devel",
        "v4",
        "1/4"
    ]
}