mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 14:11:20 +00:00
dma-mapping: introduce dma_get_merge_boundary()
This patch adds a new DMA API "dma_get_merge_boundary". This function returns the DMA merge boundary if the DMA layer can merge the segments. This patch also adds the implementation for a new dma_map_ops pointer. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
38c38cb732
commit
6ba99411b8
3 changed files with 25 additions and 0 deletions
|
@ -407,3 +407,14 @@ size_t dma_max_mapping_size(struct device *dev)
|
|||
return size;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dma_max_mapping_size);
|
||||
|
||||
unsigned long dma_get_merge_boundary(struct device *dev)
|
||||
{
|
||||
const struct dma_map_ops *ops = get_dma_ops(dev);
|
||||
|
||||
if (!ops || !ops->get_merge_boundary)
|
||||
return 0; /* can't merge */
|
||||
|
||||
return ops->get_merge_boundary(dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dma_get_merge_boundary);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue