Revert "BACKPORT: FROMLIST: dma-heap: Let dma heap use dma_map_attrs to map & unmap iova"
This reverts commit 21455112cc.
Change-Id: I29890db7062c3062900d13b33d8fb9b23149cb04
This commit is contained in:
@@ -99,10 +99,9 @@ static struct sg_table *cma_heap_map_dma_buf(struct dma_buf_attachment *attachme
|
||||
{
|
||||
struct dma_heap_attachment *a = attachment->priv;
|
||||
struct sg_table *table = &a->table;
|
||||
int attrs = attachment->dma_map_attrs;
|
||||
int ret;
|
||||
|
||||
ret = dma_map_sgtable(attachment->dev, table, direction, attrs);
|
||||
ret = dma_map_sgtable(attachment->dev, table, direction, 0);
|
||||
if (ret)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
a->mapped = true;
|
||||
@@ -114,10 +113,9 @@ static void cma_heap_unmap_dma_buf(struct dma_buf_attachment *attachment,
|
||||
enum dma_data_direction direction)
|
||||
{
|
||||
struct dma_heap_attachment *a = attachment->priv;
|
||||
int attrs = attachment->dma_map_attrs;
|
||||
|
||||
a->mapped = false;
|
||||
dma_unmap_sgtable(attachment->dev, table, direction, attrs);
|
||||
dma_unmap_sgtable(attachment->dev, table, direction, 0);
|
||||
}
|
||||
|
||||
static int cma_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf,
|
||||
|
||||
@@ -136,11 +136,11 @@ static struct sg_table *system_heap_map_dma_buf(struct dma_buf_attachment *attac
|
||||
{
|
||||
struct dma_heap_attachment *a = attachment->priv;
|
||||
struct sg_table *table = a->table;
|
||||
int attr = attachment->dma_map_attrs;
|
||||
int attr = 0;
|
||||
int ret;
|
||||
|
||||
if (a->uncached)
|
||||
attr |= DMA_ATTR_SKIP_CPU_SYNC;
|
||||
attr = DMA_ATTR_SKIP_CPU_SYNC;
|
||||
|
||||
ret = dma_map_sgtable(attachment->dev, table, direction, attr);
|
||||
if (ret)
|
||||
@@ -155,10 +155,10 @@ static void system_heap_unmap_dma_buf(struct dma_buf_attachment *attachment,
|
||||
enum dma_data_direction direction)
|
||||
{
|
||||
struct dma_heap_attachment *a = attachment->priv;
|
||||
int attr = attachment->dma_map_attrs;
|
||||
int attr = 0;
|
||||
|
||||
if (a->uncached)
|
||||
attr |= DMA_ATTR_SKIP_CPU_SYNC;
|
||||
attr = DMA_ATTR_SKIP_CPU_SYNC;
|
||||
a->mapped = false;
|
||||
dma_unmap_sgtable(attachment->dev, table, direction, attr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user