Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3495747f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: print resource bandwidth in ipa rm"

parents f20cf8da 87f6ed1a
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -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);
+3 −2
Original line number Diff line number Diff line
@@ -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) {