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
This commit is contained in:
Yue Ma 2020-03-27 14:57:51 -07:00 • committed by nshrivas
commit c984192e1b
2 changed files with 3 additions and 1 deletions

View file

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

View file

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