Ver código fonte

qcacld-3.0: Do RTPM get in SWLM flush timer

In runtime suspended state, tx packets cause a
runtime resume and if packets are received in
a way that tput pass count exceeds the threshold
but bytes flush and time threshold are not
reached, the flush timer is started. As part of
dp_swlm_tcl_flush_timer, iowrite can happen even
before the runtime resume is completed resulting
in a NOC error.

Fix is to do runtime_get in dp_swlm_tcl_flush_timer
before doing iowrite.

Change-Id: I83b6d8cfc7b29bc1f30fda94007b3663d6a99405
CRs-Fixed: 2783826
Yeshwanth Sriram Guntuka 4 anos atrás
pai
commit
7c30d8e2cd
1 arquivos alterados com 16 adições e 3 exclusões
  1. 16 3
      core/dp/txrx3.0/dp_swlm.c

+ 16 - 3
core/dp/txrx3.0/dp_swlm.c

@@ -159,13 +159,26 @@ static void dp_swlm_tcl_flush_timer(void *arg)
 	hal_ring_handle_t hal_ring_hdl =
 				soc->tcl_data_ring[0].hal_srng;
 
-	if (hal_srng_try_access_start(soc->hal_soc, hal_ring_hdl) < 0) {
-		DP_STATS_INC(swlm, tcl.timer_flush_fail, 1);
-		return;
+	if (hal_srng_try_access_start(soc->hal_soc, hal_ring_hdl) < 0)
+		goto fail;
+
+	if (hif_pm_runtime_get(soc->hif_handle, RTPM_ID_DW_TX_HW_ENQUEUE)) {
+		hal_srng_access_end_reap(soc->hal_soc, hal_ring_hdl);
+		hal_srng_set_event(hal_ring_hdl, HAL_SRNG_FLUSH_EVENT);
+		hal_srng_inc_flush_cnt(hal_ring_hdl);
+		goto fail;
 	}
 
 	DP_STATS_INC(swlm, tcl.timer_flush_success, 1);
 	hal_srng_access_end(soc->hal_soc, hal_ring_hdl);
+	hif_pm_runtime_put(soc->hif_handle, RTPM_ID_DW_TX_HW_ENQUEUE);
+
+	return;
+
+fail:
+	DP_STATS_INC(swlm, tcl.timer_flush_fail, 1);
+
+	return;
 }
 
 /**