qcacmn: Enable the 4th Tx. completion ring

Enable the 4th Tx. completion ring to save CPU load
Initialization and interrupt handling for 4th completion ring
is done here.

Change-Id: I2db27218a3c3e14d719d012f03454a6a7aa647fe
Цей коміт міститься в:
Neha Bisht
2021-10-28 12:14:26 +05:30
зафіксовано Madan Koyyalamudi
джерело 08f1f6b1af
коміт 5f8681ff1e
13 змінених файлів з 181 додано та 13 видалено

Переглянути файл

@@ -25,6 +25,7 @@
#include "dp_tx_desc.h"
#include "dp_li_rx.h"
#include "dp_peer.h"
#include <wlan_utility.h>
#if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1)
static struct wlan_cfg_tcl_wbm_ring_num_map g_tcl_wbm_map_array[MAX_TCL_DATA_RINGS] = {
@@ -346,22 +347,128 @@ dp_rxdma_ring_sel_cfg_li(struct dp_soc *soc)
}
#endif
#ifdef QCA_DP_ENABLE_TX_COMP_RING4
static inline
void dp_deinit_txcomp_ring4(struct dp_soc *soc)
{
if (soc) {
wlan_minidump_remove(soc->tx_comp_ring[3].base_vaddr_unaligned,
soc->tx_comp_ring[3].alloc_size,
soc->ctrl_psoc, WLAN_MD_DP_SRNG_TX_COMP,
"Transmit_completion_ring");
dp_srng_deinit(soc, &soc->tx_comp_ring[3], WBM2SW_RELEASE, 0);
}
}
static inline
QDF_STATUS dp_init_txcomp_ring4(struct dp_soc *soc)
{
if (soc) {
if (dp_srng_init(soc, &soc->tx_comp_ring[3],
WBM2SW_RELEASE, WBM2SW_TXCOMP_RING4_NUM, 0)) {
dp_err("%pK: dp_srng_init failed for rx_rel_ring",
soc);
return QDF_STATUS_E_FAILURE;
}
wlan_minidump_log(soc->tx_comp_ring[3].base_vaddr_unaligned,
soc->tx_comp_ring[3].alloc_size,
soc->ctrl_psoc, WLAN_MD_DP_SRNG_TX_COMP,
"Transmit_completion_ring");
}
return QDF_STATUS_SUCCESS;
}
static inline
void dp_free_txcomp_ring4(struct dp_soc *soc)
{
if (soc)
dp_srng_free(soc, &soc->tx_comp_ring[3]);
}
static inline
QDF_STATUS dp_alloc_txcomp_ring4(struct dp_soc *soc, uint32_t tx_comp_ring_size,
uint32_t cached)
{
if (soc) {
if (dp_srng_alloc(soc, &soc->tx_comp_ring[3], WBM2SW_RELEASE,
tx_comp_ring_size, cached)) {
dp_err("dp_srng_alloc failed for tx_comp_ring");
return QDF_STATUS_E_FAILURE;
}
}
return QDF_STATUS_SUCCESS;
}
#else
static inline
void dp_deinit_txcomp_ring4(struct dp_soc *soc)
{
}
static inline
QDF_STATUS dp_init_txcomp_ring4(struct dp_soc *soc)
{
return QDF_STATUS_SUCCESS;
}
static inline
void dp_free_txcomp_ring4(struct dp_soc *soc)
{
}
static inline
QDF_STATUS dp_alloc_txcomp_ring4(struct dp_soc *soc, uint32_t tx_comp_ring_size,
uint32_t cached)
{
return QDF_STATUS_SUCCESS;
}
#endif
static void dp_soc_srng_deinit_li(struct dp_soc *soc)
{
/* Tx Complete ring */
dp_deinit_txcomp_ring4(soc);
}
static void dp_soc_srng_free_li(struct dp_soc *soc)
{
dp_free_txcomp_ring4(soc);
}
static QDF_STATUS dp_soc_srng_alloc_li(struct dp_soc *soc)
{
uint32_t tx_comp_ring_size;
uint32_t cached = WLAN_CFG_DST_RING_CACHED_DESC;
struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx;
soc_cfg_ctx = soc->wlan_cfg_ctx;
tx_comp_ring_size = wlan_cfg_tx_comp_ring_size(soc_cfg_ctx);
/* Disable cached desc if NSS offload is enabled */
if (wlan_cfg_get_dp_soc_nss_cfg(soc_cfg_ctx))
cached = 0;
if (dp_alloc_txcomp_ring4(soc, tx_comp_ring_size, cached))
goto fail1;
return QDF_STATUS_SUCCESS;
fail1:
dp_soc_srng_free_li(soc);
return QDF_STATUS_E_NOMEM;
}
static QDF_STATUS dp_soc_srng_init_li(struct dp_soc *soc)
{
/* Tx comp ring 3 */
if (dp_init_txcomp_ring4(soc))
goto fail1;
return QDF_STATUS_SUCCESS;
fail1:
/*
* Cleanup will be done as part of soc_detach, which will
* be called on pdev attach failure
*/
dp_soc_srng_deinit_li(soc);
return QDF_STATUS_E_FAILURE;
}
static void dp_tx_implicit_rbm_set_li(struct dp_soc *soc,