Patch Detail
Show a patch.
GET /api/patches/26802/?format=api
{ "id": 26802, "url": "https://patchwork.libcamera.org/api/patches/26802/?format=api", "web_url": "https://patchwork.libcamera.org/patch/26802/", "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": "<20260527023954.947576-1-elmo_git@todurov.eu>", "date": "2026-05-27T02:39:54", "name": "libipa, sensor: Add OV8856 camera sensor helper and properties", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "8521177e381c2357d66bb5f20aba8497da56f8d5", "submitter": { "id": 275, "url": "https://patchwork.libcamera.org/api/people/275/?format=api", "name": "Elmo Todurov", "email": "elmo_git@todurov.eu" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/26802/mbox/", "series": [ { "id": 5964, "url": "https://patchwork.libcamera.org/api/series/5964/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5964", "date": "2026-05-27T02:39:54", "name": "libipa, sensor: Add OV8856 camera sensor helper and properties", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5964/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/26802/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/26802/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 82A74C328C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 27 May 2026 02:40:30 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A1B2662FEC;\n\tWed, 27 May 2026 04:40:29 +0200 (CEST)", "from mail.todurov.eu\n\t(0001-0000-0000-0000-a600-838d-07d0-2001.dyn.estpak.ee\n\t[IPv6:2001:7d0:838d:a600::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 26FEB62010\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 May 2026 04:40:28 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=todurov.eu header.i=@todurov.eu\n\theader.b=\"phhrn1OV\"; dkim-atps=neutral", "From": "Elmo Todurov <elmo_git@todurov.eu>", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=todurov.eu; s=mail; \n\tt=1779849627;\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\tbh=KUo19pmhljMGiuDEoLxDTUBvKEKi/R+/O1rkJi9Y83I=;\n\tb=phhrn1OV7K0TgQoU1h41dEEvN1O2kjFrdzU3EjRsbpVtUEwW98b4qKQgdayN6cY2+0AIXB\n\t8/nZkkHNEkwleLMJfow5Fj7vXc12bLT/91CaE3p+IqqBP4/MSlaZP75I01FLfUKhAWo40g\n\ttnz/P3q2CL5uyYaQq7TERUBzY519AjM=", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Elmo Todurov <elmo_git@todurov.eu>", "Subject": "[PATCH] libipa,\n\tsensor: Add OV8856 camera sensor helper and properties", "Date": "Wed, 27 May 2026 05:39:54 +0300", "Message-ID": "<20260527023954.947576-1-elmo_git@todurov.eu>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "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": "The OV8856 is supported by the in-tree V4L2 driver\ndrivers/media/i2c/ov8856.c (CONFIG_VIDEO_OV8856) and is shipped on\nChromebooks (mt8183-kodama, sc7180-trogdor-coachz) and on Xiaomi\nPoco X3 Pro (Qualcomm sm8150) as the rear ultrawide.\n\nRegister the sensor in the libipa CameraSensorHelper database and in\nthe sensor properties database so SoftIPA can drive AE/AGC and so\napplications get correct pixel-array metadata.\n\nProvenance of the values:\n\n - Analogue gain model: the kernel driver writes V4L2_CID_ANALOGUE_GAIN\n (range 128..2047, default 128, step 1) directly to the sensor's\n OV8856_REG_ANALOG_GAIN, placing unity gain at code 128 and a\n maximum of 15.99x at code 2047. This is the same 7-bit linear\n 1/128-step model used by the existing OV8858 helper.\n Reference: drivers/media/i2c/ov8856.c, OV8856_ANAL_GAIN_*.\n\n - Pixel pitch 1.12 µm: OmniVision OV8856 datasheet (1/4\" 8 MP RAW\n sensor, 3264 x 2448 active, 1.12 µm pixel).\n\n - Test pattern modes: the kernel driver registers a 5-entry menu\n (ov8856_test_pattern_menu[]). Index 0 is \"Disabled\" and index 1\n is \"Standard Color Bar\", matching TestPatternModeOff and\n TestPatternModeColorBars. Indices 2..4 are \"Top-Bottom\",\n \"Right-Left\" and \"Bottom-Top Darker Color Bar\" with no\n corresponding libcamera TestPatternMode (the OV8858 entry omits\n them for the same reason).\n\n - Sensor delays: left as the default-constructed value. The kernel\n driver does not use group hold; the actual exposure/gain apply\n latency has not been measured on this sensor. Matches the OV8858\n entry.\n\nTested with the simple pipeline + SoftwareIsp at 1640 x 1232 / 30 fps\non Xiaomi Poco X3 Pro (sm8150 CAMSS).\n\nSigned-off-by: Elmo Todurov <elmo_git@todurov.eu>\n---\n src/ipa/libipa/camera_sensor_helper.cpp | 11 +++++++++++\n src/libcamera/sensor/camera_sensor_properties.cpp | 13 +++++++++++++\n 2 files changed, 24 insertions(+)", "diff": "diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\nindex 3028197e1..ccb0bf085 100644\n--- a/src/ipa/libipa/camera_sensor_helper.cpp\n+++ b/src/ipa/libipa/camera_sensor_helper.cpp\n@@ -755,6 +755,17 @@ public:\n };\n REGISTER_CAMERA_SENSOR_HELPER(\"ov64a40\", CameraSensorHelperOv64a40)\n \n+class CameraSensorHelperOv8856 : public CameraSensorHelper\n+{\n+public:\n+\tCameraSensorHelperOv8856()\n+\t{\n+\t\t/* OV8856 uses the same 7-bit 1/128 step linear gain as OV8858. */\n+\t\tgain_ = AnalogueGainLinear{ 1, 0, 0, 128 };\n+\t}\n+};\n+REGISTER_CAMERA_SENSOR_HELPER(\"ov8856\", CameraSensorHelperOv8856)\n+\n class CameraSensorHelperOv8858 : public CameraSensorHelper\n {\n public:\ndiff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp\nindex b217363d8..b915ad5b6 100644\n--- a/src/libcamera/sensor/camera_sensor_properties.cpp\n+++ b/src/libcamera/sensor/camera_sensor_properties.cpp\n@@ -446,6 +446,19 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n \t\t\t\t.hblankDelay = 2\n \t\t\t},\n \t\t} },\n+\t\t{ \"ov8856\", {\n+\t\t\t.unitCellSize = { 1120, 1120 },\n+\t\t\t.testPatternModes = {\n+\t\t\t\t{ controls::draft::TestPatternModeOff, 0 },\n+\t\t\t\t{ controls::draft::TestPatternModeColorBars, 1 },\n+\t\t\t},\n+\t\t\t.sensorDelays = {\n+\t\t\t\t.exposureDelay = 2,\n+\t\t\t\t.gainDelay = 2,\n+\t\t\t\t.vblankDelay = 2,\n+\t\t\t\t.hblankDelay = 2,\n+\t\t\t},\n+\t\t} },\n \t\t{ \"ov8858\", {\n \t\t\t.unitCellSize = { 1120, 1120 },\n \t\t\t.testPatternModes = {\n", "prefixes": [] }