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

Commit 7ad0876f authored by Andhavarapu Karthik's avatar Andhavarapu Karthik
Browse files

disp: msm: sde: add evt log minidump partition



Changes are made to add wrapper function to add a minidump
partition. Also, to add evt log to minidump.

Change-Id: I1204a965bab9db72cb3d381a2817dbe8ef723c66
Signed-off-by: default avatarAndhavarapu Karthik <kartkart@codeaurora.org>
parent 7c7bd0d4
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -300,6 +300,18 @@ struct sde_dbg_evtlog *sde_dbg_base_evtlog;
/* sde_dbg_base_reglog - global pointer to main sde reg log for macro use */
struct sde_dbg_reglog *sde_dbg_base_reglog;

u32 sde_mini_dump_add_region(const char *name, u32 size, void *virt_addr)
{
	struct md_region md_entry;

	strlcpy(md_entry.name, name, sizeof(md_entry.name));
	md_entry.virt_addr = (uintptr_t)virt_addr;
	md_entry.phys_addr = virt_to_phys(virt_addr);
	md_entry.size = size;

	return msm_minidump_add_region(&md_entry);
}

static void _sde_debug_bus_xbar_dump(void __iomem *mem_base,
		struct sde_debug_bus_entry *entry, u32 val, u32 block_id_off,
		u32 test_id_off)
+3 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@
#include <stdarg.h>
#include <linux/debugfs.h>
#include <linux/list.h>
#include <soc/qcom/minidump.h>

/* select an uncommon hex value for the limiter */
#define SDE_EVTLOG_DATA_LIMITER	(0xC0DEBEEF)
@@ -248,6 +249,8 @@ extern struct sde_dbg_reglog *sde_dbg_base_reglog;
#define SDE_DBG_CTRL(...) sde_dbg_ctrl(__func__, ##__VA_ARGS__, \
		SDE_DBG_DUMP_DATA_LIMITER)

u32 sde_mini_dump_add_region(const char *name, u32 size, void *virt_addr);

/**
 * sde_evtlog_init - allocate a new event log object
 * Returns:	evtlog or -ERROR
+4 −0
Original line number Diff line number Diff line
@@ -223,6 +223,10 @@ struct sde_dbg_evtlog *sde_evtlog_init(void)
	if (!evtlog)
		return ERR_PTR(-ENOMEM);

	if (sde_mini_dump_add_region("evt_log", sizeof(*evtlog),
			evtlog) < 0)
		pr_err("minidump add region failed for evtlog\n");

	spin_lock_init(&evtlog->spin_lock);
	evtlog->enable = SDE_EVTLOG_DEFAULT_ENABLE;