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
This commit is contained in:

committed by
Madan Koyyalamudi

orang tua
25652ed9d8
melakukan
81e29163db
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2011-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
|
||||
@@ -2713,4 +2714,41 @@ cdp_get_tx_inqueue(ol_txrx_soc_handle soc)
|
||||
|
||||
return soc->ol_ops->dp_get_tx_inqueue(soc);
|
||||
}
|
||||
|
||||
#ifdef FEATURE_RUNTIME_PM
|
||||
|
||||
/**
|
||||
* cdp_set_rtpm_tput_policy_requirement() - Set RTPM throughput policy
|
||||
* @soc: opaque soc handle
|
||||
* @is_high_tput: flag indicating whether throughput requirement is high or not
|
||||
*
|
||||
* The functions sets RTPM throughput policy requirement. If 'is_high_tput' is
|
||||
* set, the expectation is that runtime_pm APIs will not be invoked per packet.
|
||||
*/
|
||||
|
||||
static inline
|
||||
void cdp_set_rtpm_tput_policy_requirement(ol_txrx_soc_handle soc,
|
||||
bool is_high_tput)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
dp_cdp_debug("Invalid Instance");
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!soc->ops->cmn_drv_ops ||
|
||||
!soc->ops->cmn_drv_ops->set_rtpm_tput_policy)
|
||||
return;
|
||||
|
||||
soc->ops->cmn_drv_ops->set_rtpm_tput_policy(soc, is_high_tput);
|
||||
}
|
||||
#else
|
||||
static inline
|
||||
void cdp_set_rtpm_tput_policy_requirement(ol_txrx_soc_handle soc,
|
||||
bool is_high_tput)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* FEATURE_RUNTIME_PM */
|
||||
|
||||
#endif /* _CDP_TXRX_CMN_H_ */
|
||||
|
Reference in New Issue
Block a user