From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 65828C433EF for ; Sat, 25 Jun 2022 05:03:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8kTT93QXEegW/hMLTqx7POh53DSS0GNrXJB9c0Gi0AI=; b=g6g3YNgWwiFI/waSFp2Esbf0i9 23rr8ySfRNdS6bXsKSoCOJ1278zVWglM0tGi8qLWY8D3KevzFiZKPRSD16czzUGD+xXWc1t3PzScP cbnlpk4JMSiCCFS//mPLc1YOU6CGdJ9qkCDy4balFiu9KYFGtwxEJpwerfcadXBF0vgQKI08p7yBK Zc7AXiP6UJsAAHlqrPf0FS2C28z1epF+1M+kXoYhhjy45Goze67SWrXwFRXBD8EZYv4R5aw+/jrlI GAVHvP3rffSPcY4IgBTe1RRRjNZaEKRRrY5FVXSzo408bxqoG09jqKzZPEcSlvLVEGLjE0Akr0F/q wQx8LvVA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4xxF-004f1c-RE; Sat, 25 Jun 2022 05:03:33 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4xxD-004f1J-C8 for linux-rockchip@lists.infradead.org; Sat, 25 Jun 2022 05:03:32 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 041E23200910; Sat, 25 Jun 2022 01:03:29 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sat, 25 Jun 2022 01:03:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; t=1656133409; x=1656219809; bh=s0njMbhfOA wKQ0HUGJf9ZpruML+71wF10KUEzCkJ53w=; b=QwE9T8HV14jzvNU9akxKpNB4x/ UuyJKOoAM3iB0OT7Xym1shNp/TbnrZ+3Ah2TgDzACKSD6tq/ZC1HSdNJTYLaqTsQ W+H1ESeRPzYG1r8rD7yUfpSWEkecmyRyEdliF55EfTXSYFVE89YoFGENRtJdGWZf efdcPeoDlHJ1jUhuqqvG8+fcqn16j/JQ9zn7TPtIpPrFOsIX9Z6vENb/fHz/QDt2 yHBHPkE/Lh+DR6bRdNOBfHkpk5a6ook7S2zMbPGmW6hFZTYsbTU4U4wZRixG9jeg uoexPwEptvzk9waXw7m76m1KZv4LIAD6VbY8FjiHLHizjzNiIO0xODxJzuJQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1656133409; x=1656219809; bh=s0njMbhfOAwKQ0HUGJf9ZpruML+7 1wF10KUEzCkJ53w=; b=Oov0ZusTmNLzMLE1jMCaz5mSbJTTGLhbzDVamhXSCKRW 6VlFFbXJ0ZVT57gjcxQnGjeGKKYjNa9xlRRdG58s06ikx0qabR152zKtj6GZXizq jG3GGj86MrIDeHWxnboUOruu+DQTMUzdE0OH+OLjwfo8k45Tyws+j/e26PoNrYSz BEns5S843uMzmR/Z4aQMHk1P6HMOnzHuYXe0VYqpZUa5PjxYD7WZmPJurlUN5V+r YhBYne6rh601tVQodr7AxXesFhH2pNkXIuSfCLR801CEk5unizX666sf5mslGuiT GnFdixiP1vrh2mZRrvz5P2UdCThBaiLyW7VMkeKrDQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudegtddgledvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtjeenucfhrhhomhepffgrfhhn rgcujfhirhhstghhfhgvlhguuceouggrfhhnrgesfhgrshhtmhgrihhlrdgtohhmqeenuc ggtffrrghtthgvrhhnpedvhedtledukeegveelfeeuvddujeeiteehkedvhfetkeffudej hfeftdduhedvkeenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfh hrohhmpegurghfnhgrsehfrghsthhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: i0e894699:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 25 Jun 2022 01:03:26 -0400 (EDT) Date: Sat, 25 Jun 2022 08:03:24 +0300 From: Dafna Hirschfeld To: Paul Elder Cc: linux-media@vger.kernel.org, Laurent Pinchart , heiko@sntech.de, jeanmichel.hautbois@ideasonboard.com, jacopo@jmondi.org, djrscally@gmail.com, helen.koike@collabora.com, linux-rockchip@lists.infradead.org Subject: Re: [PATCH 32/55] media: rkisp1: isp: Merge ISP_ACQ_PROP configuration in single variable Message-ID: <20220625050324.vujslblmu3evyvdh@guri> References: <20220614191127.3420492-1-paul.elder@ideasonboard.com> <20220614191127.3420492-33-paul.elder@ideasonboard.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220614191127.3420492-33-paul.elder@ideasonboard.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220624_220331_490220_A6D13522 X-CRM114-Status: UNSURE ( 9.32 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org On 15.06.2022 04:11, Paul Elder wrote: >From: Laurent Pinchart > >The rkisp1_config_isp() function stores the value of the input selection >and polarity configuration in two different local variables, OR'ed >together when writing the register. Merge them into a single acq_prop >variable. > >Signed-off-by: Laurent Pinchart Reviewed-by Dafna Hirschfeld >--- > .../media/platform/rockchip/rkisp1/rkisp1-isp.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > >diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c >index f5b8a2e31936..4496af991c82 100644 >--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c >+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c >@@ -141,7 +141,7 @@ static int rkisp1_config_isp(struct rkisp1_isp *isp, > enum v4l2_mbus_type mbus_type, u32 mbus_flags) > { > struct rkisp1_device *rkisp1 = isp->rkisp1; >- u32 isp_ctrl = 0, irq_mask = 0, acq_mult = 0, signal = 0, input_sel = 0; >+ u32 isp_ctrl = 0, irq_mask = 0, acq_mult = 0, acq_prop = 0; > const struct rkisp1_mbus_info *src_fmt, *sink_fmt; > struct v4l2_mbus_framefmt *sink_frm; > struct v4l2_rect *sink_crop; >@@ -188,17 +188,17 @@ static int rkisp1_config_isp(struct rkisp1_isp *isp, > /* Set up input acquisition properties */ > if (mbus_type == V4L2_MBUS_BT656 || mbus_type == V4L2_MBUS_PARALLEL) { > if (mbus_flags & V4L2_MBUS_PCLK_SAMPLE_RISING) >- signal = RKISP1_CIF_ISP_ACQ_PROP_POS_EDGE; >+ acq_prop |= RKISP1_CIF_ISP_ACQ_PROP_POS_EDGE; > > switch (sink_fmt->bus_width) { > case 8: >- input_sel = RKISP1_CIF_ISP_ACQ_PROP_IN_SEL_8B_ZERO; >+ acq_prop |= RKISP1_CIF_ISP_ACQ_PROP_IN_SEL_8B_ZERO; > break; > case 10: >- input_sel = RKISP1_CIF_ISP_ACQ_PROP_IN_SEL_10B_ZERO; >+ acq_prop |= RKISP1_CIF_ISP_ACQ_PROP_IN_SEL_10B_ZERO; > break; > case 12: >- input_sel = RKISP1_CIF_ISP_ACQ_PROP_IN_SEL_12B; >+ acq_prop |= RKISP1_CIF_ISP_ACQ_PROP_IN_SEL_12B; > break; > default: > dev_err(rkisp1->dev, "Invalid bus width\n"); >@@ -208,15 +208,15 @@ static int rkisp1_config_isp(struct rkisp1_isp *isp, > > if (mbus_type == V4L2_MBUS_PARALLEL) { > if (mbus_flags & V4L2_MBUS_VSYNC_ACTIVE_LOW) >- signal |= RKISP1_CIF_ISP_ACQ_PROP_VSYNC_LOW; >+ acq_prop |= RKISP1_CIF_ISP_ACQ_PROP_VSYNC_LOW; > > if (mbus_flags & V4L2_MBUS_HSYNC_ACTIVE_LOW) >- signal |= RKISP1_CIF_ISP_ACQ_PROP_HSYNC_LOW; >+ acq_prop |= RKISP1_CIF_ISP_ACQ_PROP_HSYNC_LOW; > } > > rkisp1_write(rkisp1, RKISP1_CIF_ISP_CTRL, isp_ctrl); > rkisp1_write(rkisp1, RKISP1_CIF_ISP_ACQ_PROP, >- signal | sink_fmt->yuv_seq | input_sel | >+ acq_prop | sink_fmt->yuv_seq | > RKISP1_CIF_ISP_ACQ_PROP_BAYER_PAT(sink_fmt->bayer_pat) | > RKISP1_CIF_ISP_ACQ_PROP_FIELD_SEL_ALL); > rkisp1_write(rkisp1, RKISP1_CIF_ISP_ACQ_NR_FRAMES, 0); >-- >2.30.2 > _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip