summaryrefslogtreecommitdiff
path: root/include/video
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@nxp.com>2018-06-25 13:43:05 +0300
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:32:28 +0800
commitcbf778aa33e271baf305e2cb039be1b16a274228 (patch)
tree23beeea23f9adfb7c7500f02f5b837aa3ea1224d /include/video
parent5791818fc076c24f661949c3a0f56276552ee2a6 (diff)
MLK-18680-1: drm: imx: dcss: low latency tracing mechanism
This patch adds a DCSS tracing mechanism that introduces as low latency as possible, so that it does not affect timings. Instead of text, 64 bit tags will be logged, together with the system time in nanoseconds. Based on these, post-processing can be done on any PC to compute deltas, delays, missed buffers, etc. Example usage: echo 1 > /sys/module/imx_dcss_core/parameters/tracing gplay-1.0 movie.mpg echo 0 > /sys/module/imx_dcss_core/parameters/tracing To dump the trace: cat /sys/kernel/debug/imx-dcss/dump_trace_log > trace.txt With the help of a scripting language (awk), the trace can then be post-processed and analyzed on the PC. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Diffstat (limited to 'include/video')
-rw-r--r--include/video/imx-dcss.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/video/imx-dcss.h b/include/video/imx-dcss.h
index 2c6476da2231..2236fe59b56f 100644
--- a/include/video/imx-dcss.h
+++ b/include/video/imx-dcss.h
@@ -30,6 +30,28 @@ int dcss_vblank_irq_get(struct dcss_soc *dcss);
void dcss_vblank_irq_enable(struct dcss_soc *dcss, bool en);
void dcss_vblank_irq_clear(struct dcss_soc *dcss);
enum dcss_color_space dcss_drm_fourcc_to_colorspace(u32 drm_fourcc);
+void dcss_trace_write(u64 tag);
+
+
+#define TAG(x) ((x) << 56)
+
+#define TRACE_COMMON TAG(0LL)
+#define TRACE_DTG TAG(1LL)
+#define TRACE_SS TAG(2LL)
+#define TRACE_DPR TAG(3LL)
+#define TRACE_SCALER TAG(4LL)
+#define TRACE_CTXLD TAG(5LL)
+#define TRACE_DEC400D TAG(6LL)
+#define TRACE_DTRC TAG(7LL)
+#define TRACE_HDR10 TAG(8LL)
+#define TRACE_RDSRC TAG(9LL)
+#define TRACE_WRSCL TAG(10LL)
+
+#define TRACE_DRM_CRTC TAG(11LL)
+#define TRACE_DRM_PLANE TAG(12LL)
+#define TRACE_DRM_KMS TAG(13LL)
+
+#define dcss_trace_module(mod_tag, val) dcss_trace_write((mod_tag) | (val));
/* BLKCTL */
void dcss_blkctl_hdmi_secure_src_en(struct dcss_soc *dcss);