Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5913448rwb; Tue, 1 Aug 2023 09:32:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlHt/CP4/V+5TBhyxGUvwfoSt6K4xFZlX/UNW/0upVZRIOzWM8HU4NDVVJocwWH1OmA8tIUL X-Received: by 2002:a17:906:8a4d:b0:993:da0b:8783 with SMTP id gx13-20020a1709068a4d00b00993da0b8783mr3688492ejc.3.1690907555448; Tue, 01 Aug 2023 09:32:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690907555; cv=none; d=google.com; s=arc-20160816; b=fF56PlWgg18WSAcnSZFK9OA9fgD3S6uwEdeVLdYzHYbnIymUFWP3ERLgn9eMe89xrP Q1nTvJpYnldNHmfnBU789DW79ymf6E0Wne1JBW4pWUHGKX8FKJazoIAWgXZhN7MhSIPY cPR7et4tdEkkAG31K40pn3pzXe52wFd3ZYHIZ3hTJ1cmJurNpJv3yIlpcYnIhroGrnhq kdIMD5GQhSnQlE3z36ng6gTsKaw4jEsLQKyoD1fuOe25bE3thDZmLKCMPl8OUOJ1xvzT 5c5775kjb09WtjDzAxczdT2wdy26VrUo0rAhOFUCW5+TCjxrysMfjN92vxk/L5DSLbF2 7RnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=7+tnjztSXLzkwolWTxUMIW8KJfxiE1gUUAQfljEbots=; fh=LroA/i1EM0DOjWSTFbQc0E4XLyK+5NHY20upRsJ5XaQ=; b=X7xAbzEg/QHPf11mdV8y/k5tVJ2iMUpbW7mdqjHxBC9aar1ArggUB+aGNOMwE5ef+L 9+2aODEdDcWP0xp77G7zHPkrFtCySglyghuLLsHFGVjuA1ws7KRsVcrKm74B4R7qhSrM afdioWGnoNkRPiOO+MLYwm9BiYITg4lCuZqy+taAI0kqSzJ4SFZggk0OgGTMHZRCgcyJ TmavdQOu87D8xs68W+gJdfBiNPE9YEfXiZFUQ0xVYMa06hQMzRWB5fOMnpBtvvVojnpv Hg4UFQPJJBIAzG9Hu4r8Vg40QSqSp6nSV1Uals1Lc0XYWYmf2ccyd2kONaoxHlAJailt iLGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=bfAKJQwz; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s11-20020a170906a18b00b00991df86ac0esi8430981ejy.338.2023.08.01.09.32.03; Tue, 01 Aug 2023 09:32:35 -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 (test mode) header.i=@ideasonboard.com header.s=mail header.b=bfAKJQwz; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234410AbjHAOR3 (ORCPT + 99 others); Tue, 1 Aug 2023 10:17:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234474AbjHAORX (ORCPT ); Tue, 1 Aug 2023 10:17:23 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53C10BF; Tue, 1 Aug 2023 07:17:22 -0700 (PDT) Received: from [192.168.88.20] (91-154-35-171.elisa-laajakaista.fi [91.154.35.171]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 370C63D4; Tue, 1 Aug 2023 16:16:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1690899378; bh=PW3ghibNBXTd6EXpRXCpq11Kf2aUAXCBKDNCa3a/LVQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=bfAKJQwzWwcBdjtMl3e/kzF8yk3E+Dok316L5RTBHt7p4wohHcvU5xyNsNrlRfEy6 Qy5wshJQ6vq8vlpURlDF8OIunTFFfcQDi5xlso/sxpq/bzvAncm9aFwk3uJQlIbclL 9G4vKOsxkprz+wPHhm9Rm/zqQoXDKetZLAyJFCH4= Message-ID: <68c3c37c-f324-0879-9d70-4df93a445614@ideasonboard.com> Date: Tue, 1 Aug 2023 17:17:17 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v8 11/16] media: cadence: csi2rx: Fix stream data configuration Content-Language: en-US To: Jai Luthra , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sakari Ailus , Laurent Pinchart Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Mauro Carvalho Chehab , Maxime Ripard , niklas.soderlund+renesas@ragnatech.se, Benoit Parrot , Vaishnav Achath , Vignesh Raghavendra , nm@ti.com, devarsht@ti.com References: <20230731-upstream_csi-v8-0-fb7d3661c2c9@ti.com> <20230731-upstream_csi-v8-11-fb7d3661c2c9@ti.com> From: Tomi Valkeinen In-Reply-To: <20230731-upstream_csi-v8-11-fb7d3661c2c9@ti.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 On 31/07/2023 11:29, Jai Luthra wrote: > From: Pratyush Yadav > > Firstly, there is no VC_EN bit present in the STREAM_DATA_CFG register. > Bit 31 is part of the VL_SELECT field. Remove it completely. > > Secondly, it makes little sense to enable ith virtual channel for ith > stream. Sure, there might be a use-case that demands it. But there might > also be a use case that demands all streams to use the 0th virtual > channel. Prefer this case over the former because it is less arbitrary > and also makes it very clear what the limitations of the current driver > is instead of giving a false impression that multiple virtual channels > are supported. > > Signed-off-by: Pratyush Yadav > Signed-off-by: Jai Luthra > Reviewed-by: Laurent Pinchart > --- > v7->v8: No change > > drivers/media/platform/cadence/cdns-csi2rx.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/drivers/media/platform/cadence/cdns-csi2rx.c b/drivers/media/platform/cadence/cdns-csi2rx.c > index a17ef88dff82..cde7fd6463e1 100644 > --- a/drivers/media/platform/cadence/cdns-csi2rx.c > +++ b/drivers/media/platform/cadence/cdns-csi2rx.c > @@ -49,7 +49,6 @@ > #define CSI2RX_STREAM_STATUS_RDY BIT(31) > > #define CSI2RX_STREAM_DATA_CFG_REG(n) (CSI2RX_STREAM_BASE(n) + 0x008) > -#define CSI2RX_STREAM_DATA_CFG_EN_VC_SELECT BIT(31) > #define CSI2RX_STREAM_DATA_CFG_VC_SELECT(n) BIT((n) + 16) > > #define CSI2RX_STREAM_CFG_REG(n) (CSI2RX_STREAM_BASE(n) + 0x00c) > @@ -275,8 +274,11 @@ static int csi2rx_start(struct csi2rx_priv *csi2rx) > writel(CSI2RX_STREAM_CFG_FIFO_MODE_LARGE_BUF, > csi2rx->base + CSI2RX_STREAM_CFG_REG(i)); > > - writel(CSI2RX_STREAM_DATA_CFG_EN_VC_SELECT | > - CSI2RX_STREAM_DATA_CFG_VC_SELECT(i), > + /* > + * Enable one virtual channel. When multiple virtual channels > + * are supported this will have to be changed. > + */ > + writel(CSI2RX_STREAM_DATA_CFG_VC_SELECT(0), > csi2rx->base + CSI2RX_STREAM_DATA_CFG_REG(i)); > > writel(CSI2RX_STREAM_CTRL_START, > Reviewed-by: Tomi Valkeinen Tomi