Patch Detail
Show a patch.
GET /api/1.1/patches/12567/?format=api
{ "id": 12567, "url": "https://patchwork.libcamera.org/api/1.1/patches/12567/?format=api", "web_url": "https://patchwork.libcamera.org/patch/12567/", "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": "<20210611084228.1830629-5-hiroh@chromium.org>", "date": "2021-06-11T08:42:28", "name": "[libcamera-devel,RFC,4/4] android: camera_device: Propagate the requested test pattern mode", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "84edba8835ae0a12b5aaaa1f05157d14ac59bff7", "submitter": { "id": 63, "url": "https://patchwork.libcamera.org/api/1.1/people/63/?format=api", "name": "Hirokazu Honda", "email": "hiroh@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/12567/mbox/", "series": [ { "id": 2121, "url": "https://patchwork.libcamera.org/api/1.1/series/2121/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2121", "date": "2021-06-11T08:42:24", "name": "Support sensor test pattern mode in Android HAL", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2121/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/12567/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/12567/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 3B99AC320B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 11 Jun 2021 08:42:44 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E5F3F68938;\n\tFri, 11 Jun 2021 10:42:43 +0200 (CEST)", "from mail-pl1-x631.google.com (mail-pl1-x631.google.com\n\t[IPv6:2607:f8b0:4864:20::631])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B41E668938\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 11 Jun 2021 10:42:41 +0200 (CEST)", "by mail-pl1-x631.google.com with SMTP id v12so2482526plo.10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 11 Jun 2021 01:42:41 -0700 (PDT)", "from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:203:367e:c2e4:d691:eca1])\n\tby smtp.gmail.com with ESMTPSA id\n\t20sm4323542pfi.170.2021.06.11.01.42.39\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 11 Jun 2021 01:42:39 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"DEb8Li22\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=ISKwOyPLfe/Qtg2gfe2ELFZN2Vcig6j4flu625qxuEg=;\n\tb=DEb8Li22r+Q2sJDsmC+MrUFJ5EmljsBT9H0cX3iYX1J37TwGGMxH0gSqJvlJ+nd5uY\n\tzay2O1mjXcOfpcu3oKvGepYwneaKPZWMoadt2DxBcmQqM5GFamwU/oVxPhobQsEUvHLD\n\tLxULRRSwiamAKjlUT3Mq03pqythnGtCVm1g2Q=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=ISKwOyPLfe/Qtg2gfe2ELFZN2Vcig6j4flu625qxuEg=;\n\tb=Qw7oHAZgyCVuYkPaFANZMbQXJfAyEyaPt6nd0PpdTtSjpIeipObikweFI3kDFyw+K7\n\txOmztsDf5M6XKTsqXQqPCfd5z3mKJYiEfe9NSQ2WfeYsWjS/mOvGZJc3YolA+FXajW3w\n\tftRVvbGe3pU7wQkKYVrljyM/7cvPt2gBRIskhRL9Xv0R6sjmXcCRWJDr6D1mqSau2qnm\n\tXmJ7951lNTNqce8zPH4ZZEP9Iz2mDq7xWtRRIrW6x++PDgKpvhNTzMH0ePvQrr/1L9YT\n\tDRDSyHqEOUzm4l/U/wOYYfQUc3UrrRrIWXc4EDMOm6VIIDRuw79HXo/0cjIg8aq7Tjug\n\t2vmw==", "X-Gm-Message-State": "AOAM532DLYX3COQdgiTFAtSPHFjEguZ+i1G56paw1gzTv4zUeqncNfTM\n\ts0ZmLYuapwbraIX4Q+TDNN+jM5nhFplXCw==", "X-Google-Smtp-Source": "ABdhPJzSWCsKwLFsxUiJ+i6VxuvJNekYYrOoq3eV6vK0XTTBbkscbR0xr+7mxRE9JajmlERKK/HzyQ==", "X-Received": "by 2002:a17:90a:1b6b:: with SMTP id\n\tq98mr8402031pjq.53.1623400960242; \n\tFri, 11 Jun 2021 01:42:40 -0700 (PDT)", "From": "Hirokazu Honda <hiroh@chromium.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 11 Jun 2021 17:42:28 +0900", "Message-Id": "<20210611084228.1830629-5-hiroh@chromium.org>", "X-Mailer": "git-send-email 2.32.0.272.g935e593368-goog", "In-Reply-To": "<20210611084228.1830629-1-hiroh@chromium.org>", "References": "<20210611084228.1830629-1-hiroh@chromium.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [RFC PATCH 4/4] android: camera_device: Propagate\n\tthe requested test pattern mode", "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": "Propagate the requested test pattern mode to libcamera::Camera\nthrough libcamera::Request and also set the android metadata to\nthe test pattern mode contained by the complete Request.\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n---\n src/android/camera_device.cpp | 50 ++++++++++++++++++++++++++++++++++-\n 1 file changed, 49 insertions(+), 1 deletion(-)", "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 5e961003..442c36b1 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -1926,16 +1926,57 @@ int CameraDevice::processControls(Camera3RequestDescriptor *descriptor)\n \t\treturn 0;\n \n \t/* Translate the Android request settings to libcamera controls. */\n+\tControlList &controls = descriptor->request_->controls();\n \tcamera_metadata_ro_entry_t entry;\n \tif (settings.getEntry(ANDROID_SCALER_CROP_REGION, &entry)) {\n \t\tconst int32_t *data = entry.data.i32;\n \t\tRectangle cropRegion{ data[0], data[1],\n \t\t\t\t static_cast<unsigned int>(data[2]),\n \t\t\t\t static_cast<unsigned int>(data[3]) };\n-\t\tControlList &controls = descriptor->request_->controls();\n \t\tcontrols.set(controls::ScalerCrop, cropRegion);\n \t}\n \n+\tif (settings.getEntry(ANDROID_SENSOR_TEST_PATTERN_MODE, &entry)) {\n+\t\tconst int32_t data = *entry.data.i32;\n+\t\tswitch (data) {\n+\t\tcase ANDROID_SENSOR_TEST_PATTERN_MODE_OFF:\n+\t\t\tcontrols.set(controls::draft::TestPatternMode,\n+\t\t\t\t controls::draft::TestPatternModeOff);\n+\t\t\tbreak;\n+\n+\t\tcase ANDROID_SENSOR_TEST_PATTERN_MODE_SOLID_COLOR:\n+\t\t\tcontrols.set(controls::draft::TestPatternMode,\n+\t\t\t\t controls::draft::TestPatternModeSolidColor);\n+\t\t\tbreak;\n+\n+\t\tcase ANDROID_SENSOR_TEST_PATTERN_MODE_COLOR_BARS:\n+\t\t\tcontrols.set(controls::draft::TestPatternMode,\n+\t\t\t\t controls::draft::TestPatternModeColorBars);\n+\t\t\tbreak;\n+\n+\t\tcase ANDROID_SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY:\n+\t\t\tcontrols.set(controls::draft::TestPatternMode,\n+\t\t\t\t controls::draft::TestPatternModeColorBarsFadeToGray);\n+\t\t\tbreak;\n+\n+\t\tcase ANDROID_SENSOR_TEST_PATTERN_MODE_PN9:\n+\t\t\tcontrols.set(controls::draft::TestPatternMode,\n+\t\t\t\t controls::draft::TestPatternModePn9);\n+\t\t\tbreak;\n+\n+\t\tcase ANDROID_SENSOR_TEST_PATTERN_MODE_CUSTOM1:\n+\t\t\tcontrols.set(controls::draft::TestPatternMode,\n+\t\t\t\t controls::draft::TestPatternModeCustom1);\n+\t\t\tbreak;\n+\n+\t\tdefault:\n+\t\t\tLOG(HAL, Error)\n+\t\t\t\t<< \"Unknown test pattern mode: \" << data;\n+\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\t}\n+\n \treturn 0;\n }\n \n@@ -2368,6 +2409,13 @@ CameraDevice::getResultMetadata(const Camera3RequestDescriptor &descriptor) cons\n \t\tresultMetadata->addEntry(ANDROID_SCALER_CROP_REGION, cropRect);\n \t}\n \n+\tif (metadata.contains(controls::draft::TestPatternMode)) {\n+\t\tconst int32_t testPatternMode =\n+\t\t\tmetadata.get(controls::draft::TestPatternMode);\n+\t\tresultMetadata->addEntry(ANDROID_SENSOR_TEST_PATTERN_MODE,\n+\t\t\t\t\t testPatternMode);\n+\t}\n+\n \t/*\n \t * Return the result metadata pack even is not valid: get() will return\n \t * nullptr.\n", "prefixes": [ "libcamera-devel", "RFC", "4/4" ] }