DMA Engine development
 help / color / mirror / Atom feed
From: Siddharth Vadapalli <s-vadapalli@ti.com>
To: <peter.ujfalusi@gmail.com>, <vkoul@kernel.org>
Cc: <dmaengine@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <srk@ti.com>,
	<vigneshr@ti.com>, <s-vadapalli@ti.com>
Subject: [PATCH v2 2/4] dmaengine: ti: k3-udma-glue: Update name for remote RX channel device
Date: Tue, 12 Dec 2023 16:40:09 +0530	[thread overview]
Message-ID: <20231212111011.1401641-3-s-vadapalli@ti.com> (raw)
In-Reply-To: <20231212111011.1401641-1-s-vadapalli@ti.com>

A single RX Channel can have multiple flows. It is possible that a
single device requests multiple flows on the same RX Channel. In such
cases, the existing implementation of naming the device on the basis of
the RX Channel can result in duplicate names. The existing implementation
only uses the RX Channel source thread when naming, which implies duplicate
names when different flows are being requested on the same RX Channel.

In order to avoid duplicate names, include the RX flow as well in the name.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
---
 drivers/dma/ti/k3-udma-glue.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/ti/k3-udma-glue.c b/drivers/dma/ti/k3-udma-glue.c
index d8781625034b..eff1ae3d3efe 100644
--- a/drivers/dma/ti/k3-udma-glue.c
+++ b/drivers/dma/ti/k3-udma-glue.c
@@ -1072,8 +1072,8 @@ k3_udma_glue_request_remote_rx_chn(struct device *dev, const char *name,
 
 	rx_chn->common.chan_dev.class = &k3_udma_glue_devclass;
 	rx_chn->common.chan_dev.parent = xudma_get_device(rx_chn->common.udmax);
-	dev_set_name(&rx_chn->common.chan_dev, "rchan_remote-0x%04x",
-		     rx_chn->common.src_thread);
+	dev_set_name(&rx_chn->common.chan_dev, "rchan_remote-0x%04x-0x%02x",
+		     rx_chn->common.src_thread, rx_chn->flow_id_base);
 	ret = device_register(&rx_chn->common.chan_dev);
 	if (ret) {
 		dev_err(dev, "Channel Device registration failed %d\n", ret);
-- 
2.34.1


  parent reply	other threads:[~2023-12-12 11:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-12 11:10 [PATCH v2 0/4] Add APIs to request TX/RX DMA channels by ID Siddharth Vadapalli
2023-12-12 11:10 ` [PATCH v2 1/4] dmaengine: ti: k3-udma-glue: Add function to parse channel " Siddharth Vadapalli
2023-12-12 11:10 ` Siddharth Vadapalli [this message]
2023-12-12 11:10 ` [PATCH v2 3/4] dmaengine: ti: k3-udma-glue: Add function to request TX " Siddharth Vadapalli
2023-12-14 15:41   ` Péter Ujfalusi
2023-12-15  6:08     ` Siddharth Vadapalli
2023-12-17 11:18       ` Péter Ujfalusi
2023-12-18  4:30         ` Siddharth Vadapalli
2023-12-12 11:10 ` [PATCH v2 4/4] dmaengine: ti: k3-udma-glue: Add function to request RX " Siddharth Vadapalli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231212111011.1401641-3-s-vadapalli@ti.com \
    --to=s-vadapalli@ti.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.ujfalusi@gmail.com \
    --cc=srk@ti.com \
    --cc=vigneshr@ti.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox