Merge "Revert "msm: kgsl: Call dma_buf_unmap_attachment() early""

This commit is contained in:
qctecmdr 2022-02-22 19:00:09 -08:00 • committed by Gerrit - the friendly Code Review server
commit b701a27c87

View file

@ -346,6 +346,8 @@ static void kgsl_destroy_ion(struct kgsl_memdesc *memdesc)
if (meta != NULL) {
remove_dmabuf_list(meta);
dma_buf_unmap_attachment(meta->attach, meta->table,
DMA_BIDIRECTIONAL);
dma_buf_detach(meta->dmabuf, meta->attach);
dma_buf_put(meta->dmabuf);
kfree(meta);
@ -3015,8 +3017,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;