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

This commit is contained in:
qctecmdr 2020-11-02 02:18:45 -08:00 • committed by Gerrit - the friendly Code Review server
commit b1189d1d9c

View file

@ -315,8 +315,6 @@ static void kgsl_destroy_ion(struct kgsl_dma_buf_meta *meta)
{
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);
@ -2855,6 +2853,8 @@ 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;