mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
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: Andhavarapu Karthik <kartkart@codeaurora.org>
This commit is contained in:
parent
7c7bd0d4f9
commit
7ad0876fa7
3 changed files with 19 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue