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

Commit 2424304b authored by Da Hoon Pyun's avatar Da Hoon Pyun
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: Ic890840295a7a7f854f294320e427e6f3efded6f
Signed-off-by: default avatarDa Hoon Pyun <dpyun@codeaurora.org>
parent 172f292f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1720,8 +1720,9 @@ static uint32_t find_networks_perf_mode(struct npu_host_ctx *host_ctx)
		max_perf_mode = 1;
	} else {
		/* find the max level among all the networks */
		for (i = 0; i < host_ctx->network_num; i++) {
			if ((network->cur_perf_mode != 0) &&
		for (i = 0; i < MAX_LOADED_NETWORK; i++) {
			if ((network->id != 0) &&
				(network->cur_perf_mode != 0) &&
				(network->cur_perf_mode > max_perf_mode))
				max_perf_mode = network->cur_perf_mode;
			network++;