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

Commit 302e4e0f authored by Jayaprakash's avatar Jayaprakash Committed by Gerrit - the friendly Code Review server
Browse files

disp: msm: sde: add optional sde register writes in event logs



Add changes to configure register writes in the event
log dump. The register writes can be enabled in the dump
through the debug_fs command.

Change-Id: I08154e193f670999746fbb30291a866db85c8c8d
Signed-off-by: default avatarJayaprakash <jmadiset@codeaurora.org>
parent a5efd1f0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ void sde_reg_write(struct sde_hw_blk_reg_map *c,
	if (c->log_mask & sde_hw_util_log_mask)
		SDE_DEBUG_DRIVER("[%s:0x%X] <= 0x%X\n",
				name, c->blk_off + reg_off, val);
	SDE_EVT32_REGWRITE(c->blk_off, reg_off, val);
	writel_relaxed(val, c->base_off + c->blk_off + reg_off);
	SDE_REG_LOG(c->log_mask ? ilog2(c->log_mask)+1 : 0,
			val, c->blk_off + reg_off);
+8 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ enum sde_dbg_evtlog_flag {
	SDE_EVTLOG_IRQ = BIT(1),
	SDE_EVTLOG_VERBOSE = BIT(2),
	SDE_EVTLOG_EXTERNAL = BIT(3),
	SDE_EVTLOG_REGWRITE = BIT(4),
	SDE_EVTLOG_ALWAYS = -1
};

@@ -200,6 +201,13 @@ extern struct sde_dbg_reglog *sde_dbg_base_reglog;
#define SDE_EVT32_EXTERNAL(...) sde_evtlog_log(sde_dbg_base_evtlog, __func__, \
		__LINE__, SDE_EVTLOG_EXTERNAL, ##__VA_ARGS__, \
		SDE_EVTLOG_DATA_LIMITER)
/**
 * SDE_EVT32_REGWRITE - Write a list of 32bit values for register writes logging
 * ... - variable arguments
 */
#define SDE_EVT32_REGWRITE(...) sde_evtlog_log(sde_dbg_base_evtlog, __func__, \
		__LINE__, SDE_EVTLOG_REGWRITE, ##__VA_ARGS__, \
		SDE_EVTLOG_DATA_LIMITER)

/**
 * SDE_DBG_DUMP - trigger dumping of all sde_dbg facilities
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ void dss_reg_w(struct dss_io_data *io, u32 offset, u32 value, u32 debug)
		DEV_DBG("[%08x] => %08x [%08x]\n",
			(u32)(unsigned long)(io->base + offset),
			value, in_val);
		SDE_EVT32_REGWRITE(io->base, offset, value, in_val);
	}
	SDE_REG_LOG(SDE_REG_LOG_RSCC, value, offset);
} /* dss_reg_w */