diff options
author | Claudiu Beznea <claudiu.beznea@microchip.com> | 2022-09-15 17:09:28 +0300 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2022-10-22 00:51:25 +0200 |
commit | eb758a8fec2cee24e528008052fa2bd58482ca3a (patch) | |
tree | c4ea2a0e7246cc62314258cf6b1b8a5ad80f8df0 /target/linux/at91/patches-5.15/165-media-atmel-atmel-isc-extract-CBC-submodule-config-i.patch | |
parent | c5c37886cff1705ba9be9b33df3ab121bd27fe6b (diff) | |
download | upstream-eb758a8fec2cee24e528008052fa2bd58482ca3a.tar.gz upstream-eb758a8fec2cee24e528008052fa2bd58482ca3a.tar.bz2 upstream-eb758a8fec2cee24e528008052fa2bd58482ca3a.zip |
at91: kernel v5.15: copy config and patches from 5.10
Copy kernel config and patches from 5.10. Along with it
individual targets' config-default from 5.10 has been moved to
config-5.10.
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Diffstat (limited to 'target/linux/at91/patches-5.15/165-media-atmel-atmel-isc-extract-CBC-submodule-config-i.patch')
-rw-r--r-- | target/linux/at91/patches-5.15/165-media-atmel-atmel-isc-extract-CBC-submodule-config-i.patch | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/target/linux/at91/patches-5.15/165-media-atmel-atmel-isc-extract-CBC-submodule-config-i.patch b/target/linux/at91/patches-5.15/165-media-atmel-atmel-isc-extract-CBC-submodule-config-i.patch new file mode 100644 index 0000000000..fd7ed1e94d --- /dev/null +++ b/target/linux/at91/patches-5.15/165-media-atmel-atmel-isc-extract-CBC-submodule-config-i.patch @@ -0,0 +1,80 @@ +From aa31e58d80d233385fa3b972e6b85f293e2a9093 Mon Sep 17 00:00:00 2001 +From: Eugen Hristev <eugen.hristev@microchip.com> +Date: Tue, 13 Apr 2021 12:57:07 +0200 +Subject: [PATCH 165/247] media: atmel: atmel-isc: extract CBC submodule config + into separate function + +The CBC submodule is a part of the atmel-isc pipeline, and stands for +Contrast Brightness Control. It is used to apply gains and offsets to the +luma (Y) and chroma (U, V) components of the YUV elements. +The CBC submodule should be initialized in the product specific driver +as it's product specific. Other products can implement it differently + +[hverkuil: made isc_sama5d2_config_cbc 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> +--- + drivers/media/platform/atmel/atmel-isc-base.c | 4 +--- + drivers/media/platform/atmel/atmel-isc.h | 3 +++ + drivers/media/platform/atmel/atmel-sama5d2-isc.c | 9 +++++++++ + 3 files changed, 13 insertions(+), 3 deletions(-) + +--- a/drivers/media/platform/atmel/atmel-isc-base.c ++++ b/drivers/media/platform/atmel/atmel-isc-base.c +@@ -655,9 +655,7 @@ static void isc_set_pipeline(struct isc_ + regmap_bulk_write(regmap, ISC_GAM_RENTRY, gamma, GAMMA_ENTRIES); + + isc->config_csc(isc); +- +- regmap_write(regmap, ISC_CBC_BRIGHT, ctrls->brightness); +- regmap_write(regmap, ISC_CBC_CONTRAST, ctrls->contrast); ++ isc->config_cbc(isc); + } + + static int isc_update_profile(struct isc_device *isc) +--- a/drivers/media/platform/atmel/atmel-isc.h ++++ b/drivers/media/platform/atmel/atmel-isc.h +@@ -202,6 +202,8 @@ struct isc_reg_offsets { + * + * @config_csc: pointer to a function that initializes product + * specific CSC module ++ * @config_cbc: pointer to a function that initializes product ++ * specific CBC module + * + * @offsets: struct holding the product specific register offsets + */ +@@ -274,6 +276,7 @@ struct isc_device { + + struct { + void (*config_csc)(struct isc_device *isc); ++ void (*config_cbc)(struct isc_device *isc); + }; + + struct isc_reg_offsets offsets; +--- a/drivers/media/platform/atmel/atmel-sama5d2-isc.c ++++ b/drivers/media/platform/atmel/atmel-sama5d2-isc.c +@@ -73,6 +73,14 @@ static void isc_sama5d2_config_csc(struc + 0xFEE | (0x80 << 16)); + } + ++static void isc_sama5d2_config_cbc(struct isc_device *isc) ++{ ++ struct regmap *regmap = isc->regmap; ++ ++ regmap_write(regmap, ISC_CBC_BRIGHT, isc->ctrls.brightness); ++ regmap_write(regmap, ISC_CBC_CONTRAST, isc->ctrls.contrast); ++} ++ + /* Gamma table with gamma 1/2.2 */ + static const u32 isc_sama5d2_gamma_table[][GAMMA_ENTRIES] = { + /* 0 --> gamma 1/1.8 */ +@@ -239,6 +247,7 @@ static int atmel_isc_probe(struct platfo + isc->max_height = ISC_SAMA5D2_MAX_SUPPORT_HEIGHT; + + isc->config_csc = isc_sama5d2_config_csc; ++ isc->config_cbc = isc_sama5d2_config_cbc; + + isc->offsets.csc = ISC_SAMA5D2_CSC_OFFSET; + |