media: rkisp1: Don't pass the quantization to rkisp1_csm_config()
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 12 Aug 2022 22:44:14 +0000 (00:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2022 17:15:33 +0000 (18:15 +0100)
[ Upstream commit 711d91497e203b058cf0a08c0f7d41c04efbde76 ]

The rkisp1_csm_config() function takes a pointer to the rkisp1_params
structure which contains the quantization value. There's no need to pass
it separately to the function. Drop it from the function parameters.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Dafna Hirschfeld <dafna@fastmail.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/rockchip/rkisp1/rkisp1-params.c

index 8fa5b0abf1f9c4bf65dbfcec6fd1ed9c092d798a..8461e88c1288ca17df3f65d98d958f60a4d6bf4f 100644 (file)
@@ -751,7 +751,7 @@ static void rkisp1_ie_enable(struct rkisp1_params *params, bool en)
        }
 }
 
-static void rkisp1_csm_config(struct rkisp1_params *params, bool full_range)
+static void rkisp1_csm_config(struct rkisp1_params *params)
 {
        static const u16 full_range_coeff[] = {
                0x0026, 0x004b, 0x000f,
@@ -765,7 +765,7 @@ static void rkisp1_csm_config(struct rkisp1_params *params, bool full_range)
        };
        unsigned int i;
 
-       if (full_range) {
+       if (params->quantization == V4L2_QUANTIZATION_FULL_RANGE) {
                for (i = 0; i < ARRAY_SIZE(full_range_coeff); i++)
                        rkisp1_write(params->rkisp1, full_range_coeff[i],
                                     RKISP1_CIF_ISP_CC_COEFF_0 + i * 4);
@@ -1235,11 +1235,7 @@ static void rkisp1_params_config_parameter(struct rkisp1_params *params)
        rkisp1_param_set_bits(params, RKISP1_CIF_ISP_HIST_PROP,
                              rkisp1_hst_params_default_config.mode);
 
-       /* set the  range */
-       if (params->quantization == V4L2_QUANTIZATION_FULL_RANGE)
-               rkisp1_csm_config(params, true);
-       else
-               rkisp1_csm_config(params, false);
+       rkisp1_csm_config(params);
 
        spin_lock_irq(&params->config_lock);