Explorar el Código

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
Mohit Khanna hace 5 años
padre
commit
c8fb78d82d
Se han modificado 2 ficheros con 12 adiciones y 4 borrados
  1. 12 0
      core/hdd/src/wlan_hdd_driver_ops.c
  2. 0 4
      core/hdd/src/wlan_hdd_power.c

+ 12 - 0
core/hdd/src/wlan_hdd_driver_ops.c

@@ -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");

+ 0 - 4
core/hdd/src/wlan_hdd_power.c

@@ -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;