[1/3] camera_sensor: Documentation: Add GalaxyCore gc2145 sensor properties
diff mbox series

Message ID 20261006-gc2145-support-v1-1-7482dfcde96f@ideasonboard.com
State New
Headers show
Series
  • Add support GalaxyCore GC2145 sensor
Related show

Commit Message

Alen Karnil Oct. 6, 2026, 8:23 a.m. UTC
Provide camera sensor properties for the GalaxyCore gc2145 sensor.

Signed-off-by: Alen Karnil <alen.karnil@ideasonboard.com>
---
 Documentation/sensor-support.rst                  | 2 +-
 src/libcamera/sensor/camera_sensor_properties.cpp | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

Comments

Barnabás Pőcze Oct. 6, 2026, 10:54 a.m. UTC | #1
Hi

2026. 10. 06. 10:23 keltezéssel, Alen Karnil írta:
> Provide camera sensor properties for the GalaxyCore gc2145 sensor.
> 
> Signed-off-by: Alen Karnil <alen.karnil@ideasonboard.com>
> ---
>   Documentation/sensor-support.rst                  | 2 +-
>   src/libcamera/sensor/camera_sensor_properties.cpp | 8 ++++++++
>   2 files changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/sensor-support.rst b/Documentation/sensor-support.rst
> index 9d71f3db..85879679 100644
> --- a/Documentation/sensor-support.rst
> +++ b/Documentation/sensor-support.rst
> @@ -29,4 +29,4 @@ Existing support includes the following camera sensors:
>      * - ST-Microelectronics
>        - VD56G3
>      * - Galaxy Core
> -     - GC05A2, GC08A3
> +     - GC05A2, GC08A3, GC2145
> diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp
> index 20cfd0bc..bb63cefe 100644
> --- a/src/libcamera/sensor/camera_sensor_properties.cpp
> +++ b/src/libcamera/sensor/camera_sensor_properties.cpp
> @@ -132,6 +132,14 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen
>   				.hblankDelay = 2
>   			},
>   		} },
> +		{ "gc2145", {
> +			.unitCellSize = { 1750, 1750 },

This looks good based on https://files.pine64.org/doc/datasheet/PinebookPro/GC2145%20CSP%20DataSheet%20release%20V1.0_20131201.pdf



> +			.testPatternModes = {
> +				{ controls::draft::TestPatternModeOff, 0 },
> +				{ controls::draft::TestPatternModeSolidColor, 1 },

The mainline kernel driver has "Colored patterns" for 1. So I'd expect that to be
TestPatternModeColorBars or similar. Does the kernel driver have the wrong description?

I'm attaching what I see. Does that match what you see?



> +			},
> +			.sensorDelays = { },
> +		} },
>   		{ "hi846", {
>   			.unitCellSize = { 1120, 1120 },
>   			.testPatternModes = {
>
Barnabás Pőcze Oct. 7, 2026, 8:15 a.m. UTC | #2
2026. 10. 06. 16:47 keltezéssel, Alen Karnil írta:
> 
> 
> On 06/10/2026 11:54, Barnabás Pőcze wrote:
>> Hi
>>
>> 2026. 10. 06. 10:23 keltezéssel, Alen Karnil írta:
>>> Provide camera sensor properties for the GalaxyCore gc2145 sensor.
>>>
>>> Signed-off-by: Alen Karnil <alen.karnil@ideasonboard.com>
>>> ---
>>>   Documentation/sensor-support.rst                  | 2 +-
>>>   src/libcamera/sensor/camera_sensor_properties.cpp | 8 ++++++++
>>>   2 files changed, 9 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Documentation/sensor-support.rst b/Documentation/sensor- support.rst
>>> index 9d71f3db..85879679 100644
>>> --- a/Documentation/sensor-support.rst
>>> +++ b/Documentation/sensor-support.rst
>>> @@ -29,4 +29,4 @@ Existing support includes the following camera sensors:
>>>      * - ST-Microelectronics
>>>        - VD56G3
>>>      * - Galaxy Core
>>> -     - GC05A2, GC08A3
>>> +     - GC05A2, GC08A3, GC2145
>>> diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/ libcamera/sensor/camera_sensor_properties.cpp
>>> index 20cfd0bc..bb63cefe 100644
>>> --- a/src/libcamera/sensor/camera_sensor_properties.cpp
>>> +++ b/src/libcamera/sensor/camera_sensor_properties.cpp
>>> @@ -132,6 +132,14 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen
>>>                   .hblankDelay = 2
>>>               },
>>>           } },
>>> +        { "gc2145", {
>>> +            .unitCellSize = { 1750, 1750 },
>>
>> This looks good based on https://files.pine64.org/doc/datasheet/ PinebookPro/GC2145%20CSP%20DataSheet%20release%20V1.0_20131201.pdf
>>
>>
>>
>>> +            .testPatternModes = {
>>> +                { controls::draft::TestPatternModeOff, 0 },
>>> +                { controls::draft::TestPatternModeSolidColor, 1 },
>>
>> The mainline kernel driver has "Colored patterns" for 1. So I'd expect that to be
>> TestPatternModeColorBars or similar. Does the kernel driver have the wrong description?
>>
>> I'm attaching what I see. Does that match what you see?
> 
> You are correct, It is TestPatternModeColorBars, I will need to update that for v2.
> 
> How are solid colours dealt with?
> 
> Given that there are multiple 7 solid colour options?>

Now that I look at it again, "ColorBars" is described as:

             All pixel data is replaced with an 8-bar color pattern. The vertical
             bars (left-to-right) are as follows; white, yellow, cyan, green,
             magenta, red, blue and black. Each bar should take up 1/8 of the
             sensor pixel array width. When this is not possible, the bar size
             should be rounded down to the nearest integer and the pattern can
             repeat on the right side. Each bar's height must always take up the
             full sensor pixel array height.

so that unfortunately does not fit. "SolidColor" is as follows:

             Each pixel in [R, G_even, G_odd, B] is replaced by its respective
             color channel provided in test pattern data.
             \todo Add control for test pattern data.

Given that the control has not yet materialized, I think it's fine to maybe
just map it to the test pattern that generates all white.

>>
>>
>>> +            },
>>> +            .sensorDelays = { },
>>> +        } },
>>>           { "hi846", {
>>>               .unitCellSize = { 1120, 1120 },
>>>               .testPatternModes = {
>>>
>

Patch
diff mbox series

diff --git a/Documentation/sensor-support.rst b/Documentation/sensor-support.rst
index 9d71f3db..85879679 100644
--- a/Documentation/sensor-support.rst
+++ b/Documentation/sensor-support.rst
@@ -29,4 +29,4 @@  Existing support includes the following camera sensors:
    * - ST-Microelectronics
      - VD56G3
    * - Galaxy Core
-     - GC05A2, GC08A3
+     - GC05A2, GC08A3, GC2145
diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp
index 20cfd0bc..bb63cefe 100644
--- a/src/libcamera/sensor/camera_sensor_properties.cpp
+++ b/src/libcamera/sensor/camera_sensor_properties.cpp
@@ -132,6 +132,14 @@  const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen
 				.hblankDelay = 2
 			},
 		} },
+		{ "gc2145", {
+			.unitCellSize = { 1750, 1750 },
+			.testPatternModes = {
+				{ controls::draft::TestPatternModeOff, 0 },
+				{ controls::draft::TestPatternModeSolidColor, 1 },
+			},
+			.sensorDelays = { },
+		} },
 		{ "hi846", {
 			.unitCellSize = { 1120, 1120 },
 			.testPatternModes = {