Show a patch.

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

{
    "id": 15207,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/15207/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15207/",
    "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": "<20211221053458.2711409-1-paul.elder@ideasonboard.com>",
    "date": "2021-12-21T05:34:58",
    "name": "[libcamera-devel] android: Hardcode black level lock",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "f30349d83b891704828b6754b8624d33d429f460",
    "submitter": {
        "id": 17,
        "url": "https://patchwork.libcamera.org/api/1.1/people/17/?format=api",
        "name": "Paul Elder",
        "email": "paul.elder@ideasonboard.com"
    },
    "delegate": {
        "id": 17,
        "url": "https://patchwork.libcamera.org/api/1.1/users/17/?format=api",
        "username": "epaul",
        "first_name": "Paul",
        "last_name": "Elder",
        "email": "paul.elder@ideasonboard.com"
    },
    "mbox": "https://patchwork.libcamera.org/patch/15207/mbox/",
    "series": [
        {
            "id": 2858,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2858/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2858",
            "date": "2021-12-21T05:34:58",
            "name": "[libcamera-devel] android: Hardcode black level lock",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/2858/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/15207/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15207/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 C0FF8BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 21 Dec 2021 05:35:20 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0740660906;\n\tTue, 21 Dec 2021 06:35:20 +0100 (CET)",
            "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 CC6A5608F8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Dec 2021 06:35:18 +0100 (CET)",
            "from pyrite.mediacom.info (unknown\n\t[IPv6:2604:2d80:ad90:fb00:96fd:8874:873:6c16])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C8319881;\n\tTue, 21 Dec 2021 06:35:17 +0100 (CET)"
        ],
        "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=\"WqUVULP4\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1640064918;\n\tbh=Xab/Pr3GTpyMiNIUUwj3qAFSmELbNUuN2YTD0C2f70o=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=WqUVULP4h32pWw6fz8Wrn/9MyEvvFGvOidLEwIdCmIgo7piYIYT9W1kiat9Z8uSOl\n\tzT0A0+a8U6aI24nLEhmUQgnEDrRyxc2D9Skj+L5sBF87QPfFJ7/bgYdhUqdg/ZacDm\n\tKLyC7fc8KHwO4SfPZNapGpRcRplhENAj7LuxQUYc=",
        "From": "Paul Elder <paul.elder@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 20 Dec 2021 23:34:58 -0600",
        "Message-Id": "<20211221053458.2711409-1-paul.elder@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] android: Hardcode black level lock",
        "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": "Hardcode black level lock in request and result metadata. Also add it to\nthe template.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n src/android/camera_capabilities.cpp | 7 +++++++\n src/android/camera_device.cpp       | 9 +++++++++\n src/android/camera_request.h        | 1 +\n 3 files changed, 17 insertions(+)",
    "diff": "diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp\nindex c52b22be..3f3b7303 100644\n--- a/src/android/camera_capabilities.cpp\n+++ b/src/android/camera_capabilities.cpp\n@@ -492,6 +492,8 @@ void CameraCapabilities::computeHwLevel(\n \t\thwLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED;\n \t}\n \n+\t/* Black level lock doesn't need to be checked as we hardcode it */\n+\n \tfound = availableResultKeys_.count(ANDROID_HOT_PIXEL_MODE);\n \tif (!found) {\n \t\tLOG(HAL, Info) << noFull << \"missing hot pixel mode\";\n@@ -940,6 +942,7 @@ int CameraCapabilities::initializeStaticMetadata()\n \t};\n \n \tavailableRequestKeys_ = {\n+\t\tANDROID_BLACK_LEVEL_LOCK,\n \t\tANDROID_COLOR_CORRECTION_ABERRATION_MODE,\n \t\tANDROID_CONTROL_AE_ANTIBANDING_MODE,\n \t\tANDROID_CONTROL_AE_EXPOSURE_COMPENSATION,\n@@ -972,6 +975,7 @@ int CameraCapabilities::initializeStaticMetadata()\n \t};\n \n \tavailableResultKeys_ = {\n+\t\tANDROID_BLACK_LEVEL_LOCK,\n \t\tANDROID_COLOR_CORRECTION_ABERRATION_MODE,\n \t\tANDROID_CONTROL_AE_ANTIBANDING_MODE,\n \t\tANDROID_CONTROL_AE_EXPOSURE_COMPENSATION,\n@@ -2032,6 +2036,9 @@ std::unique_ptr<CameraMetadata> CameraCapabilities::requestTemplatePreview() con\n \t\trequestTemplate->addEntry(ANDROID_TONEMAP_MODE, tonemapMode);\n \t}\n \n+\tuint8_t blackLevelLock = ANDROID_BLACK_LEVEL_LOCK_OFF;\n+\trequestTemplate->addEntry(ANDROID_BLACK_LEVEL_LOCK, blackLevelLock);\n+\n \tif (staticMetadata_->entryContains<uint8_t>(ANDROID_HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES,\n \t\t\t\t\t\t    ANDROID_HOT_PIXEL_MODE_FAST)) {\n \t\tuint8_t hotPixelMode = ANDROID_HOT_PIXEL_MODE_FAST;\ndiff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 7cab878c..a097d384 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -973,6 +973,9 @@ int CameraDevice::processControls(Camera3RequestDescriptor *descriptor)\n \t\t}\n \t}\n \n+\tif (settings.getEntry(ANDROID_BLACK_LEVEL_LOCK, &entry))\n+\t\tdescriptor->blackLevelLock_ = *entry.data.u8;\n+\n \tif (settings.getEntry(ANDROID_HOT_PIXEL_MODE, &entry)) {\n \t\tconst int32_t data = static_cast<int32_t>(*entry.data.u8);\n \t\tint32_t hotPixelMode;\n@@ -1814,6 +1817,12 @@ CameraDevice::getResultMetadata(const Camera3RequestDescriptor &descriptor) cons\n \t\tresultMetadata->addEntry(ANDROID_EDGE_MODE, descriptor.edgeMode_);\n \t}\n \n+\t/*\n+\t * \\todo Hardcode the black level lock for now, as simply reporting\n+\t * what the request asked for satsifies CTS.\n+\t */\n+\tresultMetadata->addEntry(ANDROID_BLACK_LEVEL_LOCK, descriptor.blackLevelLock_);\n+\n \tif (metadata.contains(controls::draft::HotPixelMode)) {\n \t\tbool valid;\n \t\tswitch (metadata.get(controls::draft::HotPixelMode)) {\ndiff --git a/src/android/camera_request.h b/src/android/camera_request.h\nindex 69b6c8fc..1e53ceb0 100644\n--- a/src/android/camera_request.h\n+++ b/src/android/camera_request.h\n@@ -90,6 +90,7 @@ public:\n \t/* The android edge mode associated with this request */\n \t/* \\todo Wrap all such controls? */\n \tint32_t edgeMode_;\n+\tuint8_t blackLevelLock_;\n \n private:\n \tLIBCAMERA_DISABLE_COPY(Camera3RequestDescriptor)\n",
    "prefixes": [
        "libcamera-devel"
    ]
}