Patch Detail
Show a patch.
GET /api/patches/19214/?format=api
{ "id": 19214, "url": "https://patchwork.libcamera.org/api/patches/19214/?format=api", "web_url": "https://patchwork.libcamera.org/patch/19214/", "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": "<20231120184529.730565-1-alain.volmat@foss.st.com>", "date": "2023-11-20T18:45:29", "name": "[libcamera-devel] libcamera: camera_sensor: fix HBLANK RO check", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "276bfb32ac4da2017d17f2447b758dd032dc981c", "submitter": { "id": 162, "url": "https://patchwork.libcamera.org/api/people/162/?format=api", "name": "Alain Volmat", "email": "alain.volmat@foss.st.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/19214/mbox/", "series": [ { "id": 4076, "url": "https://patchwork.libcamera.org/api/series/4076/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4076", "date": "2023-11-20T18:45:29", "name": "[libcamera-devel] libcamera: camera_sensor: fix HBLANK RO check", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4076/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/19214/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/19214/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 EDE9EBDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 20 Nov 2023 18:45:39 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 432A3629AF;\n\tMon, 20 Nov 2023 19:45:39 +0100 (CET)", "from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com\n\t[185.132.182.106])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EFD1F61DAF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Nov 2023 19:45:36 +0100 (CET)", "from pps.filterd (m0369458.ppops.net [127.0.0.1])\n\tby mx07-00178001.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id\n\t3AKD0e2l026050; Mon, 20 Nov 2023 19:45:35 +0100", "from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35])\n\tby mx07-00178001.pphosted.com (PPS) with ESMTPS id 3uf7q4647j-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=NOT); Mon, 20 Nov 2023 19:45:35 +0100 (CET)", "from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20])\n\tby beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id B83A310003D; \n\tMon, 20 Nov 2023 19:45:34 +0100 (CET)", "from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69])\n\tby euls16034.sgp.st.com (STMicroelectronics) with ESMTP id\n\tABB83252252; Mon, 20 Nov 2023 19:45:34 +0100 (CET)", "from localhost (10.129.178.213) by SHFDAG1NODE1.st.com\n\t(10.75.129.69) with Microsoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27;\n\tMon, 20 Nov 2023 19:45:34 +0100" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1700505939;\n\tbh=WNJRQuALJdq3G+qT0W+PPvaBTWv/U65WrswojyEIhzg=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:Cc:From;\n\tb=zcmjhkneTyiIa96pBxBmc1Dxa9EOC7zk6bWBRz7bnl1Gl5fdBVwUVG0gt1zgfsdSl\n\t9hKfyOUWGFfR6+iHMaU6SaXBZsWxxUkFjBIyczV+E0gbRv3g1xaNjeMXYFzzTSNXec\n\tuHzies07DBFoEwymEBaCEOg3j94Qds2VRhDjMdjCiEVpYMZDmfTf5tmetq7JRR8pHP\n\tPPNxIluFHOyUX04/GT8Wrxu1QsxLM0Q3h465snkKVAeuimcqXlomM9RgxzxtjMv55T\n\thWPDziORCXZVexoZ3iiGp9JMOxjsZJF290dwnA5iUBb+1zuDmDlAFqbBRoGB86QBTi\n\tS+Y5I5hWLbVrA==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=\n\tfrom:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding:content-type; s=selector1; bh=n0lA1+8\n\tzcqFzHT3H/dbU5POVDPzzYaN+BTcFE0pgioM=; b=byMt5zDWVOHJLSdGL/G+cT5\n\tRbjMHy8V9ZIyOCsaBIhW3jKSVgkq+SaX2ECatO/8+4Xivw+0V07+mFFGGeOsaFKi\n\tiY4xfDx2bZSKVmDNkW8uAydEvjUXt1o4xnsr9wNx7dMTGbD5sEFO++LJO3psp/Oj\n\tlZ8zxhRYumoxFOrNP9uNuv2KYctN0ph7BgWZQlgFjDtLgZbMXvUURyFR4zOziLqo\n\t26uvPaBpKb9sx7dW5Y1AYoxVDF5VgxaAXtcS236Bum/oRwEc1FqwJQG8uIfRMpzd\n\tndtDU+uMKhE4NJnHmiWwOXw9291/aZo74oeuwQBwPo8R42gGCpnPPiM1sVPAbiw=\n\t=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=foss.st.com\n\theader.i=@foss.st.com header.b=\"byMt5zDW\"; \n\tdkim-atps=neutral", "To": "<libcamera-devel@lists.libcamera.org>", "Date": "Mon, 20 Nov 2023 19:45:29 +0100", "Message-ID": "<20231120184529.730565-1-alain.volmat@foss.st.com>", "X-Mailer": "git-send-email 2.25.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Originating-IP": "[10.129.178.213]", "X-ClientProxiedBy": "EQNCAS1NODE4.st.com (10.75.129.82) To SHFDAG1NODE1.st.com\n\t(10.75.129.69)", "X-Proofpoint-Virus-Version": "vendor=baseguard\n\tengine=ICAP:2.0.272, Aquarius:18.0.987, Hydra:6.0.619,\n\tFMLib:17.11.176.26\n\tdefinitions=2023-11-20_19,2023-11-20_01,2023-05-22_02", "Subject": "[libcamera-devel] [PATCH] libcamera: camera_sensor: fix HBLANK RO\n\tcheck", "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": "Alain Volmat via libcamera-devel <libcamera-devel@lists.libcamera.org>", "Reply-To": "Alain Volmat <alain.volmat@foss.st.com>", "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Perform the HBLANK readonly check by looking at the v4l2_query_ext_ctrl\nstruct for the V4L2_CID_HBLANK instead of checking for min/max values.\n\nSigned-off-by: Alain Volmat <alain.volmat@foss.st.com>\n---\n src/libcamera/camera_sensor.cpp | 17 ++++-------------\n 1 file changed, 4 insertions(+), 13 deletions(-)", "diff": "diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\nindex 0ef78d9c..3281c1f9 100644\n--- a/src/libcamera/camera_sensor.cpp\n+++ b/src/libcamera/camera_sensor.cpp\n@@ -188,21 +188,12 @@ int CameraSensor::init()\n \t * Set HBLANK to the minimum to start with a well-defined line length,\n \t * allowing IPA modules that do not modify HBLANK to use the sensor\n \t * minimum line length in their calculations.\n-\t *\n-\t * At present, there is no way of knowing if a control is read-only.\n-\t * As a workaround, assume that if the minimum and maximum values of\n-\t * the V4L2_CID_HBLANK control are the same, it implies the control\n-\t * is read-only.\n-\t *\n-\t * \\todo The control API ought to have a flag to specify if a control\n-\t * is read-only which could be used below.\n \t */\n \tif (ctrls.infoMap()->find(V4L2_CID_HBLANK) != ctrls.infoMap()->end()) {\n-\t\tconst ControlInfo hblank = ctrls.infoMap()->at(V4L2_CID_HBLANK);\n-\t\tconst int32_t hblankMin = hblank.min().get<int32_t>();\n-\t\tconst int32_t hblankMax = hblank.max().get<int32_t>();\n-\n-\t\tif (hblankMin != hblankMax) {\n+\t\tconst struct v4l2_query_ext_ctrl *hblankInfo = subdev_->controlInfo(V4L2_CID_HBLANK);\n+\t\tif (!(hblankInfo->flags & V4L2_CTRL_FLAG_READ_ONLY)) {\n+\t\t\tconst ControlInfo hblank = ctrls.infoMap()->at(V4L2_CID_HBLANK);\n+\t\t\tconst int32_t hblankMin = hblank.min().get<int32_t>();\n \t\t\tControlList ctrl(subdev_->controls());\n \n \t\t\tctrl.set(V4L2_CID_HBLANK, hblankMin);\n", "prefixes": [ "libcamera-devel" ] }