qcacld-3.0: Do ipa tx buffer map after ipa register callback invoked
Do ipa tx buffer map after registering IPA ready callback with IPA driver. Otherwise ipa_is_ready flag always is false while calling cds_smmu_map_unmap from htt_tx_ipa_uc_wdi_tx_buf_alloc, and then it will not really make tx buffer map take effect Change-Id: Ib2fee8e5b68d5ba06c8079d39c0a5695087cbc2b
Šī revīzija ir iekļauta:

revīziju iesūtīja
snandini

vecāks
397c1deccc
revīzija
781829f879
@@ -1131,18 +1131,9 @@ static int htt_tx_ipa_uc_wdi_tx_buf_alloc(struct htt_pdev_t *pdev,
|
||||
qdf_dma_addr_t buffer_paddr;
|
||||
uint32_t *header_ptr;
|
||||
target_paddr_t *ring_vaddr;
|
||||
qdf_mem_info_t *mem_map_table = NULL, *mem_info = NULL;
|
||||
qdf_shared_mem_t *shared_tx_buffer;
|
||||
|
||||
ring_vaddr = (target_paddr_t *)pdev->ipa_uc_tx_rsc.tx_comp_ring->vaddr;
|
||||
if (qdf_mem_smmu_s1_enabled(pdev->osdev)) {
|
||||
mem_map_table = qdf_mem_map_table_alloc(uc_tx_buf_cnt);
|
||||
if (!mem_map_table) {
|
||||
qdf_print("Failed to allocate memory");
|
||||
return 0;
|
||||
}
|
||||
mem_info = mem_map_table;
|
||||
}
|
||||
|
||||
/* Allocate TX buffers as many as possible */
|
||||
for (tx_buffer_count = 0;
|
||||
@@ -1197,19 +1188,9 @@ static int htt_tx_ipa_uc_wdi_tx_buf_alloc(struct htt_pdev_t *pdev,
|
||||
/* Memory barrier to ensure actual value updated */
|
||||
|
||||
ring_vaddr++;
|
||||
if (qdf_mem_smmu_s1_enabled(pdev->osdev)) {
|
||||
*mem_info = pdev->ipa_uc_tx_rsc.tx_buf_pool_strg[
|
||||
tx_buffer_count]->mem_info;
|
||||
mem_info++;
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
if (qdf_mem_smmu_s1_enabled(pdev->osdev)) {
|
||||
cds_smmu_map_unmap(true, tx_buffer_count,
|
||||
mem_map_table);
|
||||
qdf_mem_free(mem_map_table);
|
||||
}
|
||||
|
||||
return tx_buffer_count;
|
||||
}
|
||||
@@ -1276,18 +1257,9 @@ static int htt_tx_ipa_uc_wdi_tx_buf_alloc(struct htt_pdev_t *pdev,
|
||||
uint32_t *header_ptr;
|
||||
uint32_t *ring_vaddr;
|
||||
uint16_t idx;
|
||||
qdf_mem_info_t *mem_map_table = NULL, *mem_info = NULL;
|
||||
qdf_shared_mem_t *shared_tx_buffer;
|
||||
|
||||
ring_vaddr = pdev->ipa_uc_tx_rsc.tx_comp_ring->vaddr;
|
||||
if (qdf_mem_smmu_s1_enabled(pdev->osdev)) {
|
||||
mem_map_table = qdf_mem_map_table_alloc(uc_tx_buf_cnt);
|
||||
if (!mem_map_table) {
|
||||
qdf_print("Failed to allocate memory");
|
||||
return 0;
|
||||
}
|
||||
mem_info = mem_map_table;
|
||||
}
|
||||
|
||||
/* Allocate TX buffers as many as possible */
|
||||
for (tx_buffer_count = 0;
|
||||
@@ -1331,11 +1303,6 @@ static int htt_tx_ipa_uc_wdi_tx_buf_alloc(struct htt_pdev_t *pdev,
|
||||
/* Memory barrier to ensure actual value updated */
|
||||
|
||||
ring_vaddr++;
|
||||
if (qdf_mem_smmu_s1_enabled(pdev->osdev)) {
|
||||
*mem_info = pdev->ipa_uc_tx_rsc.tx_buf_pool_strg[
|
||||
tx_buffer_count]->mem_info;
|
||||
mem_info++;
|
||||
}
|
||||
}
|
||||
|
||||
pwr2:
|
||||
@@ -1363,12 +1330,6 @@ pwr2:
|
||||
}
|
||||
}
|
||||
|
||||
if (qdf_mem_smmu_s1_enabled(pdev->osdev)) {
|
||||
cds_smmu_map_unmap(true, tx_buffer_count_pwr2,
|
||||
mem_map_table);
|
||||
qdf_mem_free(mem_map_table);
|
||||
}
|
||||
|
||||
return tx_buffer_count_pwr2;
|
||||
}
|
||||
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user