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

Commit ee7be16d authored by Ram Chandrasekar's avatar Ram Chandrasekar
Browse files

msm: thermal: Fix vdd restriction frequency apply code in KTM



KTM right now applies the vdd restriction to APPS,
only if the rail needs frequency mitigation and if clock
plan is initialized.
Otherwise it assumes the rail to be a voltage rail and
applies the voltage floor.

This logic will fail for APPS rail when the clock
plan is not initialized for a particular cluster.

Fix this logic to skip the vdd restriction apply
for APPS rail if clock plan is not initialized.

Change-Id: I46945b6a73794198bdc9a3a4a8a7bb25967e590f
Signed-off-by: default avatarRam Chandrasekar <rkumbako@codeaurora.org>
parent d81481d4
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1458,9 +1458,12 @@ static int vdd_restriction_apply_all(int en)
	int ret = 0;

	for (i = 0; i < rails_cnt; i++) {
		if (rails[i].freq_req == 1 && freq_table_get)
		if (rails[i].freq_req == 1)
			if (freq_table_get)
				ret = vdd_restriction_apply_freq(&rails[i],
					en ? 0 : -1);
			else
				continue;
		else
			ret = vdd_restriction_apply_voltage(&rails[i],
					en ? 0 : -1);