Message ID | 20241121085800.3208123-2-chenghaoyang@chromium.org |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
Quoting Harvey Yang (2024-11-21 08:57:16) > From: Harvey Yang <chenghaoyang@google.com> > > Provide the GalaxyCore gc05a2 camera sensor properties and registration > with libipa for the gain code helpers. > > Signed-off-by: Han-Lin Chen <hanlinchen@chromium.org> > Co-developed-by: Xing Gu <xinggu@chromium.org> > Co-developed-by: Yudhistira Erlandinata <yerlandinata@chromium.org> > Co-developed-by: Harvey Yang <chenghaoyang@chromium.org> > --- > src/ipa/libipa/camera_sensor_helper.cpp | 13 +++++++++++++ > src/libcamera/sensor/camera_sensor_properties.cpp | 7 +++++++ > 2 files changed, 20 insertions(+) > > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp > index c6169bdc7..3067d9bc1 100644 > --- a/src/ipa/libipa/camera_sensor_helper.cpp > +++ b/src/ipa/libipa/camera_sensor_helper.cpp > @@ -519,6 +519,19 @@ private: > }; > REGISTER_CAMERA_SENSOR_HELPER("ar0521", CameraSensorHelperAr0521) > > +class CameraSensorHelperGc05a2 : public CameraSensorHelper > +{ > +public: > + CameraSensorHelperGc05a2() > + { > + /* From datasheet: 64 at 10bits. */ > + blackLevel_ = 4096; Perfect, thanks Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > + gainType_ = AnalogueGainLinear; > + gainConstants_.linear = { 100, 0, 0, 1024 }; > + } > +}; > +REGISTER_CAMERA_SENSOR_HELPER("gc05a2", CameraSensorHelperGc05a2) > + > class CameraSensorHelperImx214 : public CameraSensorHelper > { > public: > diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp > index 6d4136d03..2f048d4a3 100644 > --- a/src/libcamera/sensor/camera_sensor_properties.cpp > +++ b/src/libcamera/sensor/camera_sensor_properties.cpp > @@ -70,6 +70,13 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen > { controls::draft::TestPatternModeColorBarsFadeToGray, 3 }, > }, > } }, > + { "gc05a2", { > + .unitCellSize = { 1120, 1120 }, > + .testPatternModes = { > + { controls::draft::TestPatternModeOff, 0 }, > + { controls::draft::TestPatternModeColorBars, 1 }, > + }, > + } }, > { "hi846", { > .unitCellSize = { 1120, 1120 }, > .testPatternModes = { > -- > 2.47.0.338.g60cca15819-goog >
diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index c6169bdc7..3067d9bc1 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -519,6 +519,19 @@ private: }; REGISTER_CAMERA_SENSOR_HELPER("ar0521", CameraSensorHelperAr0521) +class CameraSensorHelperGc05a2 : public CameraSensorHelper +{ +public: + CameraSensorHelperGc05a2() + { + /* From datasheet: 64 at 10bits. */ + blackLevel_ = 4096; + gainType_ = AnalogueGainLinear; + gainConstants_.linear = { 100, 0, 0, 1024 }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("gc05a2", CameraSensorHelperGc05a2) + class CameraSensorHelperImx214 : public CameraSensorHelper { public: diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp index 6d4136d03..2f048d4a3 100644 --- a/src/libcamera/sensor/camera_sensor_properties.cpp +++ b/src/libcamera/sensor/camera_sensor_properties.cpp @@ -70,6 +70,13 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen { controls::draft::TestPatternModeColorBarsFadeToGray, 3 }, }, } }, + { "gc05a2", { + .unitCellSize = { 1120, 1120 }, + .testPatternModes = { + { controls::draft::TestPatternModeOff, 0 }, + { controls::draft::TestPatternModeColorBars, 1 }, + }, + } }, { "hi846", { .unitCellSize = { 1120, 1120 }, .testPatternModes = {