From nobody Fri Oct 3 21:02:26 2025 Received: from lelvem-ot02.ext.ti.com (lelvem-ot02.ext.ti.com [198.47.23.235]) (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 BFFEB2F39B1; Mon, 25 Aug 2025 14:26:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.235 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756131996; cv=none; b=hz8WdZeV3QzwqdDl/XxgkcUblt44M6RgdPT8xwVbhAwgJFChLRc5LnrYs+0XoLT+DtziU6oQXK6Yhstonc1jjQyDi/5g1xapves5fI7/Weai4vJHMUyF/XXithrCO/RAN57CzOHBFL2TzrfZ/rd9snytzwq3GUNkIMbPPVsjAKY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756131996; c=relaxed/simple; bh=oy/FqP/g+SbZhVpKS68mLdaW+1sNSe5OV359W/qnbJY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=f3YUR8ZJJNhf07u197OLJCle6LWrpyIl56TVe1jNhjHlb6v0HWTUS4Y5w0hCqHE98aLbKwYpCg+CR0zV0yXMjNngHY5VdBYW2BrzMdSWLgS2LK4K3/4Yu2ixVxPaSf+hFwG9RSeo4zN3VTrDGKXBdYbxYCwDFjuPzEj9eUQGa/I= 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=NSlA3ktj; arc=none smtp.client-ip=198.47.23.235 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="NSlA3ktj" Received: from lelvem-sh01.itg.ti.com ([10.180.77.71]) by lelvem-ot02.ext.ti.com (8.15.2/8.15.2) with ESMTP id 57PEQ0qD1311037; Mon, 25 Aug 2025 09:26:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1756131960; bh=jOYAJxh0WPskVMFabb7tswjjdVmgor+qBbtpEoJsbc8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=NSlA3ktjm6mNWU/XiBlVTIJ15xACVjq70IqivlLZN01qfa9jF0xTBkcMmNyO0GGZa b0IMZaGHtwWU5zyCD0+S0OZ0QaNf5MHlFYZm6oODuTOsPg4Jbv+qtTeNzWSQpRQoC/ uiF1BQfMxd3LPwjr7xgj7mhwzx99xfPrKwKMKhJU= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by lelvem-sh01.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 57PEQ0Ne669096 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL); Mon, 25 Aug 2025 09:26:00 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55; Mon, 25 Aug 2025 09:26:00 -0500 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55 via Frontend Transport; Mon, 25 Aug 2025 09:26:00 -0500 Received: from ws.dhcp.ti.com (ws.dhcp.ti.com [172.24.233.149]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 57PEPN3s3747540; Mon, 25 Aug 2025 09:25:54 -0500 From: Rishikesh Donadkar To: , , CC: , , , , , , , , , , , , , , , , , , Subject: [PATCH v5 05/14] media: ti: j721e-csi2rx: allocate DMA channel based on context index Date: Mon, 25 Aug 2025 19:55:13 +0530 Message-ID: <20250825142522.1826188-6-r-donadkar@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250825142522.1826188-1-r-donadkar@ti.com> References: <20250825142522.1826188-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 --- 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 50a935494e43..4b5e49c2244e 100644 --- a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c +++ b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c @@ -1042,9 +1042,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