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

Commit d92445f2 authored by Jilai Wang's avatar Jilai Wang
Browse files

msm: npu: Calculate the maximum performance mode properly



This change is to calculate the maximum performance mode properly
by iterating all valid networks.

Change-Id: Ic7071cf69ceb0745c877bbc6f67110f55d384224
Signed-off-by: default avatarJilai Wang <jilaiw@codeaurora.org>
parent 78327398
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -1706,8 +1706,9 @@ static uint32_t find_networks_perf_mode(struct npu_host_ctx *host_ctx)
		max_perf_mode = 1;
		max_perf_mode = 1;
	} else {
	} else {
		/* find the max level among all the networks */
		/* find the max level among all the networks */
		for (i = 0; i < host_ctx->network_num; i++) {
		for (i = 0; i < MAX_LOADED_NETWORK; i++) {
			if ((network->cur_perf_mode != 0) &&
			if ((network->id != 0) &&
				(network->cur_perf_mode != 0) &&
				(network->cur_perf_mode > max_perf_mode))
				(network->cur_perf_mode > max_perf_mode))
				max_perf_mode = network->cur_perf_mode;
				max_perf_mode = network->cur_perf_mode;
			network++;
			network++;