[{"id":30453,"web_url":"https://patchwork.libcamera.org/comment/30453/","msgid":"<172174557953.392292.12058358385725328768@ping.linuxembedded.co.uk>","date":"2024-07-23T14:39:39","subject":"Re: [PATCH v1] libipa: camera_sensor_helper: Add OV5675 black level","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Daniel Semkowicz (2024-07-23 15:17:58)\n> Add black level value for OV5675 camera.\n> According to datasheet, default value is 0x10, 10 bits width.\n\nI don't have that datasheet, but given the above statement the below is\ncorrect:\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> \n> Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>\n> ---\n>  src/ipa/libipa/camera_sensor_helper.cpp | 2 ++\n>  1 file changed, 2 insertions(+)\n> \n> diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\n> index a1339c83..79608c00 100644\n> --- a/src/ipa/libipa/camera_sensor_helper.cpp\n> +++ b/src/ipa/libipa/camera_sensor_helper.cpp\n> @@ -601,6 +601,8 @@ class CameraSensorHelperOv5675 : public CameraSensorHelper\n>  public:\n>         CameraSensorHelperOv5675()\n>         {\n> +               /* From datasheet: 0x10 at 10bits. */\n> +               blackLevel_ = 1024;\n>                 gainType_ = AnalogueGainLinear;\n>                 gainConstants_.linear = { 1, 0, 0, 128 };\n>         }\n> -- \n> 2.45.2\n> \n>","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 9ED51BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 23 Jul 2024 14:39:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7CA5D6336B;\n\tTue, 23 Jul 2024 16:39:44 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C8054619A3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Jul 2024 16:39:42 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 74EF063C;\n\tTue, 23 Jul 2024 16:39:00 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"iJHGU4uC\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1721745540;\n\tbh=TK5ekGdA97c0W+3qXPcdjpGPmfNWo2cnKmahJadU0S4=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=iJHGU4uC3YOpelB+TzVK8emtyag3EZG60qFOdrZGEbg1eC88p4DbYZGWp+ijqODh5\n\tzQ3VHfwRBKZMH0Fgaf0uqecDw/KyK3wOpAzKt4gMF/uU7CZ5DFhq86+RREu3ED2h91\n\tLmuPxqckGQ/bUKsw/mNigdevMutZa+mzhdbrdBPg=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240723141814.76823-1-dse@thaumatec.com>","References":"<20240723141814.76823-1-dse@thaumatec.com>","Subject":"Re: [PATCH v1] libipa: camera_sensor_helper: Add OV5675 black level","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Daniel Semkowicz <dse@thaumatec.com>","To":"Daniel Semkowicz <dse@thaumatec.com>, libcamera-devel@lists.libcamera.org","Date":"Tue, 23 Jul 2024 15:39:39 +0100","Message-ID":"<172174557953.392292.12058358385725328768@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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>"}},{"id":30454,"web_url":"https://patchwork.libcamera.org/comment/30454/","msgid":"<caa0c2fc-f1d5-4561-af9f-c60e8b6d1113@cherry.de>","date":"2024-07-23T14:25:34","subject":"Re: [PATCH v1] libipa: camera_sensor_helper: Add OV5675 black level","submitter":{"id":202,"url":"https://patchwork.libcamera.org/api/people/202/","name":"Quentin Schulz","email":"quentin.schulz@cherry.de"},"content":"Hi Daniel,\n\nOn 7/23/24 4:17 PM, Daniel Semkowicz wrote:\n> Add black level value for OV5675 camera.\n> According to datasheet, default value is 0x10, 10 bits width.\n> \n> Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>\n\nYes.... but I just checked now the init sequence in the Linux kernel \ndriver and it's different from the default :/\n\nThe 10b value is stored in two registers: 0x4002 BLC[9:8] as LSBs and \n0x4003 for BLC[7:0]. The default value is indeed 0x00 and 0x10, BUT the \ndriver sets 0x4003 to 0x40 so I think this needs to be 0x40? Can you see \nif this makes things better?\n\nCheers,\nQuentin","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 B0777BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 23 Jul 2024 14:42:04 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C2A2C6336F;\n\tTue, 23 Jul 2024 16:42:03 +0200 (CEST)","from AS8PR04CU009.outbound.protection.outlook.com\n\t(mail-westeuropeazlp170110003.outbound.protection.outlook.com\n\t[IPv6:2a01:111:f403:c201::3])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 54F0B619A1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Jul 2024 16:25:38 +0200 (CEST)","from AM9PR04MB8906.eurprd04.prod.outlook.com (2603:10a6:20b:409::9)\n\tby DU4PR04MB10957.eurprd04.prod.outlook.com (2603:10a6:10:584::17)\n\twith Microsoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.14;\n\tTue, 23 Jul 2024 14:25:36 +0000","from AM9PR04MB8906.eurprd04.prod.outlook.com\n\t([fe80::d379:5378:b1:cea]) by AM9PR04MB8906.eurprd04.prod.outlook.com\n\t([fe80::d379:5378:b1:cea%3]) with mapi id 15.20.7784.016;\n\tTue, 23 Jul 2024 14:25:35 +0000"],"Authentication-Results":["lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=cherry.de header.i=@cherry.de\n\theader.b=\"ED5/59XK\"; dkim-atps=neutral","dkim=none (message not signed)\n\theader.d=none;dmarc=none action=none header.from=cherry.de;"],"ARC-Seal":"i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n\tb=YJyySIWIJUNOtoHZki/E8iI2wf+d3HfVTwSspQMmnRMHi0HNYq5C3Mv8prcrUqfHC7Cb3+jTkFwx2AgcMtAf+uXRXnl/DR93uP7TmmpIjFtiUsw1flCodsmL3iFLuT+XMbdpf41R02pGFO8txKk8teP/dd3dyWjSp2i+1QIvsjc/hSufk/0WsFWslOg5DaTnRvzYrxtebV9M9658epzZqyC7MrI1EHUQ68xrV53qRzjmbyPWkewYYQvUxIuUf5WpcyAmQMeReDHUsrqTvLVSIyHWwSXU/ThPILsA0wkaLXJ/ZHcxfNmydxyJp0HbODnCilTDPvGO0UFHAVmWryjRTA==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n\ts=arcselector10001;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n\tbh=/LXyWHR0Rn3E/0wHw82jWxLNqOgBtMt93onH/qbz8Yg=;\n\tb=tNQCOYDNN1bScLRIQ4FUo8DSlHSj8WUEUtGr9dZ1TZcLsbDJL7DMy/UBOzZAA8BGkkWlupz+TZ/c9YGBb+BxUBkXIaftocC0VxeBITs/f7IP84IOrKn2qyDr+NaDjcAHE1ciqN4jCCy8m4VPAIQaZXfHvuWIfYUTVTlO89OcXij9eUnLSz7DDLMTSgq2bZjnb09ug0eCUoExko5IktDGsRoq0dwiAGHDihbW0YpmZQEF+ibjOBHXVArYdaErMYT/jmUm6K9Ha/zFoWmYhizcDzc6oaoYvHBuI9Q3jz41yDXR8g9FXZqXG/UM4u749T1pZAo05sKhKunNRWMUsWxquw==","ARC-Authentication-Results":"i=1; mx.microsoft.com 1; spf=pass\n\tsmtp.mailfrom=cherry.de; dmarc=pass action=none header.from=cherry.de;\n\tdkim=pass header.d=cherry.de; arc=none","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=cherry.de;\n\ts=selector1; \n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n\tbh=/LXyWHR0Rn3E/0wHw82jWxLNqOgBtMt93onH/qbz8Yg=;\n\tb=ED5/59XKDmx8MSv/nUx0iYqJQA/IDD3PWkox1GIS6SQ3sk51TDXXARWbe8n4PZwtvG9zyH7fORwLBV7SeUT2UcuoIhAq2KcSowx5JrVdfWFwzlscHjS1qKSv6nKSPE0r/wNuqdddcj7IEoGEgVbuDfodEsS9H8IFiOv/r8UzmBI=","Message-ID":"<caa0c2fc-f1d5-4561-af9f-c60e8b6d1113@cherry.de>","Date":"Tue, 23 Jul 2024 16:25:34 +0200","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v1] libipa: camera_sensor_helper: Add OV5675 black level","To":"Daniel Semkowicz <dse@thaumatec.com>, libcamera-devel@lists.libcamera.org","References":"<20240723141814.76823-1-dse@thaumatec.com>","Content-Language":"en-US","From":"Quentin Schulz <quentin.schulz@cherry.de>","In-Reply-To":"<20240723141814.76823-1-dse@thaumatec.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-ClientProxiedBy":"BE1P281CA0285.DEUP281.PROD.OUTLOOK.COM\n\t(2603:10a6:b10:84::10) To AM9PR04MB8906.eurprd04.prod.outlook.com\n\t(2603:10a6:20b:409::9)","MIME-Version":"1.0","X-MS-PublicTrafficType":"Email","X-MS-TrafficTypeDiagnostic":"AM9PR04MB8906:EE_|DU4PR04MB10957:EE_","X-MS-Office365-Filtering-Correlation-Id":"369eb18c-d696-46bc-71ec-08dcab23516f","X-MS-Exchange-SenderADCheck":"1","X-MS-Exchange-AntiSpam-Relay":"0","X-Microsoft-Antispam":"BCL:0;ARA:13230040|366016|376014|1800799024;","X-Microsoft-Antispam-Message-Info":"=?utf-8?q?GlizUOY66kUq7syNN99mrMbP46/c?=\n\t=?utf-8?q?UjxgqITzHryCMgxdMv6R/GhPT1nS/3HgGCwezV2IJXyVqDMe7JW498dz?=\n\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aO20nDk/5?=\n\t=?utf-8?q?cFZ7aOuSK38mToRbfnL37Cf0tf8Pj33oklD/xwXghv5Rwl8/Q3RwB7CZ?=\n\t=?utf-8?q?gzTA/Od4KWzktpBdTY8bZnhzz2D27ALOexl1HwrWwtxrCQjP7i4VxKGP?=\n\t=?utf-8?q?YrLj3Z0q8hcm8Rc7dhKcBP81AoK7qFSlIGcdxWB/Q9Fbk55yaHw0xagE?=\n\t=?utf-8?q?B+offZc/vZq7x+OOv1M9wAJWqsmDNNjfyWcMY3uyF7a8Rgg0zZ0anZ2y?=\n\t=?utf-8?q?TZPU4KrsZXH9chbk7f9zdIkRLGx/MJZFauZrzEwxaOBPGSLGaqkP7v+m?=\n\t=?utf-8?q?u/NeEzpTjiaMaG/GW/plSDokb5MyD9YeijMHOrM1frtKsoDVeOpdnO76?=\n\t=?utf-8?q?l8XdFOt6O88bbz1n7O5ZoUdphc2F+2RrSMX3ZYwhcj4NkTYxnXjP7Fks?=\n\t=?utf-8?q?/dFgD0fBGBbgKzOfmE3BNflIj/ZbE9p7yI+V37qTteTpPPId9Q=3D=3D?=","X-Forefront-Antispam-Report":"CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n\tIPV:NLI; SFV:NSPM; H:AM9PR04MB8906.eurprd04.prod.outlook.com; PTR:;\n\tCAT:NONE; \n\tSFS:(13230040)(366016)(376014)(1800799024); DIR:OUT; SFP:1102; ","X-MS-Exchange-AntiSpam-MessageData-ChunkCount":"1","X-MS-Exchange-AntiSpam-MessageData-0":"=?utf-8?q?kBxIs5ADzMQzTMah86luhupj6?=\n\t=?utf-8?q?H8qMNEw5jsqlTfZYIL9oa50Us10i10Cu6OvtnAPM55tkgW4S6M1C0Zc6?=\n\t=?utf-8?q?tN9awIWBTPjmh+qkU/k88sOzeZEJvNrvFQPxcYoCF798zaF+ngOwe6ar?=\n\t=?utf-8?q?49xcmVJJ5+hN+5mbew1/nCydXFff2Sc69GhoDhnB/U7OV4oa4yMZfhg+?=\n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n\t=?utf-8?q?1EdP3ujxWqPwipKfj2qwXVZbltpNI4PrPIVzMRqBvoRB9pQ0KsBjvial?=\n\t=?utf-8?q?upEUv6sPcwL5YYogp85K0MdP5hDRunh6GMqHIBuPTub3CgE40lXzfF0N?=\n\t=?utf-8?q?tgRG1oSmDn4Xz3fsGQ8dbOAQRq4Ye/IGumihSbolIO8bydwDlGeWoIuu?=\n\t=?utf-8?q?NhHf9H+uPlvjYS6MSIXjN43l73+jdaAYeIbwzOobRtn6WGuAhXgihaQ3?=\n\t=?utf-8?q?6d9dR0gnKeHUQ2oG6A6Wc3Xvub9YSU5Ak+BmjbI79GgFToXUKX/Q0NQw?=\n\t=?utf-8?q?AemWWE3LM87JhGPKCBdKeXLwT4ofwZWsixoB6wdGqunb+TI7DSwpf94I?=\n\t=?utf-8?q?v854zb6pTgC+756sSZG4B62Ov6fPp3E43RXQ+ZSDd471YoyPOOyHKQWW?=\n\t=?utf-8?q?SUlyK5hX9cMDjN0DmZfGrUcd5ftpsKq+St+ME4b69JSuZ7XeRVwVYg50?=\n\t=?utf-8?q?+lK5KGMwJuwrVL09oOnfYcZmUv5KsPnHF7FYf/Cex2GnEYphvIwQaBSY?=\n\t=?utf-8?q?Ava5pXqvAx2BNnNuhj+/ki3w3eSFQONCx9tbJUiXUHwM2L6mEdD7BVPQ?=\n\t=?utf-8?q?QjdheCQxyOa+eqIC6iw1Ja3j1AZRw=3D=3D?=","X-OriginatorOrg":"cherry.de","X-MS-Exchange-CrossTenant-Network-Message-Id":"369eb18c-d696-46bc-71ec-08dcab23516f","X-MS-Exchange-CrossTenant-AuthSource":"AM9PR04MB8906.eurprd04.prod.outlook.com","X-MS-Exchange-CrossTenant-AuthAs":"Internal","X-MS-Exchange-CrossTenant-OriginalArrivalTime":"23 Jul 2024 14:25:35.9451\n\t(UTC)","X-MS-Exchange-CrossTenant-FromEntityHeader":"Hosted","X-MS-Exchange-CrossTenant-Id":"5e0e1b52-21b5-4e7b-83bb-514ec460677e","X-MS-Exchange-CrossTenant-MailboxType":"HOSTED","X-MS-Exchange-CrossTenant-UserPrincipalName":"HSDX3quBwSp/mQ6VMvO54yLlCJknzZqUbfiOCphSJpq7Qsk7G1jrDj3zxUjQMyVx/pnVOiluWc47ab83XqoV9S/J62yvofnTPf597ossAEY=","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"DU4PR04MB10957","X-Mailman-Approved-At":"Tue, 23 Jul 2024 16:42:02 +0200","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>"}},{"id":30455,"web_url":"https://patchwork.libcamera.org/comment/30455/","msgid":"<CAHgnY3=Z4PfaQJe_qjdp-xEg1-dLfCZw7dCbrjOquP2Vhb6kzA@mail.gmail.com>","date":"2024-07-23T14:47:54","subject":"Re: [PATCH v1] libipa: camera_sensor_helper: Add OV5675 black level","submitter":{"id":126,"url":"https://patchwork.libcamera.org/api/people/126/","name":"Daniel Semkowicz","email":"dse@thaumatec.com"},"content":"True, I missed it... Thanks!\n\nI will upload v2 with value from kernel driver.\n\n\nOn Tue, Jul 23, 2024 at 4:39 PM Kieran Bingham\n<kieran.bingham@ideasonboard.com> wrote:\n>\n> Quoting Daniel Semkowicz (2024-07-23 15:17:58)\n> > Add black level value for OV5675 camera.\n> > According to datasheet, default value is 0x10, 10 bits width.\n>\n> I don't have that datasheet, but given the above statement the below is\n> correct:\n>\n>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>\n> >\n> > Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>\n> > ---\n> >  src/ipa/libipa/camera_sensor_helper.cpp | 2 ++\n> >  1 file changed, 2 insertions(+)\n> >\n> > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\n> > index a1339c83..79608c00 100644\n> > --- a/src/ipa/libipa/camera_sensor_helper.cpp\n> > +++ b/src/ipa/libipa/camera_sensor_helper.cpp\n> > @@ -601,6 +601,8 @@ class CameraSensorHelperOv5675 : public CameraSensorHelper\n> >  public:\n> >         CameraSensorHelperOv5675()\n> >         {\n> > +               /* From datasheet: 0x10 at 10bits. */\n> > +               blackLevel_ = 1024;\n> >                 gainType_ = AnalogueGainLinear;\n> >                 gainConstants_.linear = { 1, 0, 0, 128 };\n> >         }\n> > --\n> > 2.45.2\n> >\n> >","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 307CDC323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 23 Jul 2024 14:48:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 18D8C63370;\n\tTue, 23 Jul 2024 16:48:09 +0200 (CEST)","from mail-ed1-x532.google.com (mail-ed1-x532.google.com\n\t[IPv6:2a00:1450:4864:20::532])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C5ABC619A1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Jul 2024 16:48:06 +0200 (CEST)","by mail-ed1-x532.google.com with SMTP id\n\t4fb4d7f45d1cf-5a108354819so5308128a12.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Jul 2024 07:48:06 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=thaumatec-com.20230601.gappssmtp.com\n\theader.i=@thaumatec-com.20230601.gappssmtp.com\n\theader.b=\"WVFKK7mY\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=thaumatec-com.20230601.gappssmtp.com; s=20230601; t=1721746086;\n\tx=1722350886; darn=lists.libcamera.org; \n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:in-reply-to:references:mime-version:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=C+myA1vF2sz6LT4k7jrMbzVFaNtfZY80knP6Rexs+Ik=;\n\tb=WVFKK7mYI3dfvGGLadIqQ3Ulcqfbhi8PQSCoTRAnkTGhtGVwAVfLz37zqB1K8BZ8nT\n\tSWmvcFX62Ps5oxg+VrtRhZHpFzwn16DC3lvxQ9gm9PIBk9ABZxj574Z2tgs8l582faZt\n\tjccp72Mor1AsttTpig1OFOEYBgXVFi/EE3ocK9cICS92etv/o28RwukEN7dw9cy11pMJ\n\tOlq/r08+4LXpu3OXlugVm3zzM3/9wEHjUm/MwViC6Y2uGaQ1rvrrewyP2iZ9666IAojo\n\t3SfGw+x/2NSVuKz0tiJH2nz6kKV8XdoUlstAqt0MsMKU+LuFKa/1p+w51Ccyg33Md9iw\n\tYVeg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1721746086; x=1722350886;\n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=C+myA1vF2sz6LT4k7jrMbzVFaNtfZY80knP6Rexs+Ik=;\n\tb=H1waXiVJnKztd1XE1wi8yFxX7Xq1SimaMHXRe5Y6iN13j3x+z7O4OT6zbM3Rke8h4B\n\thNMkZ/1fhgcTkfbQuPCqmrXObyJRmV47VK3wNktSfvp/rIZI0G6kp4uCPEgf4k/yO9gM\n\thw0sXN3+k/cI0VCUIkSlQ08sUgxANYcZd1UPjVbfdKS5NFHiY2Mh68Ftq4WEdpVqYsic\n\tRJM92lZNUB6NO+uGQTA6sjwukXtoeZ9TnlLx6iooXDH/FVgoNPEzbEv2AQRT54RfBPfy\n\tKN03r7ovY9aPJCBqiKM8MP0EmCcujUdw91h40zznDVkMh8owJo29LtGd36OHiOg3a7N2\n\t7jiA==","X-Gm-Message-State":"AOJu0YxaG6pDG7plkHXxg0Z8bIDrYRS8tWKBZ+/JnLHnaV8TkLA3ZpBb\n\tUncFMcKFDMk/fJNud5RH/qslndY60+3CbHK9E9CeO06cT3bfrnUu7Bz0NAANXKtzRos1GJtdkDS\n\tWmxpwJkgToLXeyM0dTo7iEga3mzpq1c0UAFgIprs5c3AV/9rf","X-Google-Smtp-Source":"AGHT+IG7TovwWy9T9yQIAcxLMwdfddvx/OTYIU3MBoJ5DTUCGXQ0tcHqWATxGATKLQNZNZ1NFUQQ4Jx7JkGnmbLFMn4=","X-Received":"by 2002:a50:8715:0:b0:58b:9561:650b with SMTP id\n\t4fb4d7f45d1cf-5aaa53ac199mr77304a12.25.1721746086122; Tue, 23 Jul 2024\n\t07:48:06 -0700 (PDT)","MIME-Version":"1.0","References":"<20240723141814.76823-1-dse@thaumatec.com>\n\t<172174557953.392292.12058358385725328768@ping.linuxembedded.co.uk>","In-Reply-To":"<172174557953.392292.12058358385725328768@ping.linuxembedded.co.uk>","From":"Daniel Semkowicz <dse@thaumatec.com>","Date":"Tue, 23 Jul 2024 16:47:54 +0200","Message-ID":"<CAHgnY3=Z4PfaQJe_qjdp-xEg1-dLfCZw7dCbrjOquP2Vhb6kzA@mail.gmail.com>","Subject":"Re: [PATCH v1] libipa: camera_sensor_helper: Add OV5675 black level","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","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>"}},{"id":30456,"web_url":"https://patchwork.libcamera.org/comment/30456/","msgid":"<172174636337.392292.9421054511404474348@ping.linuxembedded.co.uk>","date":"2024-07-23T14:52:43","subject":"Re: [PATCH v1] libipa: camera_sensor_helper: Add OV5675 black level","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Quentin Schulz (2024-07-23 15:25:34)\n> Hi Daniel,\n> \n> On 7/23/24 4:17 PM, Daniel Semkowicz wrote:\n> > Add black level value for OV5675 camera.\n> > According to datasheet, default value is 0x10, 10 bits width.\n> > \n> > Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>\n> \n> Yes.... but I just checked now the init sequence in the Linux kernel \n> driver and it's different from the default :/\n> \n> The 10b value is stored in two registers: 0x4002 BLC[9:8] as LSBs and \n> 0x4003 for BLC[7:0]. The default value is indeed 0x00 and 0x10, BUT the \n> driver sets 0x4003 to 0x40 so I think this needs to be 0x40? Can you see \n> if this makes things better?\n\nYikes,\n\nThat means we really can't even trust the datasheet values and we should\nbe exposing that value from the kernel through the control framework and\nreading it (or setting it ?) at runtime.\n\n--\nKieran","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 5FB68BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 23 Jul 2024 14:52:49 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 465296336B;\n\tTue, 23 Jul 2024 16:52:48 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4BE18619A1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Jul 2024 16:52:46 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C81CC4CD;\n\tTue, 23 Jul 2024 16:52:03 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"pDUi3Kxb\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1721746323;\n\tbh=JaZzERH+dgggkG3uAFRi3jCA50xSc1DdLMxjo6cu7lg=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=pDUi3Kxb5cEt02lUW14JAOiUcfPUSJbsq5H4iX9k85y2RbPxAs6crZ71g6KNOGcKF\n\t0IjAPfrfFMdrVrA9s5aGsvgB0oWuQ4SOXl8MuxIxML7kZn9F1iWLCxuhNLsWAVSAu7\n\tPtlzbsaE9bVPciCKauA9rzoMm12yMKHesXHUCty0=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<caa0c2fc-f1d5-4561-af9f-c60e8b6d1113@cherry.de>","References":"<20240723141814.76823-1-dse@thaumatec.com>\n\t<caa0c2fc-f1d5-4561-af9f-c60e8b6d1113@cherry.de>","Subject":"Re: [PATCH v1] libipa: camera_sensor_helper: Add OV5675 black level","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Daniel Semkowicz <dse@thaumatec.com>,\n\tQuentin Schulz <quentin.schulz@cherry.de>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Tue, 23 Jul 2024 15:52:43 +0100","Message-ID":"<172174636337.392292.9421054511404474348@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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>"}}]