Commit 711d9149 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

media: rkisp1: Don't pass the quantization to rkisp1_csm_config()



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: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarDafna Hirschfeld <dafna@fastmail.com>
Reviewed-by: default avatarPaul Elder <paul.elder@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 81303962
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -1076,7 +1076,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,
@@ -1090,7 +1090,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,
				     RKISP1_CIF_ISP_CC_COEFF_0 + i * 4,
@@ -1562,11 +1562,7 @@ static void rkisp1_params_config_parameter(struct rkisp1_params *params)
	rkisp1_param_set_bits(params, RKISP1_CIF_ISP_HIST_PROP_V10,
			      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);