From 66f24c4c50deea76ecd0b5f366ed9170d86b80c3 Mon Sep 17 00:00:00 2001 From: Yun Park Date: Mon, 20 Mar 2017 10:39:47 -0700 Subject: [PATCH] qcacld-3.0: Initialize maximum IPA clock when IPA clock scaling is disabled When IPA clock scaling is not enabled, initialize IPA clock as maximum. Change-Id: I856279a5b14222e3a7e6d82f78570080cbe0b839 CRs-Fixed: 2022249 --- core/hdd/src/wlan_hdd_ipa.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c index 29e2f9ad304e..9f49fcc61065 100644 --- a/core/hdd/src/wlan_hdd_ipa.c +++ b/core/hdd/src/wlan_hdd_ipa.c @@ -5402,6 +5402,7 @@ static QDF_STATUS __hdd_ipa_init(struct hdd_context *hdd_ctx) int ret, i; struct hdd_ipa_iface_context *iface_context = NULL; struct ol_txrx_pdev_t *pdev = NULL; + struct ipa_rm_perf_profile profile; if (!hdd_ipa_is_enabled(hdd_ctx)) return QDF_STATUS_SUCCESS; @@ -5487,6 +5488,27 @@ static QDF_STATUS __hdd_ipa_init(struct hdd_context *hdd_ctx) goto fail_create_sys_pipe; } + /* When IPA clock scaling is disabled, initialze maximum clock */ + if (!hdd_ipa_is_clk_scaling_enabled(hdd_ctx)) { + profile.max_supported_bandwidth_mbps = 800; + hdd_debug("IPA clock scaling is disabled."); + hdd_debug("Set initial CONS/PROD perf: %d", + profile.max_supported_bandwidth_mbps); + ret = ipa_rm_set_perf_profile(IPA_RM_RESOURCE_WLAN_CONS, + &profile); + if (ret) { + hdd_err("RM CONS set perf profile failed: %d", ret); + goto fail_create_sys_pipe; + } + + ret = ipa_rm_set_perf_profile(IPA_RM_RESOURCE_WLAN_PROD, + &profile); + if (ret) { + hdd_err("RM PROD set perf profile failed: %d", ret); + goto fail_create_sys_pipe; + } + } + EXIT(); return QDF_STATUS_SUCCESS;