summaryrefslogtreecommitdiff
path: root/drivers/dma/dw-axi-dmac/dw-axi-dmac.h
diff options
context:
space:
mode:
authorSia Jee Heng <jee.heng.sia@intel.com>2021-01-25 09:32:40 +0800
committerVinod Koul <vkoul@kernel.org>2021-02-01 15:08:14 +0530
commitef6fb2d6f1abd56cc067c694253ea362159b5ac3 (patch)
tree2217272789d519aae4f164f561db3f1e02a8e3a3 /drivers/dma/dw-axi-dmac/dw-axi-dmac.h
parent8c70fb7e0a0ab477504e0bd761d301ddd616c8eb (diff)
dmaengine: dw-axi-dmac: simplify descriptor management
Simplify and refactor the descriptor management by removing the redundant Linked List Item (LLI) queue control logic from the AxiDMA driver. The descriptor is split into virtual descriptor and hardware LLI so that only hardware LLI memories are allocated from the DMA memory pool. Up to 64 descriptors can be allocated within a PAGE_SIZE compare to 16 descriptors in previous version. This solves the problem where an ALSA driver expects more than 16 DMA descriptors to run. Signed-off-by: Sia Jee Heng <jee.heng.sia@intel.com> Tested-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Link: https://lore.kernel.org/r/20210125013255.25799-3-jee.heng.sia@intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/dw-axi-dmac/dw-axi-dmac.h')
-rw-r--r--drivers/dma/dw-axi-dmac/dw-axi-dmac.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac.h b/drivers/dma/dw-axi-dmac/dw-axi-dmac.h
index 18b6014cf9b4..41e775e6e593 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac.h
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac.h
@@ -41,6 +41,7 @@ struct axi_dma_chan {
struct virt_dma_chan vc;
+ struct axi_dma_desc *desc;
/* these other elements are all protected by vc.lock */
bool is_paused;
};
@@ -80,12 +81,16 @@ struct __packed axi_dma_lli {
__le32 reserved_hi;
};
+struct axi_dma_hw_desc {
+ struct axi_dma_lli *lli;
+ dma_addr_t llp;
+};
+
struct axi_dma_desc {
- struct axi_dma_lli lli;
+ struct axi_dma_hw_desc *hw_desc;
struct virt_dma_desc vd;
struct axi_dma_chan *chan;
- struct list_head xfer_list;
};
static inline struct device *dchan2dev(struct dma_chan *dchan)