Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1632878

[PATCH] Allow to use DMA_CTRL_REUSE flag for all channel types

From Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Newsgroups linux.kernel
Subject [PATCH] Allow to use DMA_CTRL_REUSE flag for all channel types
Date 2017-04-28 15:40 +0200
Message-ID <tBehP-7VW-9@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


In the current implementation dma_get_slave_caps is used to check
state of descriptor_reuse option. But dma_get_slave_caps includes
check if the channel supports slave transactions.
So DMA_CTRL_REUSE flag can be set (even for MEM-TO-MEM tranfers)
only if channel supports slave transactions.

Now we can use DMA_CTRL_REUSE flag for all channel types.
Also it allows to test reusing mechanism with simply mem-to-mem dma
test.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
---
 include/linux/dmaengine.h | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 5336808..92cf8b0 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -1376,11 +1376,7 @@ static inline int dma_get_slave_caps(struct dma_chan *chan,
 
 static inline int dmaengine_desc_set_reuse(struct dma_async_tx_descriptor *tx)
 {
-	struct dma_slave_caps caps;
-
-	dma_get_slave_caps(tx->chan, &caps);
-
-	if (caps.descriptor_reuse) {
+	if (tx->chan->device->descriptor_reuse) {
 		tx->flags |= DMA_CTRL_REUSE;
 		return 0;
 	} else {
-- 
2.9.3

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] Allow to use DMA_CTRL_REUSE flag for all channel types Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> - 2017-04-28 15:40 +0200
  Re: [PATCH] Allow to use DMA_CTRL_REUSE flag for all channel types Vinod Koul <vinod.koul@intel.com> - 2017-05-01 07:50 +0200
    Re: [PATCH] Allow to use DMA_CTRL_REUSE flag for all channel types Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> - 2017-05-02 17:20 +0200
      Re: [PATCH] Allow to use DMA_CTRL_REUSE flag for all channel types Vinod Koul <vinod.koul@intel.com> - 2017-05-10 06:00 +0200

csiph-web