mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
ANDROID: staging: ion: use dma_[un]map_sg_attrs
The [un]map_dma_buf receives dma_buf_attachment by parameter. The caller could set the dma_map_attrs on dma_buf_attachment such as DMA_ATTR_SKIP_CPU_SYNC, and expects that attributes are applied. The dma_[un]map_sg is changed into dma_[un]map_sg_attrs to send the attributes. Bug: 151775080 Signed-off-by: Hyesoo Yu <hyesoo.yu@samsung.com> Change-Id: Id5ca12ff120bfeac53a84ffad91e7a219e2180cd (cherry picked from commit 16ce0bda52c9948d52e5676359b6cade2662580f) Signed-off-by: Hridya Valsaraju <hridya@google.com>
This commit is contained in:
parent
7bbd50f11d
commit
d4d1765952
1 changed files with 4 additions and 2 deletions
|
|
@ -111,7 +111,8 @@ static struct sg_table *ion_map_dma_buf(struct dma_buf_attachment *attachment,
|
|||
a = attachment->priv;
|
||||
table = a->table;
|
||||
|
||||
if (!dma_map_sg(attachment->dev, table->sgl, table->nents, direction))
|
||||
if (!dma_map_sg_attrs(attachment->dev, table->sgl, table->nents,
|
||||
direction, attachment->dma_map_attrs))
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
return table;
|
||||
|
|
@ -128,7 +129,8 @@ static void ion_unmap_dma_buf(struct dma_buf_attachment *attachment,
|
|||
return heap->buf_ops.unmap_dma_buf(attachment, table,
|
||||
direction);
|
||||
|
||||
dma_unmap_sg(attachment->dev, table->sgl, table->nents, direction);
|
||||
dma_unmap_sg_attrs(attachment->dev, table->sgl, table->nents,
|
||||
direction, attachment->dma_map_attrs);
|
||||
}
|
||||
|
||||
static void ion_dma_buf_release(struct dma_buf *dmabuf)
|
||||
|
|
|
|||
Loading…
Reference in a new issue