From fbbe6aa86def86b128f0ed1de071180785eb3722 Mon Sep 17 00:00:00 2001 From: Surabhi Vishnoi Date: Tue, 14 Jul 2020 12:53:02 +0530 Subject: [PATCH] qcacld-3.0: Add condition to check LLM mode while updating pm_qos Currently, the pm_qos request and cpu mask is updated in bus bandwidth work handler. In low-latency mode also, cpu mask and pm qos request is updated. In cases when low latency mode is enabled and cpu mask is set to all, the bus bandwidth work handler may overwrite the settings done in LLM mode. To resolve this issue, add a condition to check if llm_enabled is set while updating the pm qos request. Change-Id: I42c131c943128702de95f545c99e35978586d417 CRs-Fixed: 2733979 --- core/hdd/src/wlan_hdd_cfg80211.c | 2 ++ core/hdd/src/wlan_hdd_main.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index ddff4abfc1..bcb0bb06b4 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -8011,12 +8011,14 @@ void wlan_hdd_set_wlm_mode(struct hdd_context *hdd_ctx, uint16_t latency_level) QCA_WLAN_VENDOR_ATTR_CONFIG_LATENCY_LEVEL_ULTRALOW) { hdd_ctx->llm_enabled = true; if (!hdd_ctx->hbw_requested) { + cpumask_setall(&hdd_ctx->pm_qos_req.cpus_affine); pm_qos_update_request(&hdd_ctx->pm_qos_req, DISABLE_KRAIT_IDLE_PS_VAL); hdd_ctx->hbw_requested = true; } } else { if (hdd_ctx->hbw_requested) { + cpumask_clear(&hdd_ctx->pm_qos_req.cpus_affine); pm_qos_update_request(&hdd_ctx->pm_qos_req, PM_QOS_DEFAULT_VALUE); hdd_ctx->hbw_requested = false; diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 0981d19f6d..fa2c06fd48 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -9373,7 +9373,8 @@ static void hdd_pld_request_bus_bandwidth(struct hdd_context *hdd_ctx, if (next_vote_level < PLD_BUS_WIDTH_MEDIUM) cpumask_clear(&pm_qos_cpu_mask); - hdd_pm_qos_update_request(hdd_ctx, &pm_qos_cpu_mask); + if (!hdd_ctx->llm_enabled) + hdd_pm_qos_update_request(hdd_ctx, &pm_qos_cpu_mask); } hdd_display_periodic_stats(hdd_ctx, (total_pkts > 0) ? true : false);