mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
Revert "msm: kgsl: Call dma_buf_unmap_attachment() early"
This reverts msm-5.10 commit b84bd97e37f8ac3a0f3194ebcbb1fa962e42cd73. Warnings for direct dma clients during cache operations are now being handled by dma-buf driver. Instead of doing dma_buf_unmap_attachment early if we do it in destroy path, it helps in saving cycles and improving performance during app launch. Change-Id: Ic66dd3b66136318abf59685f95fee17890377fd4 Signed-off-by: Pankaj Gupta <quic_gpankaj@quicinc.com> Signed-off-by: Archana Sriram <quic_c_apsrir@quicinc.com>
This commit is contained in:
parent
c404d8ddf7
commit
7393ba39db
1 changed files with 5 additions and 3 deletions
|
|
@ -349,6 +349,7 @@ static void kgsl_destroy_ion(struct kgsl_memdesc *memdesc)
|
|||
|
||||
if (meta != NULL) {
|
||||
remove_dmabuf_list(meta);
|
||||
dma_buf_unmap_attachment(meta->attach, memdesc->sgt, DMA_BIDIRECTIONAL);
|
||||
dma_buf_detach(meta->dmabuf, meta->attach);
|
||||
dma_buf_put(meta->dmabuf);
|
||||
kfree(meta);
|
||||
|
|
@ -2996,7 +2997,7 @@ static int kgsl_setup_dma_buf(struct kgsl_device *device,
|
|||
{
|
||||
int ret = 0;
|
||||
struct scatterlist *s;
|
||||
struct sg_table *sg_table;
|
||||
struct sg_table *sg_table = NULL;
|
||||
struct dma_buf_attachment *attach = NULL;
|
||||
struct kgsl_dma_buf_meta *meta;
|
||||
|
||||
|
|
@ -3038,8 +3039,6 @@ static int kgsl_setup_dma_buf(struct kgsl_device *device,
|
|||
goto out;
|
||||
}
|
||||
|
||||
dma_buf_unmap_attachment(attach, sg_table, DMA_BIDIRECTIONAL);
|
||||
|
||||
meta->table = sg_table;
|
||||
entry->priv_data = meta;
|
||||
entry->memdesc.sgt = sg_table;
|
||||
|
|
@ -3094,6 +3093,9 @@ skip_access_check:
|
|||
|
||||
out:
|
||||
if (ret) {
|
||||
if (!IS_ERR_OR_NULL(sg_table))
|
||||
dma_buf_unmap_attachment(attach, sg_table, DMA_BIDIRECTIONAL);
|
||||
|
||||
if (!IS_ERR_OR_NULL(attach))
|
||||
dma_buf_detach(dmabuf, attach);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue