Patch Detail
Show a patch.
GET /api/1.1/patches/14043/?format=api
{ "id": 14043, "url": "https://patchwork.libcamera.org/api/1.1/patches/14043/?format=api", "web_url": "https://patchwork.libcamera.org/patch/14043/", "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": "<20211005054414.873711-1-hiroh@chromium.org>", "date": "2021-10-05T05:44:14", "name": "[libcamera-devel,RFC,v2] libcamera: pipeline: ipu3: Apply the requested test pattern mode", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "f6a6d218b6dc42f804fd57666325890488a2710b", "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/14043/mbox/", "series": [ { "id": 2601, "url": "https://patchwork.libcamera.org/api/1.1/series/2601/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2601", "date": "2021-10-05T05:44:14", "name": "[libcamera-devel,RFC,v2] libcamera: pipeline: ipu3: Apply the requested test pattern mode", "version": 2, "mbox": "https://patchwork.libcamera.org/series/2601/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/14043/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/14043/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 00F5DBDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 5 Oct 2021 05:44:22 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 760F3691B8;\n\tTue, 5 Oct 2021 07:44:22 +0200 (CEST)", "from mail-pl1-x633.google.com (mail-pl1-x633.google.com\n\t[IPv6:2607:f8b0:4864:20::633])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 49D616023D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 5 Oct 2021 07:44:21 +0200 (CEST)", "by mail-pl1-x633.google.com with SMTP id x4so1525337pln.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 04 Oct 2021 22:44:21 -0700 (PDT)", "from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:203:debc:d0db:3bd8:f961])\n\tby smtp.gmail.com with ESMTPSA id\n\tl185sm16321230pfd.29.2021.10.04.22.44.17\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 04 Oct 2021 22:44:18 -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=\"Gs+2VI60\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; h=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=KyYOWQGKmTE5Y3u4WcGVbPThbP4h3QrZQVOPAWc2g9I=;\n\tb=Gs+2VI60qaPdQnurGR4+m2YNPRvYr2B9YEUJ0jisaSG8jqYjjmVyhF4RzkEhMq5zjW\n\t1YNreX7e+Flohcet/s1oDMztipHvkr+THEQSidXmdcRGIQeAjni+99+eSJrGc2n3q2Wv\n\tprg5sEclZTK4s6KGGc+83UFxTEto3pm+4S60Q=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=KyYOWQGKmTE5Y3u4WcGVbPThbP4h3QrZQVOPAWc2g9I=;\n\tb=7wGgLpe3+JapaiSmIQyIa+CjWVwrgmf4GyDKQApRzy5ezXFAnwWNfT2dMf0k6l7pE/\n\tlWKh2vQUaqYNr3n5LTg/VgYrXoqhK93Gkyua724tOyuQ9QDmiK440lDC5JNWNPjmJkkr\n\tx7DBTCdGKI9Gz4DrsfCKZdNhHaLnXQdrLT7NIIKTO5oebJf/K28e9y4HdKW0MljqEGqD\n\tYkfWc8m/TTcWqq+XcJyxTscAGSRdRPpONgSJr/XcvdiNNzzCbHbnEYGvRABMCUWQg1AM\n\t03Zz3dmoeOWcSF/VwQW0A17SnfdM6mi+sQAtoNcu0V7c4NP4W9ZyonYH34X7TkFahQ05\n\t/YTQ==", "X-Gm-Message-State": "AOAM531FtyjXz94zUaZ4HGdXphHM42g6dgi0sMQ7BQc5ow09uPz71mXw\n\tS+spxuNuuj/br0cA5QS8LsyNg497IS8wrw==", "X-Google-Smtp-Source": "ABdhPJzm8EGRUQ0ctTMIe+PIup75Nf9JRmpFFgudH36qd/50vz24uqeUEYS46lXnaED19I6vneAdtQ==", "X-Received": "by 2002:a17:90b:1b06:: with SMTP id\n\tnu6mr1551391pjb.170.1633412659478; \n\tMon, 04 Oct 2021 22:44:19 -0700 (PDT)", "From": "Hirokazu Honda <hiroh@chromium.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 5 Oct 2021 14:44:14 +0900", "Message-Id": "<20211005054414.873711-1-hiroh@chromium.org>", "X-Mailer": "git-send-email 2.33.0.800.g4c38ced690-goog", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [RFC PATCH v2] libcamera: pipeline: ipu3: Apply\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": "This enables ipu3 pipeline handler to apply the test pattern mode\nper frame.\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n---\n src/libcamera/pipeline/ipu3/ipu3.cpp | 38 ++++++++++++++++++++++++++--\n 1 file changed, 36 insertions(+), 2 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 92e86925..07fda65f 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -69,6 +69,7 @@ public:\n \tvoid statBufferReady(FrameBuffer *buffer);\n \tvoid queuePendingRequests();\n \tvoid cancelPendingRequests();\n+\tvoid frameStart(uint32_t sequence);\n \n \tCIO2Device cio2_;\n \tImgUDevice *imgu_;\n@@ -88,6 +89,7 @@ public:\n \tstd::unique_ptr<ipa::ipu3::IPAProxyIPU3> ipa_;\n \n \tstd::queue<Request *> pendingRequests_;\n+\tstd::queue<Request *> processingRequests_;\n \n \tControlInfoMap ipaControls_;\n \n@@ -568,6 +570,8 @@ int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c)\n \tcio2->sensor()->sensorInfo(&sensorInfo);\n \tdata->cropRegion_ = sensorInfo.analogCrop;\n \n+\tcio2->sensor()->setTestPatternMode(controls::draft::TestPatternModeOff);\n+\n \t/*\n \t * Configure the H/V flip controls based on the combination of\n \t * the sensor and user transform.\n@@ -801,6 +805,9 @@ void PipelineHandlerIPU3::stop(Camera *camera)\n \n \tret |= data->imgu_->stop();\n \tret |= data->cio2_.stop();\n+\n+\tdata->processingRequests_ = {};\n+\n \tif (ret)\n \t\tLOG(IPU3, Warning) << \"Failed to stop camera \" << camera->id();\n \n@@ -851,6 +858,8 @@ void IPU3CameraData::queuePendingRequests()\n \n \t\tinfo->rawBuffer = rawBuffer;\n \n+\t\tprocessingRequests_.push(request);\n+\n \t\tipa::ipu3::IPU3Event ev;\n \t\tev.op = ipa::ipu3::EventProcessControls;\n \t\tev.frame = info->id;\n@@ -1107,8 +1116,8 @@ int PipelineHandlerIPU3::registerCameras()\n \t\tdata->delayedCtrls_ =\n \t\t\tstd::make_unique<DelayedControls>(cio2->sensor()->device(),\n \t\t\t\t\t\t\t params);\n-\t\tdata->cio2_.frameStart().connect(data->delayedCtrls_.get(),\n-\t\t\t\t\t\t &DelayedControls::applyControls);\n+\t\tdata->cio2_.frameStart().connect(data.get(),\n+\t\t\t\t\t\t &IPU3CameraData::frameStart);\n \n \t\t/* Convert the sensor rotation to a transformation */\n \t\tint32_t rotation = 0;\n@@ -1399,6 +1408,31 @@ void IPU3CameraData::statBufferReady(FrameBuffer *buffer)\n \tipa_->processEvent(ev);\n }\n \n+void IPU3CameraData::frameStart(uint32_t sequence)\n+{\n+\tif (!processingRequests_.empty()) {\n+\t\t/* Assumes applying the test pattern mode affects immediately. */\n+\t\tRequest *request = processingRequests_.front();\n+\t\tprocessingRequests_.pop();\n+\n+\t\tif (request->controls().contains(controls::draft::TestPatternMode)) {\n+\t\t\tconst int32_t testPatternMode = request->controls().get(\n+\t\t\t\tcontrols::draft::TestPatternMode);\n+\n+\t\t\tint ret = cio2_.sensor()->setTestPatternMode(testPatternMode);\n+\t\t\tif (ret) {\n+\t\t\t\tLOG(IPU3, Error) << \"Failed to set test pattern mode: \"\n+\t\t\t\t\t\t << ret;\n+\t\t\t} else {\n+\t\t\t\trequest->metadata().set(controls::draft::TestPatternMode,\n+\t\t\t\t\t\t\ttestPatternMode);\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\tdelayedCtrls_->applyControls(sequence);\n+}\n+\n REGISTER_PIPELINE_HANDLER(PipelineHandlerIPU3)\n \n } /* namespace libcamera */\n", "prefixes": [ "libcamera-devel", "RFC", "v2" ] }