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

Commit bff2d451 authored by Murali Nalajala's avatar Murali Nalajala
Browse files

msm: rpm_stats: show master votes for xo/cxo sleep mode



RPM sleep stats structure has "client_votes" field. It
provides the information of masters who is preventing
the RPM from entering the associated sleep mode(xo/cxo).
Print client_votes info along with xo & vddmin stats.

CRs-fixed: 576283
Change-Id: Ia656add1b8ade7a92502058b8eb6a22516990b7a
Signed-off-by: default avatarHarry Yang <harryy@codeaurora.org>
Signed-off-by: default avatarMurali Nalajala <mnalajal@codeaurora.org>
parent c5f82809
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ struct msm_rpmstats_private_data{
	u32 num_records;
	u32 read_idx;
	u32 len;
	char buf[256];
	char buf[320];
	struct msm_rpmstats_platform_data *platform_data;
};

@@ -64,7 +64,8 @@ struct msm_rpm_stats_data_v2 {
	u64 last_entered_at;
	u64 last_exited_at;
	u64 accumulated;
	u32 reserved[4];
	u32 client_votes;
	u32 reserved[3];
};

static inline u64 get_time_in_sec(u64 counter)
@@ -99,9 +100,11 @@ static inline int msm_rpmstats_append_data_to_buf(char *buf,

	return  snprintf(buf , buflength,
		"RPM Mode:%s\n\t count:%d\ntime in last mode(msec):%llu\n"
		"time since last mode(sec):%llu\n actual last sleep(msec):%llu\n",
		"time since last mode(sec):%llu\nactual last sleep(msec):%llu\n"
		"client votes: %#010x\n\n",
		stat_type, data->count, time_in_last_mode,
		time_since_last_mode, actual_last_sleep);
		time_since_last_mode, actual_last_sleep,
		data->client_votes);
}

static inline u32 msm_rpmstats_read_long_register_v2(void __iomem *regbase,
@@ -147,6 +150,9 @@ static inline int msm_rpmstats_copy_stats_v2(
		data.accumulated = msm_rpmstats_read_quad_register_v2(reg,
				i, offsetof(struct msm_rpm_stats_data_v2,
					accumulated));
		data.client_votes = msm_rpmstats_read_long_register_v2(reg,
				i, offsetof(struct msm_rpm_stats_data_v2,
					client_votes));
		length += msm_rpmstats_append_data_to_buf(prvdata->buf + length,
				&data, sizeof(prvdata->buf) - length);
		prvdata->read_idx++;