From: "Péter Ujfalusi" <peter.ujfalusi@gmail.com>
To: Siddharth Vadapalli <s-vadapalli@ti.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
Subject: Re: [PATCH 0/4] Add APIs to request TX/RX DMA channels by ID
Date: Wed, 15 Nov 2023 21:59:57 +0200 [thread overview]
Message-ID: <9d465de4-3930-4856-9d8e-7deb567a628f@gmail.com> (raw)
In-Reply-To: <20231114083906.3143548-1-s-vadapalli@ti.com>
On 14/11/2023 10:39, Siddharth Vadapalli wrote:
> The existing APIs for requesting TX and RX DMA channels rely on parsing
> a device-tree node to obtain the Channel/Thread IDs from their names.
Yes, since it is a DMA device and it is using the standard DMA mapping.
It is by design that the standard DMAengine and the custom glue layer
(which should have been a temporary solution) uses the same standard DMA
binding to make sure that we are not going to deviate from the standard
and be able to move the glue users to DMAengine (which would need core
changes).
> However, it is possible to know the thread IDs by alternative means such
> as being informed by Firmware on a remote core regarding the allocated
> TX/RX DMA channel IDs. Thus, add APIs to support such use cases.
I see, so the TISCI res manager is going to managed the channels/flows
for some peripherals?
What is the API and parameters to get these channels?
I would really like to follow a standard binding since what will happen
if the firmware will start to provision channels/flows for DMAengine
users? It is not that simple to hack that around.
My initial take is that this can be implemented via the existing DMA
crossbar support. It has been created exactly for this sort of purpose.
I'm sure you need to provide some sort of parameters to TISCI to get the
channel/rflow provisioned for the host requesting, right?
The crossbar implements the binding with the given set of parameters,
does the needed 'black magic' to get the information needed for the
target DMA and crafts the binding for it and get's the channel.
If you take a look at the drivers/dma/ti/dma-crossbar.c, it implements
two types of crossbars.
For DMAengine, it would be relatively simple to write a new one for
tisci, The glue layer might needs a bit more work as it is not relying
on core, but I would not think that it is that much complicated to
extend it to be able to handle a crossbar binding.
The benefit is that none of the clients should not need to know about
the way the channel is looked up, they just request for an RX channel
and depending on the binding they will get it directly from the DMA or
get the translation via the crossbar to be able to fetch the channel.
Can you check if this would be doable?
For reference:
Documentation/devicetree/bindings/dma/dma-router.yaml
Documentation/devicetree/bindings/dma/ti-dma-crossbar.txt
drivers/dma/ti/dma-crossbar.c
> Additionally, since the name of the device for the remote RX channel is
> being set purely on the basis of the RX channel ID itself, it can result
> in duplicate names when multiple flows are used on the same channel.
> Avoid name duplication by including the flow in the name.
Make sense.
> Series is based on linux-next tagged next-20231114.
>
> RFC Series:
> https://lore.kernel.org/r/20231111121555.2656760-1-s-vadapalli@ti.com/
>
> Changes since RFC Series:
> - Rebased patches 1, 2 and 3 on linux-next tagged next-20231114.
> - Added patch 4 to the series.
>
> Regards,
> Siddharth.
>
> Siddharth Vadapalli (4):
> dmaengine: ti: k3-udma-glue: Add function to parse channel by ID
> dmaengine: ti: k3-udma-glue: Add function to request TX channel by ID
> dmaengine: ti: k3-udma-glue: Add function to request RX channel by ID
> dmaengine: ti: k3-udma-glue: Update name for remote RX channel device
>
> drivers/dma/ti/k3-udma-glue.c | 306 ++++++++++++++++++++++---------
> include/linux/dma/k3-udma-glue.h | 8 +
> 2 files changed, 228 insertions(+), 86 deletions(-)
>
--
Péter
next prev parent reply other threads:[~2023-11-15 19:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-14 8:39 [PATCH 0/4] Add APIs to request TX/RX DMA channels by ID Siddharth Vadapalli
2023-11-14 8:39 ` [PATCH 1/4] dmaengine: ti: k3-udma-glue: Add function to parse channel " Siddharth Vadapalli
2023-11-14 8:39 ` [PATCH 2/4] dmaengine: ti: k3-udma-glue: Add function to request TX " Siddharth Vadapalli
2023-11-14 8:39 ` [PATCH 3/4] dmaengine: ti: k3-udma-glue: Add function to request RX " Siddharth Vadapalli
2023-11-14 8:39 ` [PATCH 4/4] dmaengine: ti: k3-udma-glue: Update name for remote RX channel device Siddharth Vadapalli
2023-11-15 19:59 ` Péter Ujfalusi [this message]
2023-11-17 5:55 ` [PATCH 0/4] Add APIs to request TX/RX DMA channels by ID Siddharth Vadapalli
2023-11-22 15:22 ` Péter Ujfalusi
2023-12-04 8:21 ` Siddharth Vadapalli
2023-12-11 9:00 ` 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=9d465de4-3930-4856-9d8e-7deb567a628f@gmail.com \
--to=peter.ujfalusi@gmail.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=s-vadapalli@ti.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