Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c42518e3 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: fix to match MHI Prime ring allocation size with dma api"

parents 560a74d1 8d70f4d8
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -477,7 +477,7 @@ static dma_addr_t ipa_mpm_smmu_map(void *va_addr,

		/* Flush the cache with dma_map_single for IPA AP CB */
		*ap_cb_iova = dma_map_single(ipa3_ctx->pdev, va_addr,
						sz, dir);
						IPA_MPM_RING_TOTAL_SIZE, dir);
		ret = ipa3_iommu_map(ipa_smmu_domain, iova_p,
					pa_p, size_p, prot);
		if (ret) {
@@ -499,7 +499,8 @@ static dma_addr_t ipa_mpm_smmu_map(void *va_addr,
		iova = iova_p;
		cb->next_addr = iova_p + size_p;
	} else {
		iova = dma_map_single(ipa3_ctx->pdev, va_addr, sz, dir);
		iova = dma_map_single(ipa3_ctx->pdev, va_addr,
					IPA_MPM_RING_TOTAL_SIZE, dir);
		*ap_cb_iova = iova;
	}
	return iova;
@@ -556,9 +557,10 @@ static void ipa_mpm_smmu_unmap(dma_addr_t carved_iova, int sz, int dir,

		cb->next_addr -= size_p;
		dma_unmap_single(ipa3_ctx->pdev, ap_cb_iova,
			size_p, dir);
			IPA_MPM_RING_TOTAL_SIZE, dir);
	} else {
		dma_unmap_single(ipa3_ctx->pdev, ap_cb_iova, sz, dir);
		dma_unmap_single(ipa3_ctx->pdev, ap_cb_iova,
			IPA_MPM_RING_TOTAL_SIZE, dir);
	}
}