Эх сурвалжийг харах

qcacld-3.0: Fix bugs from PM QOS notifier for runtime PM

Destroy PM QOS spinlock after unregistering PM QOS notifier. Use
hif_pm_runtime_put() instead of hif_pm_runtime_put_noidle() so that
it can trigger a runtime PM suspend after usage count reaching 0.

Change-Id: I93949857636de6d9807fa2abceec818a8584c596
CRs-fixed: 2651516
Yue Ma 5 жил өмнө
parent
commit
c984192e1b

+ 2 - 0
core/hdd/src/wlan_hdd_main.c

@@ -3520,6 +3520,8 @@ static void hdd_wlan_unregister_pm_qos_notifier(struct hdd_context *hdd_ctx)
 	}
 
 	qdf_spin_unlock_irqrestore(&hdd_ctx->pm_qos_lock);
+
+	qdf_spinlock_destroy(&hdd_ctx->pm_qos_lock);
 }
 #else
 static int hdd_wlan_register_pm_qos_notifier(struct hdd_context *hdd_ctx)

+ 1 - 1
core/hdd/src/wlan_hdd_power.c

@@ -935,7 +935,7 @@ int wlan_hdd_pm_qos_notify(struct notifier_block *nb, unsigned long curr_val,
 		hdd_ctx->runtime_pm_prevented = true;
 	} else if (hdd_ctx->runtime_pm_prevented &&
 		   curr_val == PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE) {
-		hif_pm_runtime_put_noidle(hif_ctx);
+		hif_pm_runtime_put(hif_ctx);
 		hdd_ctx->runtime_pm_prevented = false;
 	}