Message ID | 20231009-upstream_csi-v10-9-330aaed24c5d@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp1857131vqo; Mon, 9 Oct 2023 06:11:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFpKjTZaoJZjG8114QPAskTh14WhmBZsT0WkpOBdbBlXAT3ZPFQ2On6eP99nagl9yVrLYl4 X-Received: by 2002:a17:902:d3d5:b0:1c6:124b:6158 with SMTP id w21-20020a170902d3d500b001c6124b6158mr12312267plb.30.1696857069584; Mon, 09 Oct 2023 06:11:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696857069; cv=none; d=google.com; s=arc-20160816; b=WHY0Kwok9hrAlo1/MLI8Ssdwk031xCKOVOelgimX2vpdBeT8ukNqkCNfUYkx/0ZKYo mkKxEuMJWiiyI511v1vOEBnUTc/cqujMk+crSlfMifMVDBXVBW25vEK7gYGJuh2ko1uD qVcz0Q/7C/Ph9QYdEhpEpvd11k7UdwElXXkMglP+AXnwzSgCIUHhRpCJ5UQR4zq+PsIv 0S8Z/HhpYWiKxfsZkjp2A5JMu1ba3QVbUwCFpIe9BQhaxE7XJ6r4mTXTB+EAtiXmYxwV C+fb6K/j3aMP7qypzdH6uRcR8/C0CzYsNmbD5mTE35G08Sfcwe3F7zTTn8dVoWKeKb8S 3D/A== 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=5xRmA39JDsFhGm4qLUOCFV3dYHAJ5qXMdjUD4ivBnbU=; fh=6xb4dRkd2+1fqSC803o7QgwwC4DGCN1bJaIcF3oxTbc=; b=h1JuzKpYpeSU6OIFV6tQ5tNH4cwp/UXmc3St6zvfUVa7UIdZet8eNBd/2mZIppl47s DmQz5NRP/dw66rH+wZjqxmuchEM6QeSrse4FDcweY9P0T0Eu36kAnq3JTumXXPW6/OOZ cIwie5ikApb0ASUa2PtgoefTjCxRSQaRK8hD8h4BHhN71cnDFHnmAfVbNKVJBNAmWyS8 Q5UixEAWNCWD5/9ccM2WLSEkE/yfG1bMmvkAd++VdI7+Lox1dHgR40PVpFYl57CVUhYO z37N84JEq9Ov67qG9nr41pRASnG1734ZxQdwbpZ8Or6rCrEzLzbf3DY68rjE12VtEAzL l91Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=HO0w0sLR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id jx11-20020a170903138b00b001b973681493si8803713plb.16.2023.10.09.06.11.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 06:11:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=HO0w0sLR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 0F05F8081BC2; Mon, 9 Oct 2023 06:11:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376869AbjJINKm (ORCPT <rfc822;ezelljr.billy@gmail.com> + 18 others); Mon, 9 Oct 2023 09:10:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376797AbjJINKM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 9 Oct 2023 09:10:12 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90435C5; Mon, 9 Oct 2023 06:10:09 -0700 (PDT) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 399D9tSP067961; Mon, 9 Oct 2023 08:09:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1696856995; bh=5xRmA39JDsFhGm4qLUOCFV3dYHAJ5qXMdjUD4ivBnbU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=HO0w0sLRSKLt4pAD6hO1XFIBXflLGy4GDR9amEkyf/4SlsLQNLJkWeRj/Nh1MfPxz 5GIRNMdQkbajlm3qtz+J5OqhX+gX3Wse2mg2nWsVYNZ8GfqPFoHWsb6cLe6l6fqFYK XY6tXr5UXk1qibKGOP1oL/8Ya1UPaxMk9c1966OM= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 399D9teU077039 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 9 Oct 2023 08:09:55 -0500 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 9 Oct 2023 08:09:55 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 9 Oct 2023 08:09:55 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 399D9s0l118038; Mon, 9 Oct 2023 08:09:55 -0500 From: Jai Luthra <j-luthra@ti.com> To: Mauro Carvalho Chehab <mchehab@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Sakari Ailus <sakari.ailus@linux.intel.com>, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> CC: <linux-media@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Mauro Carvalho Chehab <mchehab+samsung@kernel.org>, Maxime Ripard <mripard@kernel.org>, <niklas.soderlund+renesas@ragnatech.se>, Benoit Parrot <bparrot@ti.com>, Vaishnav Achath <vaishnav.a@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>, <nm@ti.com>, <devarsht@ti.com>, <j-luthra@ti.com>, <a-bhatia1@ti.com>, Martyn Welch <martyn.welch@collabora.com>, Julien Massot <julien.massot@collabora.com> Subject: [PATCH v10 09/13] media: cadence: csi2rx: Fix stream data configuration Date: Mon, 9 Oct 2023 18:39:35 +0530 Message-ID: <20231009-upstream_csi-v10-9-330aaed24c5d@ti.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231009-upstream_csi-v10-0-330aaed24c5d@ti.com> References: <20231009-upstream_csi-v10-0-330aaed24c5d@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Developer-Signature: v=1; a=openpgp-sha256; l=2178; i=j-luthra@ti.com; h=from:subject:message-id; bh=rWhMSf+q3LWOfilXHfNOyLHKZTsa4nFF2tGubRsc2Js=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBlI/ssHTbgeHRwXjG64y9LWLkV2aafsEpi2t0j1 75jF26bX9WJAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZSP7LAAKCRBD3pH5JJpx RfeXEAC39aSNwDNaFw8qNp8F4b6Gcr6ESVZsKxqhdS0So68tv74391OHuVCKzjNf2Su+R/Ju3u0 gpbwD+MHj7hHX6m60bKveGGD+iLN7e+XPWLWSoUIraT/k2sTlxZj4os9cNx2jFClcBccYXhGR+h PoGfM9gq55kmpXuE9TuRE2DsqKlaFQJUENqqTC1ywwyfttqqIOB8BhUWyRZ+2gJ5cqsMdy9x0U2 GDGaFYI1243fopq0nZolOK3t1LJl5MNGzauvv6LqMm3/evH6Z99HJkbbrPDG7LLTLNTwI4TcPVg 0EdTSHdXljTOKZD/tpqEINqMIOeHyVDM/TcFsKNplaMkIBEX/OQrD6cdwIv5B7I74mS2Itav/T6 3ztAuNipZQs9SWKq+VgtXCghCC2dExzv0SDAcNj0FN9UKsRrfdUzj+k46NtdlWrHm2l14R2d18k CU3Y+oy5FXbpHhSNa2M96XBN6q0fNpb7QxhiOL0up0ekbP4Sn6v86jxyTOy6W+C9lK2cgLe9+WN ovI654z+agGtfPSvB98oyOf/Nn7aFxcE3GzuI1DntOu6iF+HPLWZkxKrQf7xYc1jECXmkyGZa7Y svyW1P6it9VPe3jz9bQHzoapGgBloRNqsP/YGVON5hfkUAUsfUpq6TdvEZtOjFugIU+KXCvsTPa EB85EduQXPRBiFw== X-Developer-Key: i=j-luthra@ti.com; a=openpgp; fpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145 Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 09 Oct 2023 06:11:05 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779283598237313634 X-GMAIL-MSGID: 1779283598237313634 |
Series |
CSI2RX support on J721E and AM62
|
|
Commit Message
Jai Luthra
Oct. 9, 2023, 1:09 p.m. UTC
From: Pratyush Yadav <p.yadav@ti.com> 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 <p.yadav@ti.com> Tested-by: Julien Massot <julien.massot@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Jai Luthra <j-luthra@ti.com> --- 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 230c627ef1f4..812f31dfaab1 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) @@ -271,8 +270,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,