From nobody Thu Oct 2 21:54:43 2025 Received: from fllvem-ot03.ext.ti.com (fllvem-ot03.ext.ti.com [198.47.19.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D48B8312817; Thu, 11 Sep 2025 10:29:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.245 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757586579; cv=none; b=jS359SMOFgFEOyB3ILABHaBo0wMkbjPyd0Q4Iza1Eg2NxLKWZNXFmU7Fu7tCaWcl7VOS54yPwUqiX1cHXsrIzVtjuImAA4L8CvSejfuy/Hi1kngvPuQF8xM1mqAOtIRzkivm9HSfsFfxzCEn8zV5ZgItLFEqP2603xSHJ+xDKRo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757586579; c=relaxed/simple; bh=rsPRg5VgHzRkxexgddMzmQY/Wh0eWwnIhZH833t5FpI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=u7cwk2eVfjI/P10kSpg2OcmN16LV3LHVyfh5htPfs0AHQA0KplEdADRxb0ex3Rc4UGji4RvZxfKjNObSx9FDdFvnEPnFBwkwufE1QXda6NmYI3rxOOb94FZhf/voN1GeOazzu79vgBgQLsAinkPdyzcX76216jQlQ2ORLwTor5w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=ecP8mo8S; arc=none smtp.client-ip=198.47.19.245 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="ecP8mo8S" Received: from fllvem-sh04.itg.ti.com ([10.64.41.54]) by fllvem-ot03.ext.ti.com (8.15.2/8.15.2) with ESMTP id 58BATGiB273380; Thu, 11 Sep 2025 05:29:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1757586556; bh=FG9HJWw7Lhj6QwP6idDJOS9tv0F27XWAEDOhWlOPB08=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ecP8mo8SKMIzp6qLv7O1mgpSDub/tSy16B0MUSt/gNA92oD0bj8e8lafBR0vWa30R gQ3uRZ6oWPYCPzt9vmJjZqJ/lkxhNt3ouy5xwvgmdYcCxC+NcLAkIInU6qAl/hY8gR pE5VDmCtJ2ylDU2MyMb1vxGYFXCR7RUgCf2MmiKk= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by fllvem-sh04.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 58BATGXk1875738 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL); Thu, 11 Sep 2025 05:29:16 -0500 Received: from DLEE204.ent.ti.com (157.170.170.84) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55; Thu, 11 Sep 2025 05:29:15 -0500 Received: from lelvem-mr05.itg.ti.com (10.180.75.9) by DLEE204.ent.ti.com (157.170.170.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 11 Sep 2025 05:29:15 -0500 Received: from ws.dhcp.ti.com (ws.dhcp.ti.com [172.24.233.149]) by lelvem-mr05.itg.ti.com (8.18.1/8.18.1) with ESMTP id 58BASXbj1985821; Thu, 11 Sep 2025 05:29:09 -0500 From: Rishikesh Donadkar To: , , CC: , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v7 05/16] media: ti: j721e-csi2rx: allocate DMA channel based on context index Date: Thu, 11 Sep 2025 15:58:21 +0530 Message-ID: <20250911102832.1583440-6-r-donadkar@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250911102832.1583440-1-r-donadkar@ti.com> References: <20250911102832.1583440-1-r-donadkar@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea Content-Type: text/plain; charset="utf-8" From: Pratyush Yadav With multiple contexts, there needs to be a different DMA channel for each context. Earlier, the DMA channel name was hard coded to "rx0" for the sake of simplicity. Generate the DMA channel name based on its index and get the channel corresponding to the context. Signed-off-by: Pratyush Yadav Signed-off-by: Jai Luthra Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Reviewed-by: Yemike Abhilash Chandra Signed-off-by: Rishikesh Donadkar Reviewed-by: Tomi Valkeinen --- drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c b/driver= s/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c index d4e6d6b5b2f7..99a721e46d54 100644 --- a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c +++ b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c @@ -1039,9 +1039,11 @@ static int ti_csi2rx_init_dma(struct ti_csi2rx_ctx *= ctx) struct dma_slave_config cfg =3D { .src_addr_width =3D DMA_SLAVE_BUSWIDTH_16_BYTES, }; + char name[5]; int ret; =20 - ctx->dma.chan =3D dma_request_chan(ctx->csi->dev, "rx0"); + snprintf(name, sizeof(name), "rx%u", ctx->idx); + ctx->dma.chan =3D dma_request_chan(ctx->csi->dev, name); if (IS_ERR(ctx->dma.chan)) return PTR_ERR(ctx->dma.chan); =20 --=20 2.34.1