qcacld-3.0: fix the error in smmu_enable conditional check

Fix the error in smmu_enable condition check for IPA Tx buffer
and also add the flag to mark smmu map/unmap.

Change-Id: I1a9b768c6f17a76b7a857367f342ffbe82e48379
CRs-Fixed: 2793156
This commit is contained in:
Vevek Venkatesan
2020-10-08 23:17:26 +05:30
committed by snandini
부모 3b45a789f7
커밋 d9d707266a
3개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제

파일 보기

@@ -1379,6 +1379,8 @@ int htt_tx_ipa_uc_attach(struct htt_pdev_t *pdev,
pdev->ipa_uc_tx_rsc.alloc_tx_buf_cnt = htt_tx_ipa_uc_wdi_tx_buf_alloc(
pdev, uc_tx_buf_sz, uc_tx_buf_cnt, uc_tx_partition_base);
pdev->ipa_uc_tx_rsc.ipa_smmu_mapped = false;
return 0;

파일 보기

@@ -123,6 +123,7 @@ struct htt_ipa_uc_tx_resource_t {
uint32_t tx_comp_idx_paddr;
qdf_shared_mem_t **tx_buf_pool_strg;
uint32_t alloc_tx_buf_cnt;
bool ipa_smmu_mapped;
};
/**

파일 보기

@@ -295,7 +295,7 @@ static QDF_STATUS __ol_txrx_ipa_tx_buf_smmu_mapping(struct ol_txrx_pdev_t *pdev,
return QDF_STATUS_E_FAILURE;
}
if (qdf_mem_smmu_s1_enabled(htt_pdev->osdev)) {
if (!qdf_mem_smmu_s1_enabled(htt_pdev->osdev)) {
ol_txrx_info("SMMU-S1 mapping is disabled");
return QDF_STATUS_SUCCESS;
}
@@ -320,6 +320,8 @@ static QDF_STATUS __ol_txrx_ipa_tx_buf_smmu_mapping(struct ol_txrx_pdev_t *pdev,
ret = cds_smmu_map_unmap(create, unmap_cnt, mem_map_table);
qdf_assert_always(!ret);
qdf_mem_free(mem_map_table);
htt_pdev->ipa_uc_tx_rsc.ipa_smmu_mapped = create;
ol_txrx_info("smmu_map_unmap:%d of %d Tx buffers", create, unmap_cnt);
return ret;
}