qcacld-3.0: Add threshold for SUPER_HIGH throughput

Added new threshold corresponding to SUPER_HIGH
throughput and maxed out vote level to PLD_BUS_WIDTH_MAX.

Change-Id: Ia6c411b2b1b77ff97d0058c84b2108415e6c0f45
CRs-Fixed: 3170485
This commit is contained in:
Namita Nair
2022-04-18 17:13:22 -07:00
committed by Madan Koyyalamudi
orang tua 73667c0b34
melakukan 9f7f40c963
5 mengubah file dengan 37 tambahan dan 5 penghapusan

Melihat File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. 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
@@ -414,6 +414,29 @@
#endif
#ifdef WLAN_FEATURE_DP_BUS_BANDWIDTH
/*
* <ini>
* gBusBandwidthSuperHighThreshold - bus bandwidth super high threshold
*
* @Min: 0
* @Max: 4294967295UL
* @Default: 22000
*
* This ini specifies the bus bandwidth super high threshold
*
* Usage: Internal
*
* </ini>
*/
#define CFG_DP_BUS_BANDWIDTH_SUPER_HIGH_THRESHOLD \
CFG_INI_UINT( \
"gBusBandwidthSuperHighThreshold", \
0, \
4294967295UL, \
22000, \
CFG_VALUE_OR_DEFAULT, \
"Bus bandwidth super high threshold")
/*
* <ini>
* gBusBandwidthUltraHighThreshold - bus bandwidth ultra high threshold
@@ -422,7 +445,7 @@
* @Max: 4294967295UL
* @Default: 12000
*
* This ini specifies the bus bandwidth very high threshold
* This ini specifies the bus bandwidth ultra high threshold
*
* Usage: Internal
*
@@ -1525,6 +1548,7 @@
#ifdef WLAN_FEATURE_DP_BUS_BANDWIDTH
#define CFG_HDD_DP_BUS_BANDWIDTH \
CFG(CFG_DP_BUS_BANDWIDTH_SUPER_HIGH_THRESHOLD) \
CFG(CFG_DP_BUS_BANDWIDTH_ULTRA_HIGH_THRESHOLD) \
CFG(CFG_DP_BUS_BANDWIDTH_VERY_HIGH_THRESHOLD) \
CFG(CFG_DP_BUS_BANDWIDTH_DBS_THRESHOLD) \

Melihat File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. 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
@@ -155,6 +155,8 @@ struct hdd_config {
uint32_t rx_hp_oos_update_limit;
uint64_t rx_softirq_max_yield_duration_ns;
#ifdef WLAN_FEATURE_DP_BUS_BANDWIDTH
/* bandwidth threshold for super high bandwidth */
uint32_t bus_bw_super_high_threshold;
/* bandwidth threshold for ultra high bandwidth */
uint32_t bus_bw_ultra_high_threshold;
/* bandwidth threshold for very high bandwidth */

Melihat File

@@ -10864,6 +10864,9 @@ static void hdd_pld_request_bus_bandwidth(struct hdd_context *hdd_ctx,
if (hdd_ctx->high_bus_bw_request) {
next_vote_level = PLD_BUS_WIDTH_VERY_HIGH;
tput_level = TPUT_LEVEL_VERY_HIGH;
} else if (total_pkts > hdd_ctx->config->bus_bw_super_high_threshold) {
next_vote_level = PLD_BUS_WIDTH_MAX;
tput_level = TPUT_LEVEL_SUPER_HIGH;
} else if (total_pkts > hdd_ctx->config->bus_bw_ultra_high_threshold) {
next_vote_level = PLD_BUS_WIDTH_ULTRA_HIGH;
tput_level = TPUT_LEVEL_ULTRA_HIGH;
@@ -10891,7 +10894,8 @@ static void hdd_pld_request_bus_bandwidth(struct hdd_context *hdd_ctx,
*/
if (!ucfg_ipa_is_fw_wdi_activated(hdd_ctx->pdev) &&
policy_mgr_is_current_hwmode_dbs(hdd_ctx->psoc) &&
(total_pkts > hdd_ctx->config->bus_bw_dbs_threshold)) {
(total_pkts > hdd_ctx->config->bus_bw_dbs_threshold) &&
(tput_level < TPUT_LEVEL_SUPER_HIGH)) {
next_vote_level = PLD_BUS_WIDTH_ULTRA_HIGH;
tput_level = TPUT_LEVEL_ULTRA_HIGH;
}

Melihat File

@@ -3738,6 +3738,8 @@ static inline void hdd_ini_mscs_params(struct hdd_config *config,
static void hdd_ini_bus_bandwidth(struct hdd_config *config,
struct wlan_objmgr_psoc *psoc)
{
config->bus_bw_super_high_threshold =
cfg_get(psoc, CFG_DP_BUS_BANDWIDTH_SUPER_HIGH_THRESHOLD);
config->bus_bw_ultra_high_threshold =
cfg_get(psoc, CFG_DP_BUS_BANDWIDTH_ULTRA_HIGH_THRESHOLD);
config->bus_bw_very_high_threshold =

Melihat File

@@ -3307,7 +3307,7 @@ const char *pld_bus_width_type_to_str(enum pld_bus_width_type level)
return "LOW_LAT";
default:
if (level > PLD_BUS_WIDTH_ULTRA_HIGH)
return "ULTRA_HIGH+";
return "SUPER_HIGH";
else
return "INVAL";
}