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

Commit 8f2a1261 authored by Narendra Muppalla's avatar Narendra Muppalla Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm/sde: add kernel trace support for crtc commit



This change adds kernel tracing support for crtc commit updates.

Change-Id: I39771230f1bbbdcc95aaf6f92af8892f4ecf5ebb
Signed-off-by: default avatarNarendra Muppalla <NarendraM@codeaurora.org>
parent 6a9b4102
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -482,6 +482,9 @@ void sde_core_perf_crtc_update(struct drm_crtc *crtc,
		update_bus = 1;
		update_clk = 1;
	}
	trace_sde_perf_crtc_update(crtc->base.id, new->bw_ctl,
				new->core_clk_rate, stop_req,
				update_bus, update_clk);

	if (update_bus)
		_sde_core_perf_crtc_update_bus(kms, crtc);
+31 −1
Original line number Diff line number Diff line
/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -180,6 +180,36 @@ TRACE_EVENT(sde_evtlog,
			__entry->tag_id, __entry->value1, __entry->value2)
)

TRACE_EVENT(sde_perf_crtc_update,
	TP_PROTO(u32 crtc, u64 bw_ctl, u32 core_clk_rate,
		bool stop_req, u32 update_bus, u32 update_clk),
	TP_ARGS(crtc, bw_ctl, core_clk_rate,
		stop_req, update_bus, update_clk),
	TP_STRUCT__entry(
			__field(u32, crtc)
			__field(u64, bw_ctl)
			__field(u32, core_clk_rate)
			__field(bool, stop_req)
			__field(u32, update_bus)
			__field(u32, update_clk)
	),
	TP_fast_assign(
			__entry->crtc = crtc;
			__entry->bw_ctl = bw_ctl;
			__entry->core_clk_rate = core_clk_rate;
			__entry->stop_req = stop_req;
			__entry->update_bus = update_bus;
			__entry->update_clk = update_clk;
	),
	 TP_printk("crtc=%d bw=%llu clk_rate=%u stop_req=%d u_bus=%d u_clk=%d",
			 __entry->crtc,
			 __entry->bw_ctl,
			 __entry->core_clk_rate,
			 __entry->stop_req,
			 __entry->update_bus,
			 __entry->update_clk)
);

#define SDE_ATRACE_END(name) trace_sde_mark_write(current->tgid, name, 0)
#define SDE_ATRACE_BEGIN(name) trace_sde_mark_write(current->tgid, name, 1)
#define SDE_ATRACE_FUNC() SDE_ATRACE_BEGIN(__func__)