From: Adrian Larumbe <adrian.martinezlarumbe@imgtec.com> To: radhey pandey <radheydmaengine@gmail.com> Cc: Vinod Koul <vkoul@kernel.org>, Lars-Peter Clausen <lars@metafoo.de>, <dmaengine@vger.kernel.org>, <michal.simek@xilinx.com>, <linux-arm-kernel@lists.infradead.org>, <radheys@xilinx.com> Subject: Re: [EXTERNAL] Re: [PATCH 0/4] Expand Xilinx CDMA functions Date: Fri, 2 Jul 2021 15:23:10 +0100 [thread overview] Message-ID: <20210702142310.vowvjanfwfivu45a@adrianlarumbe-HP-Elite-7500-Series-MT> (raw) In-Reply-To: <CAK8fcYC3Hdxas-5qUbXTi=a6VMXavt9O+yWn=1+8fPewehKy2w@mail.gmail.com> On 01.06.2021 15:59, radhey pandey wrote: > On Fri, Apr 23, 2021 at 10:51 PM Vinod Koul <vkoul@kernel.org> wrote: > > > > On 23-04-21, 15:51, Lars-Peter Clausen wrote: > > > On 4/23/21 3:24 PM, Vinod Koul wrote: > > > > On 23-04-21, 11:17, Lars-Peter Clausen wrote: > > > > > It seems to me what we are missing from the DMAengine API is the equivalent > > > > > of device_prep_dma_memcpy() that is able to take SG lists. There is already > > > > > a memset_sg, it should be possible to add something similar for memcpy. > > > > You mean something like dmaengine_prep_dma_sg() which was removed? > > > > > > > Ah, that's why I could have sworn we already had this! > > > > Even at that time we had the premise that we can bring the API back if > > we had users. I think many have asked for it, but I havent seen a patch > > with user yet :) > Right. Back then we had also discussed bringing the dma_sg API > but the idea was dropped as we didn't had a xilinx/any consumer > client driver for it in the mainline kernel. > > I think it's the same state now. Would it be alright if I brought back the old DMA_SG interface that was removed in commit c678fa66341c? It seems that what I've effectively done is implementing the semantics of that API call under the guise of dma_prep_slave. However I still need mem2mem SG transfer support on CDMA, which seems long gone from the driver, even though the HW does offer it. If people are fine with it I can restore that interface and CDMA as the sole consumer. > > > > static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_sg( > > > struct dma_chan *chan, > > > struct scatterlist *dst_sg, unsigned int dst_nents, > > > struct scatterlist *src_sg, unsigned int src_nents, > > > unsigned long flags) > > > > > > The problem with this API is that it would work only when src_sg and > > > dst_sg is of similar nature, if not then how should one go about > > > copying...should we fill without a care for dst_sg being different than > > > src_sg as long as total data to be copied has enough space in dst... > > At least for the CDMA the only requirement is that both buffers have the > > same total size. > > I will merge if with a user but semantics need to be absolutely clear on > what is allowed and not, do I hear a volunteer ? > -- > ~Vinod
WARNING: multiple messages have this Message-ID (diff)
From: Adrian Larumbe <adrian.martinezlarumbe@imgtec.com> To: radhey pandey <radheydmaengine@gmail.com> Cc: Vinod Koul <vkoul@kernel.org>, Lars-Peter Clausen <lars@metafoo.de>, <dmaengine@vger.kernel.org>, <michal.simek@xilinx.com>, <linux-arm-kernel@lists.infradead.org>, <radheys@xilinx.com> Subject: Re: [EXTERNAL] Re: [PATCH 0/4] Expand Xilinx CDMA functions Date: Fri, 2 Jul 2021 15:23:10 +0100 [thread overview] Message-ID: <20210702142310.vowvjanfwfivu45a@adrianlarumbe-HP-Elite-7500-Series-MT> (raw) In-Reply-To: <CAK8fcYC3Hdxas-5qUbXTi=a6VMXavt9O+yWn=1+8fPewehKy2w@mail.gmail.com> On 01.06.2021 15:59, radhey pandey wrote: > On Fri, Apr 23, 2021 at 10:51 PM Vinod Koul <vkoul@kernel.org> wrote: > > > > On 23-04-21, 15:51, Lars-Peter Clausen wrote: > > > On 4/23/21 3:24 PM, Vinod Koul wrote: > > > > On 23-04-21, 11:17, Lars-Peter Clausen wrote: > > > > > It seems to me what we are missing from the DMAengine API is the equivalent > > > > > of device_prep_dma_memcpy() that is able to take SG lists. There is already > > > > > a memset_sg, it should be possible to add something similar for memcpy. > > > > You mean something like dmaengine_prep_dma_sg() which was removed? > > > > > > > Ah, that's why I could have sworn we already had this! > > > > Even at that time we had the premise that we can bring the API back if > > we had users. I think many have asked for it, but I havent seen a patch > > with user yet :) > Right. Back then we had also discussed bringing the dma_sg API > but the idea was dropped as we didn't had a xilinx/any consumer > client driver for it in the mainline kernel. > > I think it's the same state now. Would it be alright if I brought back the old DMA_SG interface that was removed in commit c678fa66341c? It seems that what I've effectively done is implementing the semantics of that API call under the guise of dma_prep_slave. However I still need mem2mem SG transfer support on CDMA, which seems long gone from the driver, even though the HW does offer it. If people are fine with it I can restore that interface and CDMA as the sole consumer. > > > > static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_sg( > > > struct dma_chan *chan, > > > struct scatterlist *dst_sg, unsigned int dst_nents, > > > struct scatterlist *src_sg, unsigned int src_nents, > > > unsigned long flags) > > > > > > The problem with this API is that it would work only when src_sg and > > > dst_sg is of similar nature, if not then how should one go about > > > copying...should we fill without a care for dst_sg being different than > > > src_sg as long as total data to be copied has enough space in dst... > > At least for the CDMA the only requirement is that both buffers have the > > same total size. > > I will merge if with a user but semantics need to be absolutely clear on > what is allowed and not, do I hear a volunteer ? > -- > ~Vinod _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-07-02 14:32 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-23 1:19 [PATCH 0/4] Expand Xilinx CDMA functions Adrian Larumbe 2021-04-23 1:19 ` Adrian Larumbe 2021-04-23 1:19 ` [PATCH 1/4] dmaengine: xilinx_dma: Add extended address support in CDMA Adrian Larumbe 2021-04-23 1:19 ` Adrian Larumbe 2021-04-23 1:19 ` [PATCH 2/4] dmaengine: xilinx_dma: Add channel configuration setting callback Adrian Larumbe 2021-04-23 1:19 ` Adrian Larumbe 2021-04-23 1:19 ` [PATCH 3/4] dmaengine: xilinx_dma: Add CDMA SG transfer support Adrian Larumbe 2021-04-23 1:19 ` Adrian Larumbe 2021-04-23 1:19 ` [PATCH 4/4] dmaengine: xilinx_dma: Add device synchronisation callback Adrian Larumbe 2021-04-23 1:19 ` Adrian Larumbe 2021-04-23 6:33 ` Lars-Peter Clausen 2021-04-23 6:33 ` Lars-Peter Clausen 2021-04-23 11:49 ` [EXTERNAL] " Adrian Larumbe 2021-04-23 11:49 ` Adrian Larumbe 2021-04-23 9:17 ` [PATCH 0/4] Expand Xilinx CDMA functions Lars-Peter Clausen 2021-04-23 9:17 ` Lars-Peter Clausen 2021-04-23 11:38 ` [EXTERNAL] " Adrian Larumbe 2021-04-23 11:38 ` Adrian Larumbe 2021-04-23 13:24 ` Vinod Koul 2021-04-23 13:24 ` Vinod Koul 2021-04-23 13:51 ` Lars-Peter Clausen 2021-04-23 13:51 ` Lars-Peter Clausen 2021-04-23 14:36 ` [EXTERNAL] " Adrian Larumbe 2021-04-23 14:36 ` Adrian Larumbe 2021-04-23 17:20 ` Vinod Koul 2021-04-23 17:20 ` Vinod Koul 2021-06-01 10:29 ` radhey pandey 2021-06-01 10:29 ` radhey pandey 2021-07-02 14:23 ` Adrian Larumbe [this message] 2021-07-02 14:23 ` [EXTERNAL] " Adrian Larumbe 2021-07-05 3:53 ` Vinod Koul 2021-07-05 3:53 ` Vinod Koul
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=20210702142310.vowvjanfwfivu45a@adrianlarumbe-HP-Elite-7500-Series-MT \ --to=adrian.martinezlarumbe@imgtec.com \ --cc=dmaengine@vger.kernel.org \ --cc=lars@metafoo.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=michal.simek@xilinx.com \ --cc=radheydmaengine@gmail.com \ --cc=radheys@xilinx.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.