Show a patch.

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

{
    "id": 15694,
    "url": "https://patchwork.libcamera.org/api/patches/15694/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15694/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/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": "<20220421072848.6752-5-hpa@redhat.com>",
    "date": "2022-04-21T07:28:48",
    "name": "[libcamera-devel,RFC,v2,4/4] ipa: ipu3: af: Remove hardcoded maximum VCM steps",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "f82052649f69f758be9e275f544bc1d9fd0d1658",
    "submitter": {
        "id": 105,
        "url": "https://patchwork.libcamera.org/api/people/105/?format=api",
        "name": "Kate Hsuan",
        "email": "hpa@redhat.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/15694/mbox/",
    "series": [
        {
            "id": 3062,
            "url": "https://patchwork.libcamera.org/api/series/3062/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3062",
            "date": "2022-04-21T07:28:44",
            "name": "Enabling AF algorithm to get the VCM attributes from the device driver",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/3062/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/15694/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15694/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 1D3C1C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 Apr 2022 07:29:22 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C863B65645;\n\tThu, 21 Apr 2022 09:29:21 +0200 (CEST)",
            "from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4B96D604AD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Apr 2022 09:29:20 +0200 (CEST)",
            "from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com\n\t[66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n\tus-mta-613-shDRrt0qM1mkJZgwJ9TmLA-1; Thu, 21 Apr 2022 03:29:18 -0400",
            "from smtp.corp.redhat.com\n\t(int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mimecast-mx02.redhat.com (Postfix) with ESMTPS id 11B1180159B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Apr 2022 07:29:18 +0000 (UTC)",
            "from fedora.redhat.com (unknown [10.39.194.88])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 08C8BC3598E;\n\tThu, 21 Apr 2022 07:29:15 +0000 (UTC)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1650526161;\n\tbh=uThgyHjDnC+lEe99mYtFrOliYIAAEhRoIck9nWog638=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=05JZDwRrL1el8L7etcTsvCzuVA+0LKSzLAAFFlnMO6zHfYYh8PMOT+0evX29z8yQB\n\t/giy2LdYvYp9MqxeIi+H5vybEHSAhP2xY2YZ83f05sNn76k1OdkqsX9a9E4pRsZVYW\n\tIwrcQRHu9DmTzK/WWA0GUUzqfLvmeCOFqiskom38ajw6XJZ/sRgGSj73o8piiJ+Hr1\n\tfcScjUUPMjm5ayPXi1DIOrMb9MzgQJ7iSCwk5ikVrezZVJx1DMG98IbeSSGh+jrian\n\tfACRtG8EsvgDdXkkzRWlvm1uccEAlbQVt8794LQiLTTTmDzuFni8e8fop3Suz9moDn\n\tMxZ26bEKTDKXw==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1650526159;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=yAiQvw5R+MG2sBMTBHOEpOULc3I1Ns2d+x8NgzRMtSA=;\n\tb=U0KKiZvbut9sLYUoVxXM8jZr0vTqaHjF89JVUYWjMFEJ6Gp2a4I37AdCS9Ijc6CT+7us+Q\n\t5gT2vQimQQ34gp8jLQM3ZPS0lj5/NjVueregTnTuPbV3/ltwFAT2JgNv9jLm4FBLyZi4kh\n\twgrWknpj2hogqNcsbzKw1yooBOP0j4g="
        ],
        "Authentication-Results": [
            "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"U0KKiZvb\"; \n\tdkim-atps=neutral",
            "relay.mimecast.com;\n\tauth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hpa@redhat.com"
        ],
        "X-MC-Unique": "shDRrt0qM1mkJZgwJ9TmLA-1",
        "To": "libcamera devel <libcamera-devel@lists.libcamera.org>",
        "Date": "Thu, 21 Apr 2022 15:28:48 +0800",
        "Message-Id": "<20220421072848.6752-5-hpa@redhat.com>",
        "In-Reply-To": "<20220421072848.6752-1-hpa@redhat.com>",
        "References": "<20220421072848.6752-1-hpa@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.85 on 10.11.54.8",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true",
        "Subject": "[libcamera-devel] [RFC PATCH v2 4/4] ipa: ipu3: af: Remove\n\thardcoded maximum VCM steps",
        "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>",
        "From": "Kate Hsuan via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Kate Hsuan <hpa@redhat.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The hardcoded VCM step variable was removed and was replaced by the\nconfigInfo.\n\nSigned-off-by: Kate Hsuan<hpa@redhat.com>\n---\n src/ipa/ipu3/algorithms/af.cpp | 13 ++++---------\n src/ipa/ipu3/algorithms/af.h   |  2 ++\n 2 files changed, 6 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/src/ipa/ipu3/algorithms/af.cpp b/src/ipa/ipu3/algorithms/af.cpp\nindex f700b01f..4faf0bd8 100644\n--- a/src/ipa/ipu3/algorithms/af.cpp\n+++ b/src/ipa/ipu3/algorithms/af.cpp\n@@ -62,12 +62,6 @@ namespace ipa::ipu3::algorithms {\n \n LOG_DEFINE_CATEGORY(IPU3Af)\n \n-/**\n- * Maximum focus steps of the VCM control\n- * \\todo should be obtained from the VCM driver\n- */\n-static constexpr uint32_t kMaxFocusSteps = 1023;\n-\n /* Minimum focus step for searching appropriate focus */\n static constexpr uint32_t kCoarseSearchStep = 30;\n static constexpr uint32_t kFineSearchStep = 1;\n@@ -179,7 +173,8 @@ int Af::configure(IPAContext &context, const IPAConfigInfo &configInfo)\n \tgrid.y_start |= IPU3_UAPI_GRID_Y_START_EN;\n \n \t/* Initial max focus step */\n-\tmaxStep_ = kMaxFocusSteps;\n+\tmaxStep_ = configInfo.sensorInfo.maxVcmSteps;\n+\tmaxFocusSteps_ = configInfo.sensorInfo.maxVcmSteps;\n \n \t/* Initial frame ignore counter */\n \tafIgnoreFrameReset();\n@@ -217,7 +212,7 @@ void Af::afCoarseScan(IPAContext &context)\n \t\tcontext.frameContext.af.focus = focus_;\n \t\tpreviousVariance_ = 0;\n \t\tmaxStep_ = std::clamp(focus_ + static_cast<uint32_t>((focus_ * kFineRange)),\n-\t\t\t\t      0U, kMaxFocusSteps);\n+\t\t\t\t      0U, maxFocusSteps_);\n \t}\n }\n \n@@ -262,7 +257,7 @@ void Af::afReset(IPAContext &context)\n \tpreviousVariance_ = 0.0;\n \tcoarseCompleted_ = false;\n \tfineCompleted_ = false;\n-\tmaxStep_ = kMaxFocusSteps;\n+\tmaxStep_ = maxFocusSteps_;\n }\n \n /**\ndiff --git a/src/ipa/ipu3/algorithms/af.h b/src/ipa/ipu3/algorithms/af.h\nindex b85cf941..a1cf561c 100644\n--- a/src/ipa/ipu3/algorithms/af.h\n+++ b/src/ipa/ipu3/algorithms/af.h\n@@ -45,6 +45,8 @@ private:\n \n \tbool afIsOutOfFocus(IPAContext context);\n \n+\t/* Maximum VCM steps */\n+\tuint32_t maxFocusSteps_;\n \t/* VCM step configuration. It is the current setting of the VCM step. */\n \tuint32_t focus_;\n \t/* The best VCM step. It is a local optimum VCM step during scanning. */\n",
    "prefixes": [
        "libcamera-devel",
        "RFC",
        "v2",
        "4/4"
    ]
}