diff options
author | Eugen Hristev <eugen.hristev@microchip.com> | 2021-04-13 12:57:20 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-06-08 14:19:17 +0200 |
commit | e48848a6af150ed09d9761167aad2a7cd023470b (patch) | |
tree | 9ba467213659c1b0d576d839aefe95aa0455419f | |
parent | 883285556388affe1273a50d1af8772c30aa6d89 (diff) |
media: atmel: atmel-isc: create callback for GAM submodule product specific
The GAM submodule is a part of the atmel-isc pipeline, and stands for
Gamma Correction. It is used to apply the gamma curve to the incoming pixels.
Create a product specific callback for initializing the GAM submodule
of the pipeline.
For sama5d2 product, there is no special configuration at this moment,
thus this function is a noop.
[hverkuil: made isc_sama5d2_config_gam static]
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r-- | drivers/media/platform/atmel/atmel-isc-base.c | 1 | ||||
-rw-r--r-- | drivers/media/platform/atmel/atmel-isc.h | 3 | ||||
-rw-r--r-- | drivers/media/platform/atmel/atmel-sama5d2-isc.c | 6 |
3 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/platform/atmel/atmel-isc-base.c b/drivers/media/platform/atmel/atmel-isc-base.c index 777a5dc19d6e..aef0d6570d39 100644 --- a/drivers/media/platform/atmel/atmel-isc-base.c +++ b/drivers/media/platform/atmel/atmel-isc-base.c @@ -663,6 +663,7 @@ static void isc_set_pipeline(struct isc_device *isc, u32 pipeline) isc->config_csc(isc); isc->config_cbc(isc); isc->config_cc(isc); + isc->config_gam(isc); } static int isc_update_profile(struct isc_device *isc) diff --git a/drivers/media/platform/atmel/atmel-isc.h b/drivers/media/platform/atmel/atmel-isc.h index d6cd85a4c3e9..1e6988f1876e 100644 --- a/drivers/media/platform/atmel/atmel-isc.h +++ b/drivers/media/platform/atmel/atmel-isc.h @@ -229,6 +229,8 @@ struct isc_reg_offsets { * specific CBC module * @config_cc: pointer to a function that initializes product * specific CC module + * @config_gam: pointer to a function that initializes product + * specific GAMMA module * @config_ctrls: pointer to a functoin that initializes product * specific v4l2 controls. * @@ -306,6 +308,7 @@ struct isc_device { void (*config_csc)(struct isc_device *isc); void (*config_cbc)(struct isc_device *isc); void (*config_cc)(struct isc_device *isc); + void (*config_gam)(struct isc_device *isc); void (*config_ctrls)(struct isc_device *isc, const struct v4l2_ctrl_ops *ops); diff --git a/drivers/media/platform/atmel/atmel-sama5d2-isc.c b/drivers/media/platform/atmel/atmel-sama5d2-isc.c index b6b7dbdbfd1d..6973c65822d8 100644 --- a/drivers/media/platform/atmel/atmel-sama5d2-isc.c +++ b/drivers/media/platform/atmel/atmel-sama5d2-isc.c @@ -112,6 +112,11 @@ static void isc_sama5d2_config_dpc(struct isc_device *isc) /* This module is not present on sama5d2 pipeline */ } +static void isc_sama5d2_config_gam(struct isc_device *isc) +{ + /* No specific gamma configuration */ +} + /* Gamma table with gamma 1/2.2 */ static const u32 isc_sama5d2_gamma_table[][GAMMA_ENTRIES] = { /* 0 --> gamma 1/1.8 */ @@ -261,6 +266,7 @@ static int atmel_isc_probe(struct platform_device *pdev) isc->config_csc = isc_sama5d2_config_csc; isc->config_cbc = isc_sama5d2_config_cbc; isc->config_cc = isc_sama5d2_config_cc; + isc->config_gam = isc_sama5d2_config_gam; isc->config_ctrls = isc_sama5d2_config_ctrls; isc->offsets.csc = ISC_SAMA5D2_CSC_OFFSET; |