msm: ipa3: fix to cleanup the dma allocation.

When commit header table from memory to HW, adding fix to clean
dma allocation if it fails in multiple mapping attempts and also to
clean the allocated mapping of hdr table after commit to HW.

Change-Id: Icbf1b855e34625ffe8f8356a59cddf85a91b0160
Signed-off-by: Jagadeesh Ponduru <quic_jponduru@quicinc.com>
Dieser Commit ist enthalten in:
Jagadeesh Ponduru
2022-04-04 13:32:05 +05:30
Ursprung 23f607b8dd
Commit 1403c31a33

Datei anzeigen

@@ -360,6 +360,11 @@ int __ipa_commit_hdr_v3_0(void)
ipa3_ctx->hdr_sys_mem = hdr_mem[HDR_TBL_SYS];
}
else {
dma_free_coherent(ipa3_ctx->pdev, hdr_mem[HDR_TBL_SYS].size,
hdr_mem[HDR_TBL_SYS].base,hdr_mem[HDR_TBL_SYS].phys_base);
}
if (ipa3_ctx->hdr_proc_ctx_tbl_lcl) {
dma_free_coherent(ipa3_ctx->pdev, ctx_mem.size, ctx_mem.base,
ctx_mem.phys_base);
@@ -372,6 +377,10 @@ int __ipa_commit_hdr_v3_0(void)
ipa3_ctx->hdr_proc_ctx_mem.phys_base);
ipa3_ctx->hdr_proc_ctx_mem = ctx_mem;
}
else {
dma_free_coherent(ipa3_ctx->pdev, ctx_mem.size,
ctx_mem.base,ctx_mem.phys_base);
}
}
goto end;