mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
qcacld-3.0: Move BW voting to bus suspend/resume
Current during system suspend/resume, we remove/add votes for DDR/SNOC during cfg80211 suspend/resume functions. However, check for pending TX completions and RX softirq processing happens in the bus suspend functions which get called after cfg80211 suspend/resume functions. Hence, there is a small time window where there may be DDR transactions from WLAN SOC with no vote for DDR/SNOC. This can lead to high bus latency as seen by WLAN SOC. To avoid this, move the bus voting for system suspend/resume operation in the bus suspend/resume functions. Change-Id: I9242d438c1fa07cd7a2dec6994f437d07dd9bb68 CRs-Fixed: 2673101
This commit is contained in:
parent
184dd00b74
commit
c8fb78d82d
2 changed files with 12 additions and 4 deletions
|
|
@ -1072,6 +1072,12 @@ static int __wlan_hdd_bus_suspend(struct wow_enable_params wow_params)
|
|||
goto resume_pmo;
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove bus votes at the very end, after making sure there are no
|
||||
* pending bus transactions from WLAN SOC for TX/RX.
|
||||
*/
|
||||
pld_request_bus_bandwidth(hdd_ctx->parent_dev, PLD_BUS_WIDTH_NONE);
|
||||
|
||||
hdd_info("bus suspend succeeded");
|
||||
return 0;
|
||||
|
||||
|
|
@ -1218,6 +1224,12 @@ int wlan_hdd_bus_resume(void)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add bus votes at the beginning, before making sure there are any
|
||||
* bus transactions from WLAN SOC for TX/RX.
|
||||
*/
|
||||
pld_request_bus_bandwidth(hdd_ctx->parent_dev, PLD_BUS_WIDTH_MEDIUM);
|
||||
|
||||
status = hif_bus_resume(hif_ctx);
|
||||
if (status) {
|
||||
hdd_err("Failed hif bus resume");
|
||||
|
|
|
|||
|
|
@ -1717,8 +1717,6 @@ static int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
|
|||
goto exit_with_code;
|
||||
}
|
||||
|
||||
pld_request_bus_bandwidth(hdd_ctx->parent_dev, PLD_BUS_WIDTH_MEDIUM);
|
||||
|
||||
status = hdd_resume_wlan();
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
exit_code = 0;
|
||||
|
|
@ -1973,8 +1971,6 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
|
|||
|
||||
hdd_ctx->is_wiphy_suspended = true;
|
||||
|
||||
pld_request_bus_bandwidth(hdd_ctx->parent_dev, PLD_BUS_WIDTH_NONE);
|
||||
|
||||
hdd_exit();
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue