Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2176402rwi; Tue, 1 Nov 2022 04:56:50 -0700 (PDT) X-Google-Smtp-Source: AMsMyM51hxBVe1zUXk2shTxKkZuhIGT7QxDfQ0O0DITvzrBkm3QuktGGGQym9gjG7qhsHmHvdrbI X-Received: by 2002:a17:907:8a09:b0:7ad:adff:ddf6 with SMTP id sc9-20020a1709078a0900b007adadffddf6mr18245448ejc.320.1667303810533; Tue, 01 Nov 2022 04:56:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667303810; cv=none; d=google.com; s=arc-20160816; b=cpoY8NXWUm040g4aIb46LvvGOXIIYmc3wRsH3xk0aTT2KHy+YEL2+xEsKnPT4zJrha xjZx38bNEsbbxBXbUcDZbCzVf6DW28b23OMxtg48pbAja26lRVRxbdoMzJtgx18Vf+/l z133i+cob4kNUyrJE+jfp8zy//EoobmrbRtmEdv1PwTU69azl+V87GBFtN/UazaU0fLT o4YZaVfq7J+O3NoF0OHJcw6IFrFrbz6+IgCt0yD0BmL5jI6ZsTEUtYH7MaRw/n+P11ED jxA4c+cCAfEYNt12FYnA7orbq4rH69nYkCi4vXNuuwsxgJHAi/VH03QW0MX2k+pbP1rB IatA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6Adj/BXfWvZ5hom5wmeM0c87y84cRIuNO3PrGpvFCrI=; b=PjN9ne8HrbdRBdhT6bDNFtNGHDuOEXxIToqc0ajE4u/03o5tayVtQoRkVtnQ9xh2DA eBK9lWut4+Wzd9UTkZsQRhxLYrSu6DXPW3sv3VDWjAZjTqujG7+dio0EIRJUoapQaAG1 D/+IqeuH2AwhLgogoIFafUbAkH/eROYFKfoHwNEpDmXDZasqC3Fzkifnw4xMml/XP9AU xWUB3knb0Aowd3qfOHltyHJDZkAlsC5o/8s7CqSVVT7x5b6UlH6RuykDWqf441FqR67R dUfMhW+teYjZYuGLXzLNrHmNY/lVsW7VK8RwGXDCg33hE+v1mClfRJ1zmhhyxVFkoiOD LTDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ure1Yhvt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bb6-20020a1709070a0600b0078d3b940ec5si12390078ejc.373.2022.11.01.04.56.25; Tue, 01 Nov 2022 04:56:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ure1Yhvt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230041AbiKAL1f (ORCPT + 98 others); Tue, 1 Nov 2022 07:27:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229720AbiKAL1d (ORCPT ); Tue, 1 Nov 2022 07:27:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9762C17E26; Tue, 1 Nov 2022 04:27:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3449C615D5; Tue, 1 Nov 2022 11:27:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C56CC43470; Tue, 1 Nov 2022 11:27:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667302051; bh=Qs2YG4eZPcMB3J3UO5+oTFanUUSas1ZnrNeZRV6oHOs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ure1YhvtWEYgZK4ZqqFMirkTQgWOWSUyHxiOYLS4g99aXYA7DMIbKhcA9OXHk5aXK 1b4SxGb/6RepJV/TIgvNHOSh8kYC4oge2tkFmR0lj3Oe1l+nvfZ8qC/ozFRDqGzGNW 8HMmD9ad+zAA4becE3KXOBni6fHBq3XKMTvu9oXcDNEmWsFj42jOEGzK8Xa91pZcIN 2kUvEzvG+exglQBIRe7Cq/Krb5hiNbdLf4ZNqwXJLx6YAxSLVYoeOHrWQnNWQTf7ji JusSAQ7irl/H1lmtpGcp/cr3Z4UOdT5Ke22N5AxYNhiyVDheWJaAZAxuql6fHeEojo MOn7/ZuZtu0kQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Laurent Pinchart , Dafna Hirschfeld , Paul Elder , Mauro Carvalho Chehab , Sasha Levin , heiko@sntech.de, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 6.0 02/34] media: rkisp1: Don't pass the quantization to rkisp1_csm_config() Date: Tue, 1 Nov 2022 07:26:54 -0400 Message-Id: <20221101112726.799368-2-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221101112726.799368-1-sashal@kernel.org> References: <20221101112726.799368-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Laurent Pinchart [ 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 Reviewed-by: Dafna Hirschfeld Reviewed-by: Paul Elder Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/rockchip/rkisp1/rkisp1-params.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c index 9da7dc1bc690..32485f7c79d5 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c @@ -1066,7 +1066,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, @@ -1080,7 +1080,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, @@ -1552,11 +1552,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(¶ms->config_lock); -- 2.35.1