qcacmn: Defer IPA SMMU mapping to OPT_DP reserve

Currently, IPA SMMU map/unmap is called as part
of init. This causes every nbuf to be mapped
to IPA in the Rx path, causing throughputs
to drop. This change resolves the problem by
deferring the IPA SMMU map/unmap
call to OPT_DP filter reserve/release, as
nbuf needs to be mapped to IPA only in this scenario.

Change-Id: If198a6c5f22af58fdaf9d9c020c74b1f76002e37
CRs-Fixed: 3496679
This commit is contained in:
Namita Nair
2023-06-20 15:40:49 -07:00
committed by Rahul Choudhary
parent 7830b92b9d
commit b50ceeee79
12 changed files with 247 additions and 38 deletions

View File

@@ -365,6 +365,7 @@ dp_pdev_nbuf_alloc_and_map_replenish(struct dp_soc *dp_soc,
nbuf_frag_info_t->paddr =
qdf_nbuf_get_frag_paddr((nbuf_frag_info_t->virt_addr).nbuf, 0);
if (qdf_atomic_read(&dp_soc->ipa_mapped))
dp_ipa_handle_rx_buf_smmu_mapping(dp_soc, (qdf_nbuf_t)(
(nbuf_frag_info_t->virt_addr).nbuf),
rx_desc_pool->buf_size,
@@ -3160,10 +3161,11 @@ dp_pdev_rx_buffers_attach(struct dp_soc *dp_soc, uint32_t mac_id,
desc_list->rx_desc.cookie,
rx_desc_pool->owner);
dp_ipa_handle_rx_buf_smmu_mapping(
dp_soc, nbuf,
rx_desc_pool->buf_size, true,
__func__, __LINE__);
if (qdf_atomic_read(&dp_soc->ipa_mapped))
dp_ipa_handle_rx_buf_smmu_mapping(
dp_soc, nbuf,
rx_desc_pool->buf_size, true,
__func__, __LINE__);
dp_audio_smmu_map(dp_soc->osdev,
qdf_mem_paddr_from_dmaaddr(dp_soc->osdev,