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

Commit 991475c1 authored by Maulik Shah's avatar Maulik Shah Committed by Gerrit - the friendly Code Review server
Browse files

soc: qcom: sys_pm_vx: Print LPM exit log and correct timestamp



Print the LPM enter/exit alternative for only timestamp lines and
no DRV vote present.

While at this also print the timestamp shifted by time shift given.

Change-Id: I03c6e45d49a6c7c0af17dc7dad4f42f8806939a6
Signed-off-by: default avatarMaulik Shah <mkshah@codeaurora.org>
parent 71edd842
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2020, The Linux Foundation. All rights reserved. */
/* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. */

#define pr_fmt(fmt) "%s: " fmt, __func__

@@ -113,6 +113,7 @@ static int read_vx_data(struct vx_platform_data *pd, struct vx_log *log)
		data[i].ts = read_word(base, itr);
		if (!data[i].ts)
			break;
		data[i].ts <<= hdr->flags.ts_shift;
		vx = kcalloc(ALIGN(pd->ndrv, 4), sizeof(*vx), GFP_KERNEL);
		if (!vx)
			goto no_mem;
@@ -144,6 +145,7 @@ static void show_vx_data(struct vx_platform_data *pd, struct vx_log *log,
	struct vx_header *hdr = &log->header;
	struct vx_data *data;
	u32 prev;
	bool from_exit = false;

	seq_printf(seq, "Mode           : %s\n"
			"Duration (ms)  : %u\n"
@@ -169,7 +171,13 @@ static void show_vx_data(struct vx_platform_data *pd, struct vx_log *log,
		for (j = 0, prev = data->drv_vx[0]; j < pd->ndrv; j++)
			prev |= data->drv_vx[j];
		if (!prev) {
			seq_printf(seq, "%s Enter", MODE_STR(hdr->mode.type));
			if (!from_exit) {
				seq_printf(seq, "%s Enter\n", MODE_STR(hdr->mode.type));
				from_exit = true;
			} else {
				seq_printf(seq, "%s Exit\n", MODE_STR(hdr->mode.type));
				from_exit = false;
			}
			continue;
		}
		for (j = 0; j < pd->ndrv; j++)