From nobody Mon Feb 9 21:02:57 2026 Received: from fllvem-ot04.ext.ti.com (fllvem-ot04.ext.ti.com [198.47.19.246]) (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 AFF1630C36B; Mon, 8 Sep 2025 13:48:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.246 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757339317; cv=none; b=PZGf6DQe7nMQGZnApfJCUUSQTugyS4nZ+DXV85tHgF4MZmosegmjnA94TQX536oc30MtZe6QDD6seM2xTwSQgx1tPQmFL6HAlQbmOp4JRjMM9gH5W/mH33R+BmHBZiRstnBUfDpgUXkbaIQ8ymIKuZ7D9mtzZblC5jy5sWE2R/k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757339317; c=relaxed/simple; bh=r+HwD8D5tcCQCGuZ5a0GLQzyBbmUAevu+VZP1FlW+Ks=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=NLBLYr6v1rjF+WYgGka7rLF9peWpMKQ/3LS0Z3ezt/kGWwncMQq+isUOWrkZ033F3qrBr2JNZxi1A96Oh2Eq/9Yv2aXLEOPIto0esi0MMvRLNcZM2JKYO45zOsGhVt/otarfsSiE3dQDzPvWqOgBTmvv2H25U8ijcYhP7LzIFv0= 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=GlTzi1EU; arc=none smtp.client-ip=198.47.19.246 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="GlTzi1EU" Received: from fllvem-sh04.itg.ti.com ([10.64.41.54]) by fllvem-ot04.ext.ti.com (8.15.2/8.15.2) with ESMTP id 588DmDET062756; Mon, 8 Sep 2025 08:48:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1757339293; bh=f8EUzDITmfB6Ez5YJkgRkUm5E/sFxOUg8JLJpDyGok0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=GlTzi1EUNtXhGP/mnpxTc1jXKsxGeF5yPKLH66UYOOAcGbEdHBv+hk4m01tL7oS3o mjZpBwkrkQ2huCl+8J9QaCrwybzO7yRcL3S9eZqh4Y52qQAcPH3ivVhVtvir9waMIx K5gkJigZvdAllRf6Ll1EXQCJ7d6RdRHBpD91nZKQ= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by fllvem-sh04.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 588DmDbR3810918 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL); Mon, 8 Sep 2025 08:48:13 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55; Mon, 8 Sep 2025 08:48:12 -0500 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DLEE105.ent.ti.com (157.170.170.35) 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, 8 Sep 2025 08:48:12 -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 588DlU8w689321; Mon, 8 Sep 2025 08:48:06 -0500 From: Rishikesh Donadkar To: , , CC: , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v6 05/16] media: ti: j721e-csi2rx: allocate DMA channel based on context index Date: Mon, 8 Sep 2025 19:17:18 +0530 Message-ID: <20250908134729.3940366-6-r-donadkar@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250908134729.3940366-1-r-donadkar@ti.com> References: <20250908134729.3940366-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 c7aae3049696..5a74e3534147 100644 --- a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c +++ b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c @@ -1038,9 +1038,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