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

Commit 8ce571b2 authored by Archana Sriram's avatar Archana Sriram Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Correct the number of voltage levels for a rail



In rpmh_arc_cmds(), len got from cmd_db_get_aux_data_len() is
twice the number of voltage levels. Hence, arc->num which
represents voltage levels for a rail, should be evaluated by
traversing arc->val table upto (len >> 1) instead of
len or MAX_GX_LEVELS.

Change-Id: Ide4899aee255ab410a469ee1fdb720f61e54d962
Signed-off-by: default avatarArchana Sriram <apsrir@codeaurora.org>
parent f92f804a
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -532,9 +532,8 @@ static int rpmh_arc_cmds(struct gmu_device *gmu,
	 * them until we get to the end of the buffer or hit the
	 * zero padding.
	 */
	for (arc->num = 1; arc->num <= len; arc->num++) {
		if (arc->num == len ||
				arc->val[arc->num - 1] >= arc->val[arc->num])
	for (arc->num = 1; arc->num < (len >> 1); arc->num++) {
		if (arc->val[arc->num - 1] >= arc->val[arc->num])
			break;
	}