From: Vinod Koul <vkoul@kernel.org>
To: Alan Mikhak <alan.mikhak@sifive.com>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org, gustavo.pimentel@synopsys.com,
dan.j.williams@intel.com, kishon@ti.com,
paul.walmsley@sifive.com
Subject: Re: [PATCH][next] dmaengine: dw-edma: support local dma device transfer semantics
Date: Mon, 4 May 2020 10:59:58 +0530 [thread overview]
Message-ID: <20200504052958.GH1375924@vkoul-mobl> (raw)
In-Reply-To: <1588122633-1552-1-git-send-email-alan.mikhak@sifive.com>
On 28-04-20, 18:10, Alan Mikhak wrote:
> From: Alan Mikhak <alan.mikhak@sifive.com>
>
> Modify dw_edma_device_transfer() to also support the semantics of dma
> device transfer for additional use cases involving pcitest utility as a
> local initiator.
>
> For its original use case, dw-edma supported the semantics of dma device
> transfer from the perspective of a remote initiator who is located across
> the PCIe bus from dma channel hardware.
>
> To a remote initiator, DMA_DEV_TO_MEM means using a remote dma WRITE
> channel to transfer from remote memory to local memory. A WRITE channel
> would be employed on the remote device in order to move the contents of
> remote memory to the bus destined for local memory.
>
> To a remote initiator, DMA_MEM_TO_DEV means using a remote dma READ
> channel to transfer from local memory to remote memory. A READ channel
> would be employed on the remote device in order to move the contents of
> local memory to the bus destined for remote memory.
>
> >From the perspective of a local dma initiator who is co-located on the
> same side of the PCIe bus as the dma channel hardware, the semantics of
> dma device transfer are flipped.
>
> To a local initiator, DMA_DEV_TO_MEM means using a local dma READ channel
> to transfer from remote memory to local memory. A READ channel would be
> employed on the local device in order to move the contents of remote
> memory to the bus destined for local memory.
>
> To a local initiator, DMA_MEM_TO_DEV means using a local dma WRITE channel
> to transfer from local memory to remote memory. A WRITE channel would be
> employed on the local device in order to move the contents of local memory
> to the bus destined for remote memory.
>
> To support local dma initiators, dw_edma_device_transfer() is modified to
> now examine the direction field of struct dma_slave_config for the channel
> which initiators can configure by calling dmaengine_slave_config().
>
> If direction is configured as either DMA_DEV_TO_MEM or DMA_MEM_TO_DEV,
> local initiator semantics are used. If direction is a value other than
> DMA_DEV_TO_MEM nor DMA_MEM_TO_DEV, then remote initiator semantics are
> used. This should maintain backward compatibility with the original use
> case of dw-edma.
>
> The dw-edma-test utility is an example of a remote initiator. From reading
> its patch, dw-edma-test does not specifically set the direction field of
> struct dma_slave_config. Since dw_edma_device_transfer() also does not
> check the direction field of struct dma_slave_config, it seems safe to use
> this convention in dw-edma to support both local and remote initiator
> semantics.
Applied, thanks
--
~Vinod
prev parent reply other threads:[~2020-05-04 5:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-29 1:10 [PATCH][next] dmaengine: dw-edma: support local dma device transfer semantics Alan Mikhak
2020-05-04 5:29 ` Vinod Koul [this message]
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=20200504052958.GH1375924@vkoul-mobl \
--to=vkoul@kernel.org \
--cc=alan.mikhak@sifive.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=gustavo.pimentel@synopsys.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=paul.walmsley@sifive.com \
/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;
as well as URLs for NNTP newsgroup(s).