qcacld-3.0: Enable host optimization for latency based on WLM mode

Enable host optimization for latency based on WLM mode
and ini configuration.

Change-Id: I67f49493f623287d0e420dab379d2d0116603ced
CRs-Fixed: 2789141
This commit is contained in:
Nirav Shah
2020-09-28 22:37:43 +05:30
committed by snandini
parent c3b707bd8d
commit 032e69194a
11 changed files with 322 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -23,6 +23,29 @@
#ifndef __CFG_MLME_FE_WLM_H
#define __CFG_MLME_FE_WLM_H
/*
* |31 18| 17 | 16 |15 8|7 2| 1 | 0 |
* +------+------+--------+-----------+------+----------+-----------+
* | RSVD | HBB | PM-QOS | RSVD | RSVD | REO Ring | RX Thread |
* +------+------+--------+-----------+------+----------+-----------+
* | common | TX Path | RX Path |
*
* bit 0-7: Rx path related optimization
* bit 0: disable rx_thread for vdev
* bit 1: Reduce REO ring timer threshold to 32us(applicable for all REO ring)
* bit 2-7: Reserved
* bit 8-15: Tx path related optimization
* bit 8-15: Reserved
* bit 16-31: common changes
* bit 16: Request for pm_qos vote
* bit 17: Request for high ddr bus bandwidth
*/
#define WLM_HOST_RX_THREAD_FLAG (1 << 0)
#define WLM_HOST_REO_RING_FLAG (1 << 1)
#define WLM_HOST_PM_QOS_FLAG (1 << 16)
#define WLM_HOST_HBB_FLAG (1 << 17)
/*
* <ini>
* wlm_latency_enable - WLM latency Enable
@@ -69,7 +92,7 @@
*
* @min: 0x0
* @max: 0xffffffff
* @defalut: 0x0
* @default: 0x0
*
* |31 12| 11 | 10 |9 8|7 6|5 4|3 2| 1 | 0 |
* +------+------+------+------+------+------+------+-----+-----+
@@ -112,7 +135,7 @@
*
* @min: 0x0
* @max: 0xffffffff
* @defalut: 0x8
* @default: 0x8
*
* |31 12| 11 | 10 |9 8|7 6|5 4|3 2| 1 | 0 |
* +------+------+------+------+------+------+------+-----+-----+
@@ -155,7 +178,7 @@
*
* @min: 0x0
* @max: 0xffffffff
* @defalut: 0xa
* @default: 0xa
*
* |31 12| 11 | 10 |9 8|7 6|5 4|3 2| 1 | 0 |
* +------+------+------+------+------+------+------+-----+-----+
@@ -198,7 +221,7 @@
*
* @min: 0x0
* @max: 0xffffffff
* @defalut: 0xc83
* @default: 0xc83
*
* |31 12| 11 | 10 |9 8|7 6|5 4|3 2| 1 | 0 |
* +------+------+------+------+------+------+------+-----+-----+
@@ -235,12 +258,170 @@
CFG_VALUE_OR_DEFAULT, \
"WLM flags for ultralow level")
/*
* <ini>
* wlm_latency_host_flags_normal - WLM Host flags setting for normal level
*
* @min: 0x0
* @max: 0xffffffff
* @default: 0x0
*
* This ini decides which host latency features gets enabled
* in normal latency mode.
*
* Usage: External
*
* |31 18| 17 | 16 |15 8|7 2| 1 | 0 |
* +------+------+--------+-----------+------+----------+-----------+
* | RSVD | HBB | PM-QOS | RSVD | RSVD | REO Ring | RX Thread |
* +------+------+--------+-----------+------+----------+-----------+
* | common | TX Path | RX Path |
*
* bit 0-7: Rx path related optimization
* bit 0: disable rx_thread for vdev
* bit 1: Reduce REO ring timer threshold to 32us(applicable for all REO ring)
* bit 2-7: Reserved
* bit 8-15: Tx path related optimization
* bit 8-15: Reserved
* bit 16-31: common changes
* bit 16: Request for pm_qos vote
* bit 17: Request for high ddr bus bandwidth
*
* </ini>
*/
#define CFG_LATENCY_HOST_FLAGS_NORMAL \
CFG_INI_UINT("wlm_latency_host_flags_normal",\
0, \
0xffffffff, \
0, \
CFG_VALUE_OR_DEFAULT, \
"WLM Host flags for normal level")
/*
* <ini>
* wlm_latency_host_flags_moderate - WLM Host flags setting for moderate level
*
* @min: 0x0
* @max: 0xffffffff
* @default: 0x0
*
* This ini decides which host latency features gets enabled
* in moderate latency mode.
*
* Usage: External
*
* |31 18| 17 | 16 |15 8|7 2| 1 | 0 |
* +------+------+--------+-----------+------+----------+-----------+
* | RSVD | HBB | PM-QOS | RSVD | RSVD | REO Ring | RX Thread |
* +------+------+--------+-----------+------+----------+-----------+
* | common | TX Path | RX Path |
*
* bit 0-7: Rx path related optimization
* bit 0: disable rx_thread for vdev
* bit 1: Reduce REO ring timer threshold to 32us(applicable for all REO ring)
* bit 2-7: Reserved
* bit 8-15: Tx path related optimization
* bit 8-15: Reserved
* bit 16-31: common changes
* bit 16: Request for pm_qos vote
* bit 17: Request for high ddr bus bandwidth
*
* </ini>
*/
#define CFG_LATENCY_HOST_FLAGS_MOD \
CFG_INI_UINT("wlm_latency_host_flags_moderate",\
0, \
0xffffffff, \
0, \
CFG_VALUE_OR_DEFAULT, \
"WLM Host flags for moderate level")
/*
* <ini>
* wlm_latency_host_flags_low - WLM Host flags setting for low level
*
* @min: 0x0
* @max: 0xffffffff
* @default: 0x0
*
* This ini decides which host latency features gets enabled
* in low latency mode.
*
* Usage: External
*
* |31 18| 17 | 16 |15 8|7 2| 1 | 0 |
* +------+------+--------+-----------+------+----------+-----------+
* | RSVD | HBB | PM-QOS | RSVD | RSVD | REO Ring | RX Thread |
* +------+------+--------+-----------+------+----------+-----------+
* | common | TX Path | RX Path |
*
* bit 0-7: Rx path related optimization
* bit 0: disable rx_thread for vdev
* bit 1: Reduce REO ring timer threshold to 32us(applicable for all REO ring)
* bit 2-7: Reserved
* bit 8-15: Tx path related optimization
* bit 8-15: Reserved
* bit 16-31: common changes
* bit 16: Request for pm_qos vote
* bit 17: Request for high ddr bus bandwidth
*
* </ini>
*/
#define CFG_LATENCY_HOST_FLAGS_LOW CFG_INI_UINT("wlm_latency_host_flags_low",\
0, \
0xffffffff, \
0, \
CFG_VALUE_OR_DEFAULT, \
"WLM Host flags for low level")
/*
* <ini>
* wlm_latency_host_flags_ultralow - WLM Host flags setting for ultralow level
*
* @min: 0x0
* @max: 0xffffffff
* @default: 0x0
*
* This ini decides which host latency features gets enabled
* in ultra low latency mode.
*
* Usage: External
*
* |31 18| 17 | 16 |15 8|7 2| 1 | 0 |
* +------+------+--------+-----------+------+----------+-----------+
* | RSVD | HBB | PM-QOS | RSVD | RSVD | REO Ring | RX Thread |
* +------+------+--------+-----------+------+----------+-----------+
* | common | TX Path | RX Path |
*
* bit 0-7: Rx path related optimization
* bit 0: disable rx_thread for vdev
* bit 1: Reduce REO ring timer threshold to 32us(applicable for all REO ring)
* bit 2-7: Reserved
* bit 8-15: Tx path related optimization
* bit 8-15: Reserved
* bit 16-31: common changes
* bit 16: Request for pm_qos vote
* bit 17: Request for high ddr bus bandwidth
*
* </ini>
*/
#define CFG_LATENCY_HOST_FLAGS_ULTLOW \
CFG_INI_UINT("wlm_latency_host_flags_ultralow",\
0, \
0xffffffff, \
0, \
CFG_VALUE_OR_DEFAULT, \
"WLM Host flags for ultralow level")
#define CFG_FE_WLM_ALL \
CFG(CFG_LATENCY_ENABLE) \
CFG(CFG_LATENCY_LEVEL) \
CFG(CFG_LATENCY_FLAGS_NORMAL) \
CFG(CFG_LATENCY_FLAGS_MOD) \
CFG(CFG_LATENCY_FLAGS_LOW) \
CFG(CFG_LATENCY_FLAGS_ULTLOW)
CFG(CFG_LATENCY_FLAGS_ULTLOW) \
CFG(CFG_LATENCY_HOST_FLAGS_NORMAL) \
CFG(CFG_LATENCY_HOST_FLAGS_MOD) \
CFG(CFG_LATENCY_HOST_FLAGS_LOW) \
CFG(CFG_LATENCY_HOST_FLAGS_ULTLOW)
#endif /* __CFG_MLME_FE_WLM_H */

View File

@@ -2212,11 +2212,13 @@ struct wlan_mlme_btm {
* @latency_enable: Flag to check if latency is enabled
* @latency_level: WLM latency level
* @latency_flags: WLM latency flags setting
* @latency_host_flags: WLM latency host flags setting
*/
struct wlan_mlme_fe_wlm {
bool latency_enable;
uint8_t latency_level;
uint32_t latency_flags[MLME_NUM_WLM_LATENCY_LEVEL];
uint32_t latency_host_flags[MLME_NUM_WLM_LATENCY_LEVEL];
};
/**

View File

@@ -3617,6 +3617,29 @@ QDF_STATUS ucfg_wlan_mlme_get_rrm_enabled(struct wlan_objmgr_psoc *psoc,
QDF_STATUS
ucfg_mlme_get_latency_enable(struct wlan_objmgr_psoc *psoc, bool *value);
/**
* ucfg_mlme_get_latency_level() - Get the latency level
* @psoc: pointer to psoc object
* @value: Value that needs to be get from the caller
* latency values are defined in WMI_WLM_LATENCY_LEVEL
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_get_latency_level(struct wlan_objmgr_psoc *psoc, uint8_t *value);
/**
* ucfg_mlme_get_latency_host_flags() - Get host flags for latency level
* @psoc: pointer to psoc object
* @latency_level: latency level
* @value: Value that needs to be get from the caller
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_get_latency_host_flags(struct wlan_objmgr_psoc *psoc,
uint8_t latency_level, uint32_t *value);
/**
* ucfg_mlme_get_dtim_selection_diversity() - get dtim selection diversity
* bitmap