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

Commit c88f3d91 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/sde: add sde bus bw ftraces"

parents 7bdcdc4d ac3d09bf
Loading
Loading
Loading
Loading
+38 −13
Original line number Diff line number Diff line
@@ -170,6 +170,15 @@ static void _sde_core_perf_calc_crtc(struct sde_kms *kms,
	}

	SDE_EVT32(crtc->base.id, perf->core_clk_rate);
	trace_sde_perf_calc_crtc(crtc->base.id,
			perf->bw_ctl[SDE_POWER_HANDLE_DBUS_ID_MNOC],
			perf->bw_ctl[SDE_POWER_HANDLE_DBUS_ID_LLCC],
			perf->bw_ctl[SDE_POWER_HANDLE_DBUS_ID_EBI],
			perf->max_per_pipe_ib[SDE_POWER_HANDLE_DBUS_ID_MNOC],
			perf->max_per_pipe_ib[SDE_POWER_HANDLE_DBUS_ID_LLCC],
			perf->max_per_pipe_ib[SDE_POWER_HANDLE_DBUS_ID_EBI],
			perf->core_clk_rate);

	SDE_DEBUG(
		"crtc=%d clk_rate=%llu core_ib=%llu core_ab=%llu llcc_ib=%llu llcc_ab=%llu mem_ib=%llu mem_ab=%llu\n",
			crtc->base.id, perf->core_clk_rate,
@@ -552,19 +561,32 @@ void sde_core_perf_crtc_update(struct drm_crtc *crtc,
			 * 2. new bandwidth vote - "ab or ib vote" is lower
			 *    than current vote at end of commit or stop.
			 */
			if ((params_changed && ((new->bw_ctl[i] >
						old->bw_ctl[i]) ||
				  (new->max_per_pipe_ib[i] >
						old->max_per_pipe_ib[i]))) ||
			    (!params_changed && ((new->bw_ctl[i] <
						old->bw_ctl[i]) ||
				  (new->max_per_pipe_ib[i] <
						old->max_per_pipe_ib[i])))) {

			if ((params_changed &&
				(new->bw_ctl[i] > old->bw_ctl[i])) ||
			    (!params_changed &&
				(new->bw_ctl[i] < old->bw_ctl[i]))) {

				SDE_DEBUG(
					"crtc=%d p=%d new_bw=%llu,old_bw=%llu\n",
					crtc->base.id, params_changed,
					new->bw_ctl[i], old->bw_ctl[i]);
				old->bw_ctl[i] = new->bw_ctl[i];
				update_bus |= BIT(i);
			}

			if ((params_changed &&
				(new->max_per_pipe_ib[i] >
				 old->max_per_pipe_ib[i])) ||
			    (!params_changed &&
				(new->max_per_pipe_ib[i] <
				old->max_per_pipe_ib[i]))) {

				SDE_DEBUG(
					"crtc=%d p=%d new_ib=%llu,old_ib=%llu\n",
					crtc->base.id, params_changed,
					new->max_per_pipe_ib[i],
					old->max_per_pipe_ib[i]);
				old->max_per_pipe_ib[i] =
						new->max_per_pipe_ib[i];
				update_bus |= BIT(i);
@@ -609,10 +631,13 @@ void sde_core_perf_crtc_update(struct drm_crtc *crtc,
	}
	trace_sde_perf_crtc_update(crtc->base.id,
		new->bw_ctl[SDE_POWER_HANDLE_DBUS_ID_MNOC],
		new->max_per_pipe_ib[SDE_POWER_HANDLE_DBUS_ID_MNOC],
		new->bw_ctl[SDE_POWER_HANDLE_DBUS_ID_LLCC],
		new->max_per_pipe_ib[SDE_POWER_HANDLE_DBUS_ID_LLCC],
		new->bw_ctl[SDE_POWER_HANDLE_DBUS_ID_EBI],
		new->max_per_pipe_ib[SDE_POWER_HANDLE_DBUS_ID_EBI],
		new->core_clk_rate, stop_req,
				update_bus, update_clk);
		update_bus, update_clk, params_changed);

	for (i = 0; i < SDE_POWER_HANDLE_DBUS_ID_MAX; i++) {
		if (update_bus & BIT(i))
+83 −10
Original line number Diff line number Diff line
@@ -93,21 +93,24 @@ TRACE_EVENT(sde_perf_set_ot,
)

TRACE_EVENT(sde_perf_update_bus,
	TP_PROTO(int client, unsigned long long ab_quota,
	TP_PROTO(int client, u32 bus_id, unsigned long long ab_quota,
	unsigned long long ib_quota),
	TP_ARGS(client, ab_quota, ib_quota),
	TP_ARGS(client, bus_id, ab_quota, ib_quota),
	TP_STRUCT__entry(
			__field(int, client)
			__field(u32, bus_id);
			__field(u64, ab_quota)
			__field(u64, ib_quota)
	),
	TP_fast_assign(
			__entry->client = client;
			__entry->bus_id = bus_id;
			__entry->ab_quota = ab_quota;
			__entry->ib_quota = ib_quota;
	),
	TP_printk("Request client:%d ab=%llu ib=%llu",
	TP_printk("Request client:%d bus_id:%d ab=%llu ib=%llu",
			__entry->client,
			__entry->bus_id,
			__entry->ab_quota,
			__entry->ib_quota)
)
@@ -209,41 +212,111 @@ TRACE_EVENT(sde_evtlog,
)

TRACE_EVENT(sde_perf_crtc_update,
	TP_PROTO(u32 crtc, u64 bw_ctl_mnoc, u64 bw_ctl_llcc,
			u64 bw_ctl_ebi, u32 core_clk_rate,
			bool stop_req, u32 update_bus, u32 update_clk),
	TP_ARGS(crtc, bw_ctl_mnoc, bw_ctl_llcc, bw_ctl_ebi, core_clk_rate,
		stop_req, update_bus, update_clk),
	TP_PROTO(u32 crtc,
			u64 bw_ctl_mnoc, u64 per_pipe_ib_mnoc,
			u64 bw_ctl_llcc, u64 per_pipe_ib_llcc,
			u64 bw_ctl_ebi, u64 per_pipe_ib_ebi,
			u32 core_clk_rate, bool stop_req,
			u32 update_bus, u32 update_clk, int params),
	TP_ARGS(crtc,
		bw_ctl_mnoc, per_pipe_ib_mnoc,
		bw_ctl_llcc, per_pipe_ib_llcc,
		bw_ctl_ebi, per_pipe_ib_ebi,
		core_clk_rate, stop_req,
		update_bus, update_clk, params),
	TP_STRUCT__entry(
			__field(u32, crtc)
			__field(u64, bw_ctl_mnoc)
			__field(u64, per_pipe_ib_mnoc)
			__field(u64, bw_ctl_llcc)
			__field(u64, per_pipe_ib_llcc)
			__field(u64, bw_ctl_ebi)
			__field(u64, per_pipe_ib_ebi)
			__field(u32, core_clk_rate)
			__field(bool, stop_req)
			__field(u32, update_bus)
			__field(u32, update_clk)
			__field(int, params)
	),
	TP_fast_assign(
			__entry->crtc = crtc;
			__entry->bw_ctl_mnoc = bw_ctl_mnoc;
			__entry->per_pipe_ib_mnoc = per_pipe_ib_mnoc;
			__entry->bw_ctl_llcc = bw_ctl_llcc;
			__entry->per_pipe_ib_llcc = per_pipe_ib_llcc;
			__entry->bw_ctl_ebi = bw_ctl_ebi;
			__entry->per_pipe_ib_ebi = per_pipe_ib_ebi;
			__entry->core_clk_rate = core_clk_rate;
			__entry->stop_req = stop_req;
			__entry->update_bus = update_bus;
			__entry->update_clk = update_clk;
			__entry->params = params;
	),
	 TP_printk(
		"crtc=%d bw_mnoc=%llu bw_llcc=%llu bw_ebi=%llu clk_rate=%u stop_req=%d u_bus=%d u_clk=%d",
		"crtc=%d mnoc=[%llu %llu] llcc=[%llu %llu] ebi=[%llu %llu] clk=%u stop=%d ubus=%d uclk=%d %d",
			__entry->crtc,
			__entry->bw_ctl_mnoc,
			__entry->per_pipe_ib_mnoc,
			__entry->bw_ctl_llcc,
			__entry->per_pipe_ib_llcc,
			__entry->bw_ctl_ebi,
			__entry->per_pipe_ib_ebi,
			__entry->core_clk_rate,
			__entry->stop_req,
			__entry->update_bus,
			__entry->update_clk)
			__entry->update_clk,
			__entry->params)
);

TRACE_EVENT(sde_perf_calc_crtc,
	TP_PROTO(u32 crtc,
			u64 bw_ctl_mnoc,
			u64 bw_ctl_llcc,
			u64 bw_ctl_ebi,
			u64 ib_mnoc,
			u64 ib_llcc,
			u64 ib_ebi,
			u32 core_clk_rate
			),
	TP_ARGS(crtc,
			bw_ctl_mnoc,
			bw_ctl_llcc,
			bw_ctl_ebi,
			ib_mnoc,
			ib_llcc,
			ib_ebi,
			core_clk_rate),
	TP_STRUCT__entry(
			__field(u32, crtc)
			__field(u64, bw_ctl_mnoc)
			__field(u64, bw_ctl_llcc)
			__field(u64, bw_ctl_ebi)
			__field(u64, ib_mnoc)
			__field(u64, ib_llcc)
			__field(u64, ib_ebi)
			__field(u32, core_clk_rate)

	),
	TP_fast_assign(
			__entry->crtc = crtc;
			__entry->bw_ctl_mnoc = bw_ctl_mnoc;
			__entry->bw_ctl_llcc = bw_ctl_llcc;
			__entry->bw_ctl_ebi = bw_ctl_ebi;
			__entry->ib_mnoc = ib_mnoc;
			__entry->ib_llcc = ib_llcc;
			__entry->ib_ebi = ib_ebi;
			__entry->core_clk_rate = core_clk_rate;
	),
	 TP_printk(
		"crtc=%d mnoc=[%llu, %llu] llcc=[%llu %llu] ebi=[%llu, %llu] clk_rate=%u",
			__entry->crtc,
			__entry->bw_ctl_mnoc,
			__entry->ib_mnoc,
			__entry->bw_ctl_llcc,
			__entry->ib_llcc,
			__entry->bw_ctl_ebi,
			__entry->ib_ebi,
			__entry->core_clk_rate)
);

#define SDE_ATRACE_END(name) trace_tracing_mark_write(current->tgid, name, 0)
+1 −1
Original line number Diff line number Diff line
@@ -470,7 +470,7 @@ int sde_power_data_bus_set_quota(struct sde_power_handle *phandle,

	pclient->ab[bus_client] = ab_quota;
	pclient->ib[bus_client] = ib_quota;
	trace_sde_perf_update_bus(bus_client, ab_quota, ib_quota);
	trace_sde_perf_update_bus(bus_client, bus_id, ab_quota, ib_quota);

	list_for_each_entry(client, &phandle->power_client_clist, list) {
		for (i = 0; i < SDE_POWER_HANDLE_DATA_BUS_CLIENT_MAX; i++) {