qcacmn: Add throughput based RTPM API support
Add support to invoke HIF runtime PM APIs in TX packet path based on throughput level. Essentially at high throughputs, where runtime PM is not expected to provide power gains, invoking the APIs is deterimental to performance. Hence invoke runtime_pm APIs based on throughput level. CRs-Fixed: 3059712 Change-Id: I49d111bffa8a37c68abbdd54911f9ecc22430562
此提交包含在:
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021 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
|
||||
@@ -1418,6 +1419,10 @@ dp_tx_ring_access_end(struct dp_soc *soc, hal_ring_handle_t hal_ring_hdl,
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_RUNTIME_PM
|
||||
static inline int dp_get_rtpm_tput_policy_requirement(struct dp_soc *soc)
|
||||
{
|
||||
return qdf_atomic_read(&soc->rtpm_high_tput_flag);
|
||||
}
|
||||
/**
|
||||
* dp_tx_ring_access_end_wrapper() - Wrapper for ring access end
|
||||
* @soc: Datapath soc handle
|
||||
@@ -1436,6 +1441,14 @@ dp_tx_ring_access_end_wrapper(struct dp_soc *soc,
|
||||
{
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* Avoid runtime get and put APIs under high throughput scenarios.
|
||||
*/
|
||||
if (dp_get_rtpm_tput_policy_requirement(soc)) {
|
||||
dp_tx_ring_access_end(soc, hal_ring_hdl, coalesce);
|
||||
return;
|
||||
}
|
||||
|
||||
ret = hif_pm_runtime_get(soc->hif_handle,
|
||||
RTPM_ID_DW_TX_HW_ENQUEUE, true);
|
||||
switch (ret) {
|
||||
@@ -1474,6 +1487,11 @@ dp_tx_ring_access_end_wrapper(struct dp_soc *soc,
|
||||
dp_runtime_put(soc);
|
||||
}
|
||||
}
|
||||
#else
|
||||
static inline int dp_get_rtpm_tput_policy_requirement(struct dp_soc *soc)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
新增問題並參考
封鎖使用者