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

Commit d85ecd80 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

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

parents b0e92d7e bff2d451
Loading
Loading
Loading
Loading
+11 −5
Original line number Original line Diff line number Diff line
@@ -54,7 +54,7 @@ struct msm_rpmstats_private_data{
	u32 num_records;
	u32 num_records;
	u32 read_idx;
	u32 read_idx;
	u32 len;
	u32 len;
	char buf[256];
	char buf[320];
	struct msm_rpmstats_platform_data *platform_data;
	struct msm_rpmstats_platform_data *platform_data;
};
};


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


static inline u64 get_time_in_sec(u64 counter)
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,
	return  snprintf(buf , buflength,
		"RPM Mode:%s\n\t count:%d\ntime in last mode(msec):%llu\n"
		"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,
		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,
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,
		data.accumulated = msm_rpmstats_read_quad_register_v2(reg,
				i, offsetof(struct msm_rpm_stats_data_v2,
				i, offsetof(struct msm_rpm_stats_data_v2,
					accumulated));
					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,
		length += msm_rpmstats_append_data_to_buf(prvdata->buf + length,
				&data, sizeof(prvdata->buf) - length);
				&data, sizeof(prvdata->buf) - length);
		prvdata->read_idx++;
		prvdata->read_idx++;