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

Commit 57330bc4 authored by Junjie Wu's avatar Junjie Wu
Browse files

PM / devfreq: m4m_hwmon: Enable cycle counter when m4m_hwmon starts



Enable cycle counter along with other counters when m4m_hwmon is
started.

Change-Id: Idd86b99c21e21f64bb91db9b1e64597fbfb2306a
Signed-off-by: default avatarJunjie Wu <junjiew@codeaurora.org>
parent 40b49a34
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -283,6 +283,7 @@ static int m4m_start_hwmon(struct cache_hwmon *hw, struct mrps_stats *mrps)

	mon_init(m);
	mon_disable(m);
	mon_disable_cycle_cntr(m);
	for (i = 0; i < m->num_cntr; i++) {
		mon_ov_clear(m, i);
		limit = mrps_to_count(mrps->mrps[i], sample_ms, 0);
@@ -290,6 +291,7 @@ static int m4m_start_hwmon(struct cache_hwmon *hw, struct mrps_stats *mrps)
	}
	mon_clear_cycle_cntr(m);
	mon_enable(m);
	mon_enable_cycle_cntr(m);

	return 0;
}