summaryrefslogtreecommitdiff
path: root/drivers/media/platform/atmel/atmel-isc-base.c
diff options
context:
space:
mode:
authorEugen Hristev <eugen.hristev@microchip.com>2021-04-13 12:57:04 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-06-08 12:52:15 +0200
commit2ede3975c0a8530663de38b485abbaa18ede0bad (patch)
treed77c6ace8f40d59ff6d88ac68aa95ded9a7216a1 /drivers/media/platform/atmel/atmel-isc-base.c
parentcd5af39467bdc768387d841186a71bb2d947b29c (diff)
downloadlinux-2ede3975c0a8530663de38b485abbaa18ede0bad.tar.gz
linux-2ede3975c0a8530663de38b485abbaa18ede0bad.tar.bz2
linux-2ede3975c0a8530663de38b485abbaa18ede0bad.zip
media: atmel: atmel-isc: extract CSC submodule config into separate function
The CSC submodule is a part of the atmel-isc pipeline, and stands for Color Space Conversion. It is used to apply a matrix transformation to RGB pixels to convert them to the YUV components. The CSC 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_csc 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>
Diffstat (limited to 'drivers/media/platform/atmel/atmel-isc-base.c')
-rw-r--r--drivers/media/platform/atmel/atmel-isc-base.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/media/platform/atmel/atmel-isc-base.c b/drivers/media/platform/atmel/atmel-isc-base.c
index 07ba439eb7e9..6c709f6a408c 100644
--- a/drivers/media/platform/atmel/atmel-isc-base.c
+++ b/drivers/media/platform/atmel/atmel-isc-base.c
@@ -654,13 +654,7 @@ static void isc_set_pipeline(struct isc_device *isc, u32 pipeline)
regmap_bulk_write(regmap, ISC_GAM_GENTRY, gamma, GAMMA_ENTRIES);
regmap_bulk_write(regmap, ISC_GAM_RENTRY, gamma, GAMMA_ENTRIES);
- /* Convert RGB to YUV */
- regmap_write(regmap, ISC_CSC_YR_YG, 0x42 | (0x81 << 16));
- regmap_write(regmap, ISC_CSC_YB_OY, 0x19 | (0x10 << 16));
- regmap_write(regmap, ISC_CSC_CBR_CBG, 0xFDA | (0xFB6 << 16));
- regmap_write(regmap, ISC_CSC_CBB_OCB, 0x70 | (0x80 << 16));
- regmap_write(regmap, ISC_CSC_CRR_CRG, 0x70 | (0xFA2 << 16));
- regmap_write(regmap, ISC_CSC_CRB_OCR, 0xFEE | (0x80 << 16));
+ isc->config_csc(isc);
regmap_write(regmap, ISC_CBC_BRIGHT, ctrls->brightness);
regmap_write(regmap, ISC_CBC_CONTRAST, ctrls->contrast);