summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJayaprakash <jmadiset@codeaurora.org>2020-11-09 17:17:01 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2020-12-15 03:24:31 -0800
commit302e4e0fe6163d3695515519dca2e025c935b5b9 (patch)
treef78eda0195e0cb5779d64a77cec74c4eef98caff
parenta5efd1f0887f7f8e4286462df13123a0199b1c53 (diff)
downloaddisplay-drivers-302e4e0fe6163d3695515519dca2e025c935b5b9.tar.gz
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: Jayaprakash <jmadiset@codeaurora.org>
-rw-r--r--msm/sde/sde_hw_util.c1
-rw-r--r--msm/sde_dbg.h8
-rw-r--r--msm/sde_io_util.c1
3 files changed, 10 insertions, 0 deletions
diff --git a/msm/sde/sde_hw_util.c b/msm/sde/sde_hw_util.c
index 17bc2e76..8b65855d 100644
--- a/msm/sde/sde_hw_util.c
+++ b/msm/sde/sde_hw_util.c
@@ -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);
diff --git a/msm/sde_dbg.h b/msm/sde_dbg.h
index a9618578..0fb320f6 100644
--- a/msm/sde_dbg.h
+++ b/msm/sde_dbg.h
@@ -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
diff --git a/msm/sde_io_util.c b/msm/sde_io_util.c
index 1bb030b5..ad6e89f7 100644
--- a/msm/sde_io_util.c
+++ b/msm/sde_io_util.c
@@ -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 */