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 CF46DC433EF for ; Wed, 27 Apr 2022 19:33:41 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SLp9HLi+lxMiDla7M6BoUnBRU5Ao7sBmcd6jhWY2opg=; b=Sb8VWXq9Uj5gd4 K/GakFtVS+lgiYXNqax+otfJPdg96tUnWddlu7DYYfKm6biu9pywIW4IF2P0lZfA5z94cmaliGG8O l2vlMAbk6T3wA6k/46wBPCLUldbM8YadziHqeYNXlBprzos2kmXE6uJnXJ38jrBne5LFxB11bcJr/ gn2i4bxPypy9aqmPJblkMWQazyOEWY3pd1k74MXXjSpPAK/0D4/2wkVhGesxZcrvF2CvyARRIDDbZ 3AtVhcKiO5UWF1VK+ks6YrqtdjMfEzMpih9EAoDTM7zjDDqojUUsO4LOQSlt7myzUspIKqYXuUtvE D9K5qOP1/t81m1RQQFcQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njnOf-003JXw-7m; Wed, 27 Apr 2022 19:32:22 +0000 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njnOY-003JUp-GJ for linux-arm-kernel@lists.infradead.org; Wed, 27 Apr 2022 19:32:16 +0000 Received: by mail-ed1-x531.google.com with SMTP id a21so3126879edb.1 for ; Wed, 27 Apr 2022 12:32:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JhnYrw0AR5Z7jkNOIRMJJDs+xZns0y5ZouI6A7Yq2m4=; b=it+qMq+p7Ih5sV2oP8h90O+A66YmhvIlQ5DX8ZHmeUw3CUBBx//p0vDiJGey9z0uIh bx6H014af/WfMFeUW/y49vhZWL+bAMkkDwbttSQAa5L4W+jZ2Ye5Yph9Nw+bvdm04F3M LCuKkt5dXpk1/oEug5xk5qAVCXw18q4iCnv6UBp3Pe8OWXV35Q6TzSd+FFyGmcZgVDsy vA6guExkKI5BaVDgivRgeO+tiyrCSgn0D5Cplnj/9TUeuqFaGzANrhiasI0H9NrOI/Fu TPDoBoEQqAwkonqOkv8Nm2ndoIzYcxK43vaXzk0aQDttrNI1yFrNdHAuK4zAs/0E+mV2 HvCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JhnYrw0AR5Z7jkNOIRMJJDs+xZns0y5ZouI6A7Yq2m4=; b=0myJ7Z8WZkANjR79uHENfUJhVtpFSuUZf1wezlQx8XYeUb88rZaBEBe3KObbtwA1vA p4MZPqfcZ+o5g0HLFhs2RLXvXTU2poWFgOTq/6e/XjTiTLOqVa03IiUTdBasBv8o0Jqp HY04aS3RVuIL438lwn1cOpeO+Kk+RrZ7Hs59DXQggoCY/P+kACNRcwVZ7W4fDtrINIlv dpXZElDsKf2HBMx/gbedzUWINWt18e918LIYcJFy9ZtJfpKvn/k14SMnIekcWTQ5IgGR 9RqImcTWiRHWqswRJEvGMNLDR4Mew9u4YpGaHe5Szs60pK+QclS/GIJ27pIvgC50MaNT 0lIQ== X-Gm-Message-State: AOAM530vzwjB4O76peQ20lFD8Tn8wQZt2JaikzNN3QhAJxdslzhguLWE 8R321YwDytpXtqzCiJ49oQvsmd2f1Sl/IA== X-Google-Smtp-Source: ABdhPJxMYyDg9X/787fWvrzZZ7v36nyynk8yGgYPu7j2miTQJHngFnPm9HXf6WWh9F3WgCeAdKpCzg== X-Received: by 2002:a05:6402:51d2:b0:424:536:94dd with SMTP id r18-20020a05640251d200b00424053694ddmr32374846edd.191.1651087932349; Wed, 27 Apr 2022 12:32:12 -0700 (PDT) Received: from jernej-laptop.localnet (89-212-118-115.static.t-2.net. [89.212.118.115]) by smtp.gmail.com with ESMTPSA id s12-20020a1709062ecc00b006e8558c9a5csm7212048eji.94.2022.04.27.12.32.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 12:32:12 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, Paul Kocialkowski Cc: Yong Deng , Paul Kocialkowski , Mauro Carvalho Chehab , Chen-Yu Tsai , Samuel Holland , Laurent Pinchart , Maxime Ripard , Thomas Petazzoni Subject: Re: [PATCH v4 28/45] media: sun6i-csi: Get mbus code from bridge instead of storing it Date: Wed, 27 Apr 2022 21:32:10 +0200 Message-ID: <2106792.Mh6RI2rZIc@jernej-laptop> In-Reply-To: <20220415152811.636419-29-paul.kocialkowski@bootlin.com> References: <20220415152811.636419-1-paul.kocialkowski@bootlin.com> <20220415152811.636419-29-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220427_123214_602365_270A54D9 X-CRM114-Status: GOOD ( 18.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Dne petek, 15. april 2022 ob 17:27:54 CEST je Paul Kocialkowski napisal(a): > Another instance of removing a duplicated variable and using common > helpers instead. > > Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Best regards, Jernej > --- > .../sunxi/sun6i-csi/sun6i_csi_capture.c | 18 +++++------------- > .../sunxi/sun6i-csi/sun6i_csi_capture.h | 1 - > 2 files changed, 5 insertions(+), 14 deletions(-) > > diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c > b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c index > c4e803a38851..e2070353f93f 100644 > --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c > +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c > @@ -17,6 +17,7 @@ > #include > > #include "sun6i_csi.h" > +#include "sun6i_csi_bridge.h" > #include "sun6i_csi_capture.h" > #include "sun6i_csi_reg.h" > > @@ -455,20 +456,20 @@ sun6i_csi_capture_configure_interface(struct > sun6i_csi_device *csi_dev) > > static void sun6i_csi_capture_configure_format(struct sun6i_csi_device > *csi_dev) { > - struct sun6i_csi_capture *capture = &csi_dev->capture; > - u32 pixelformat, field; > + u32 mbus_code, pixelformat, field; > u32 cfg = 0; > u32 val; > > sun6i_csi_capture_format(csi_dev, &pixelformat, &field); > + sun6i_csi_bridge_format(csi_dev, &mbus_code, NULL); > > - val = get_csi_input_format(csi_dev, capture->mbus_code, pixelformat); > + val = get_csi_input_format(csi_dev, mbus_code, pixelformat); > cfg |= SUN6I_CSI_CH_CFG_INPUT_FMT(val); > > val = get_csi_output_format(csi_dev, pixelformat, field); > cfg |= SUN6I_CSI_CH_CFG_OUTPUT_FMT(val); > > - val = get_csi_input_seq(csi_dev, capture->mbus_code, pixelformat); > + val = get_csi_input_seq(csi_dev, mbus_code, pixelformat); > cfg |= SUN6I_CSI_CH_CFG_INPUT_YUV_SEQ(val); > > if (field == V4L2_FIELD_TOP) > @@ -739,11 +740,6 @@ static int sun6i_csi_capture_start_streaming(struct > vb2_queue *queue, if (ret < 0) > goto error_state; > > - if (capture->mbus_code == 0) { > - ret = -EINVAL; > - goto error_media_pipeline; > - } > - > subdev = sun6i_csi_capture_remote_subdev(capture, NULL); > if (!subdev) { > ret = -EINVAL; > @@ -1076,8 +1072,6 @@ static int sun6i_csi_capture_link_validate(struct > media_link *link) struct v4l2_subdev_format source_fmt; > int ret; > > - capture->mbus_code = 0; > - > if (!media_entity_remote_pad(link->sink->entity->pads)) { > dev_info(csi_dev->dev, "capture node %s pad not connected\n", > vdev->name); > @@ -1109,8 +1103,6 @@ static int sun6i_csi_capture_link_validate(struct > media_link *link) return -EPIPE; > } > > - capture->mbus_code = source_fmt.format.code; > - > return 0; > } > > diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.h > b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.h index > 02bdf45f7ca5..3b9759e1563d 100644 > --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.h > +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.h > @@ -39,7 +39,6 @@ struct sun6i_csi_capture { > struct media_pad pad; > > struct v4l2_format format; > - u32 mbus_code; > }; > > void sun6i_csi_capture_dimensions(struct sun6i_csi_device *csi_dev, _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel