[PATCH 2/3] media: rkisp1: Fix the quantization settings of CPROC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On the imx8mp the Image Effect module is not supported. In my case the
effect variable had an uninitialized default value of 0x700 leading to
limited YUV range in all cases (effects were never touched from user
space). The effects configuration is as far is I understand completely
independent of CPROC. Completely remove that check. This fixes full
range mode on imx8mp and possibly others.

Signed-off-by: Stefan Klug <stefan.klug@xxxxxxxxxxxxxxxx>
---
 drivers/media/platform/rockchip/rkisp1/rkisp1-params.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
index b28f4140c8a3..8d61e21ad475 100644
--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
@@ -764,11 +764,6 @@ static void rkisp1_aec_config_v12(struct rkisp1_params *params,
 static void rkisp1_cproc_config(struct rkisp1_params *params,
 				const struct rkisp1_cif_isp_cproc_config *arg)
 {
-	struct rkisp1_cif_isp_isp_other_cfg *cur_other_cfg =
-		container_of(arg, struct rkisp1_cif_isp_isp_other_cfg, cproc_config);
-	struct rkisp1_cif_isp_ie_config *cur_ie_config =
-						&cur_other_cfg->ie_config;
-	u32 effect = cur_ie_config->effect;
 	u32 quantization = params->quantization;
 
 	rkisp1_write(params->rkisp1, RKISP1_CIF_C_PROC_CONTRAST,
@@ -778,8 +773,7 @@ static void rkisp1_cproc_config(struct rkisp1_params *params,
 	rkisp1_write(params->rkisp1, RKISP1_CIF_C_PROC_BRIGHTNESS,
 		     arg->brightness);
 
-	if (quantization != V4L2_QUANTIZATION_FULL_RANGE ||
-	    effect != V4L2_COLORFX_NONE) {
+	if (quantization != V4L2_QUANTIZATION_FULL_RANGE) {
 		rkisp1_param_clear_bits(params, RKISP1_CIF_C_PROC_CTRL,
 					RKISP1_CIF_C_PROC_YOUT_FULL |
 					RKISP1_CIF_C_PROC_YIN_FULL |
-- 
2.43.0





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux