<div dir="ltr">> I'm surprised by the name here. Is this from the mainline driver ?<div>Me too. It is what libcamera reports while I'm running the latest 5.x mainline kernel pushed to Arch/Manjaro as of 4 days ago.</div><div><br></div><div>> Looking at<br>> <a href="http://www.ahdsensor.com/uploadfile/202008/55322e75316871.pdf" rel="noreferrer" target="_blank">http://www.ahdsensor.com/uploadfile/202008/55322e75316871.pdf</a>, this<br>> doesn't seem to match the description of the gain controls in table 5-8.<br>> In "real gain" mode, the gain registers seem to be expressed in Q4.4<br>> format.</div><div>I copy-pasted to get this working and forgot to come back! Fixed based on the datasheet you linked by changing 128 to 16, which is the gain control reported by the datasheet. See forthcoming commit and commit message for details.</div><div><br></div><div>-Nicholas</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 24, 2022 at 8:52 AM Laurent Pinchart <<a href="mailto:laurent.pinchart@ideasonboard.com">laurent.pinchart@ideasonboard.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Nicholas,<br>
<br>
Thank you for the patch.<br>
<br>
On Mon, Oct 24, 2022 at 12:55:36AM -0500, Nicholas Roth via libcamera-devel wrote:<br>
> From: Nicholas Roth <<a href="mailto:nicholas@rothemail.net" target="_blank">nicholas@rothemail.net</a>><br>
> <br>
> ---<br>
> src/ipa/libipa/camera_sensor_helper.cpp | 11 +++++++++++<br>
> src/libcamera/camera_sensor_properties.cpp | 14 ++++++++++++++<br>
> 2 files changed, 25 insertions(+)<br>
> <br>
> diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp<br>
> index 35056bec..1d9a45a7 100644<br>
> --- a/src/ipa/libipa/camera_sensor_helper.cpp<br>
> +++ b/src/ipa/libipa/camera_sensor_helper.cpp<br>
> @@ -476,6 +476,17 @@ public:<br>
> };<br>
> REGISTER_CAMERA_SENSOR_HELPER("ov5693", CameraSensorHelperOv5693)<br>
> <br>
> +class CameraSensorHelperOv8858 : public CameraSensorHelper<br>
> +{<br>
> +public:<br>
> + CameraSensorHelperOv8858()<br>
> + {<br>
> + gainType_ = AnalogueGainLinear;<br>
> + gainConstants_.linear = { 1, 0, 0, 128 };<br>
<br>
Looking at<br>
<a href="http://www.ahdsensor.com/uploadfile/202008/55322e75316871.pdf" rel="noreferrer" target="_blank">http://www.ahdsensor.com/uploadfile/202008/55322e75316871.pdf</a>, this<br>
doesn't seem to match the description of the gain controls in table 5-8.<br>
In "real gain" mode, the gain registers seem to be expressed in Q4.4<br>
format.<br>
<br>
> + }<br>
> +};<br>
> +REGISTER_CAMERA_SENSOR_HELPER("m00_f_ov8858", CameraSensorHelperOv8858)<br>
> +<br>
> class CameraSensorHelperOv8865 : public CameraSensorHelper<br>
> {<br>
> public:<br>
> diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp<br>
> index e5f27f06..d0757c15 100644<br>
> --- a/src/libcamera/camera_sensor_properties.cpp<br>
> +++ b/src/libcamera/camera_sensor_properties.cpp<br>
> @@ -146,6 +146,20 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen<br>
> */<br>
> },<br>
> } },<br>
> + { "m00_f_ov8858", {<br>
<br>
I'm surprised by the name here. Is this from the mainline driver ?<br>
<br>
> + .unitCellSize = { 1200, 1200 },<br>
> + .testPatternModes = {<br>
> + { controls::draft::TestPatternModeOff, 0 },<br>
> + { controls::draft::TestPatternModeColorBars, 1 },<br>
> + /*<br>
> + * No best corresponding test pattern for:<br>
> + * 1: "Vertical Color Bar Type 1",<br>
> + * 2: "Vertical Color Bar Type 2",<br>
> + * 3: "Vertical Color Bar Type 3",<br>
> + * 4: "Vertical Color Bar Type 4"<br>
> + */<br>
> + },<br>
> + } },<br>
> { "ov8865", {<br>
> .unitCellSize = { 1400, 1400 },<br>
> .testPatternModes = {<br>
<br>
-- <br>
Regards,<br>
<br>
Laurent Pinchart<br>
</blockquote></div>