qcacmn: Featurization of DP_TX_DESC_POOL_OPTIMIZE

1. In lowmem profiles the number of tx_desc in 4th pool is reduced to
quarter for memory optimizations.
Added new API dp_get_updated_tx_desc which will return the desc value
from INI based on the flag DP_TX_DESC_POOL_OPTIMIZE.

2. Changes to introduce new INI to get reduced desc value for 4th tx
desc pool.

This helps optimize 0.75M per SOC in lowmem profiles.

Change-Id: I033fcaeb843019fb03bb77e0d05a3ebf60fa806a
CRs-Fixed: 3557483
此提交包含在:
Hariharan Ramanathan
2023-07-20 08:40:43 +05:30
提交者 Rahul Choudhary
父節點 4c2b8d81e4
當前提交 ab649e0622
共有 4 個檔案被更改,包括 51 行新增9 行删除

查看文件

@@ -430,6 +430,36 @@ dp_ppeds_tx_desc_free(struct dp_soc *soc, struct dp_tx_desc_s *tx_desc)
}
#endif
/**
* dp_get_updated_tx_desc() - get updated tx_desc value
* @psoc: psoc object
* @pool_num: Tx desc pool Id
* @current_desc: Current Tx Desc value
*
* In Lowmem profiles the number of Tx desc in 4th pool is reduced to quarter
* for memory optimizations via this flag DP_TX_DESC_POOL_OPTIMIZE
*
* Return: Updated Tx Desc value
*/
#ifdef DP_TX_DESC_POOL_OPTIMIZE
static inline uint32_t dp_get_updated_tx_desc(struct cdp_ctrl_objmgr_psoc *psoc,
uint8_t pool_num,
uint32_t current_desc)
{
if (pool_num == 3)
return cfg_get(psoc, CFG_DP_TX_DESC_POOL_3);
else
return current_desc;
}
#else
static inline uint32_t dp_get_updated_tx_desc(struct cdp_ctrl_objmgr_psoc *psoc,
uint8_t pool_num,
uint32_t current_desc)
{
return current_desc;
}
#endif
#ifdef DP_TX_EXT_DESC_POOL_OPTIMIZE
/**
* dp_tx_ext_desc_pool_override() - Override tx ext desc pool Id