diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2016-07-13 15:45:12 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-07-13 15:45:12 -0700 |
| commit | ccfaef0d786ebf380772dd03ef359bc7ac380667 (patch) | |
| tree | 0db61aaf079fff21b5503b3ab79ee43392b6fcfe /drivers | |
| parent | fe65bd383283230267ffd2cf9d3263558a41c966 (diff) | |
| parent | 6d798684478227ed0369293f0eee6726cdecf6d6 (diff) | |
Merge "msm: ipa: print resource bandwidth in ipa rm"
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/platform/msm/ipa/ipa_rm.c | 20 | ||||
| -rw-r--r-- | drivers/platform/msm/ipa/ipa_rm_resource.c | 5 |
2 files changed, 23 insertions, 2 deletions
diff --git a/drivers/platform/msm/ipa/ipa_rm.c b/drivers/platform/msm/ipa/ipa_rm.c index a9813311f156..bf6352452283 100644 --- a/drivers/platform/msm/ipa/ipa_rm.c +++ b/drivers/platform/msm/ipa/ipa_rm.c @@ -986,6 +986,8 @@ int ipa_rm_stat(char *buf, int size) unsigned long flags; int i, cnt = 0, result = EINVAL; struct ipa_rm_resource *resource = NULL; + u32 sum_bw_prod = 0; + u32 sum_bw_cons = 0; if (!buf || size < 0) return result; @@ -1005,6 +1007,24 @@ int ipa_rm_stat(char *buf, int size) cnt += result; } } + + for (i = 0; i < IPA_RM_RESOURCE_PROD_MAX; i++) + sum_bw_prod += ipa_rm_ctx->prof_vote.bw_prods[i]; + + for (i = 0; i < IPA_RM_RESOURCE_CONS_MAX; i++) + sum_bw_cons += ipa_rm_ctx->prof_vote.bw_cons[i]; + + result = scnprintf(buf + cnt, size - cnt, + "All prod bandwidth: %d, All cons bandwidth: %d\n", + sum_bw_prod, sum_bw_cons); + cnt += result; + + result = scnprintf(buf + cnt, size - cnt, + "Voting: voltage %d, bandwidth %d\n", + ipa_rm_ctx->prof_vote.curr_volt, + ipa_rm_ctx->prof_vote.curr_bw); + cnt += result; + result = cnt; bail: spin_unlock_irqrestore(&ipa_rm_ctx->ipa_rm_lock, flags); diff --git a/drivers/platform/msm/ipa/ipa_rm_resource.c b/drivers/platform/msm/ipa/ipa_rm_resource.c index cc00f8cf7fb6..0a3f66307eee 100644 --- a/drivers/platform/msm/ipa/ipa_rm_resource.c +++ b/drivers/platform/msm/ipa/ipa_rm_resource.c @@ -1133,7 +1133,7 @@ int ipa_rm_resource_producer_print_stat( nbytes = scnprintf(buf + cnt, size - cnt, ipa_rm_resource_str(resource->name)); cnt += nbytes; - nbytes = scnprintf(buf + cnt, size - cnt, "["); + nbytes = scnprintf(buf + cnt, size - cnt, "[%d, ", resource->max_bw); cnt += nbytes; switch (resource->state) { @@ -1170,7 +1170,8 @@ int ipa_rm_resource_producer_print_stat( nbytes = scnprintf(buf + cnt, size - cnt, ipa_rm_resource_str(consumer->name)); cnt += nbytes; - nbytes = scnprintf(buf + cnt, size - cnt, "["); + nbytes = scnprintf(buf + cnt, size - cnt, "[%d, ", + consumer->max_bw); cnt += nbytes; switch (consumer->state) { |
