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

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

Merge changes I8fc124f9,I50abb593,I938b5648 into dev/msm-4.14-display

* changes:
  drm/msm: allow sde_atrace to show up on different process
  drm/msm: enable counter trace
  drm/msm/sde: fix unpaired sde trace
parents 8cafdb1b 80658840
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -186,14 +186,15 @@ static void dsi_bridge_pre_enable(struct drm_bridge *bridge)
		return;
	}

	SDE_ATRACE_BEGIN("dsi_bridge_pre_enable");
	SDE_ATRACE_BEGIN("dsi_display_prepare");
	rc = dsi_display_prepare(c_bridge->display);
	if (rc) {
		pr_err("[%d] DSI display prepare failed, rc=%d\n",
		       c_bridge->id, rc);
		SDE_ATRACE_END("dsi_bridge_pre_enable");
		SDE_ATRACE_END("dsi_display_prepare");
		return;
	}
	SDE_ATRACE_END("dsi_display_prepare");

	SDE_ATRACE_BEGIN("dsi_display_enable");
	rc = dsi_display_enable(c_bridge->display);
@@ -203,7 +204,6 @@ static void dsi_bridge_pre_enable(struct drm_bridge *bridge)
		(void)dsi_display_unprepare(c_bridge->display);
	}
	SDE_ATRACE_END("dsi_display_enable");
	SDE_ATRACE_END("dsi_bridge_pre_enable");

	rc = dsi_display_splash_res_cleanup(c_bridge->display);
	if (rc)
+16 −29
Original line number Diff line number Diff line
/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2019, 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
@@ -145,38 +145,24 @@ TRACE_EVENT(sde_encoder_underrun,
);

TRACE_EVENT(tracing_mark_write,
	TP_PROTO(int pid, const char *name, bool trace_begin),
	TP_ARGS(pid, name, trace_begin),
	TP_PROTO(char trace_type, const struct task_struct *task,
		 const char *name, int value),
	TP_ARGS(trace_type, task, name, value),
	TP_STRUCT__entry(
			__field(char, trace_type)
			__field(int, pid)
			__string(trace_name, name)
			__field(bool, trace_begin)
	),
	TP_fast_assign(
			__entry->pid = pid;
			__assign_str(trace_name, name);
			__entry->trace_begin = trace_begin;
	),
	TP_printk("%s|%d|%s", __entry->trace_begin ? "B" : "E",
		__entry->pid, __get_str(trace_name))
)

TRACE_EVENT(sde_trace_counter,
	TP_PROTO(int pid, char *name, int value),
	TP_ARGS(pid, name, value),
	TP_STRUCT__entry(
			__field(int, pid)
			__string(counter_name, name)
			__field(int, value)
	),
	TP_fast_assign(
			__entry->pid = current->tgid;
			__assign_str(counter_name, name);
			__entry->trace_type = trace_type;
			__entry->pid = task ? task->tgid : 0;
			__assign_str(trace_name, name);
			__entry->value = value;
	),
	TP_printk("%d|%s|%d", __entry->pid,
			__get_str(counter_name), __entry->value)
)
	TP_printk("%c|%d|%s|%d", __entry->trace_type,
		__entry->pid, __get_str(trace_name), __entry->value)
);

#define SDE_TRACE_EVTLOG_SIZE	15
TRACE_EVENT(sde_evtlog,
@@ -319,12 +305,13 @@ TRACE_EVENT(sde_perf_calc_crtc,
			__entry->core_clk_rate)
);

#define SDE_ATRACE_END(name) trace_tracing_mark_write(current->tgid, name, 0)
#define SDE_ATRACE_BEGIN(name) trace_tracing_mark_write(current->tgid, name, 1)
#define sde_atrace trace_tracing_mark_write

#define SDE_ATRACE_END(name) sde_atrace('E', current, name, 0)
#define SDE_ATRACE_BEGIN(name) sde_atrace('B', current, name, 0)
#define SDE_ATRACE_FUNC() SDE_ATRACE_BEGIN(__func__)

#define SDE_ATRACE_INT(name, value) \
	trace_sde_trace_counter(current->tgid, name, value)
#define SDE_ATRACE_INT(name, value) sde_atrace('C', current, name, value)

#endif /* _SDE_TRACE_H_ */

+4 −3
Original line number Diff line number Diff line
@@ -1046,10 +1046,9 @@ int sde_power_resource_enable(struct sde_power_handle *phandle,
				SDE_POWER_EVENT_POST_DISABLE);
	}

end:
	SDE_EVT32_VERBOSE(enable, SDE_EVTLOG_FUNC_EXIT);
	mutex_unlock(&phandle->phandle_lock);
	SDE_ATRACE_END("sde_power_resource_enable");
	mutex_unlock(&phandle->phandle_lock);
	return rc;

clk_err:
@@ -1063,8 +1062,10 @@ int sde_power_resource_enable(struct sde_power_handle *phandle,
		sde_power_data_bus_update(&phandle->data_bus_handle[i], 0);
data_bus_hdl_err:
	phandle->current_usecase_ndx = prev_usecase_ndx;
	mutex_unlock(&phandle->phandle_lock);
	SDE_ATRACE_END("sde_power_resource_enable");

end:
	mutex_unlock(&phandle->phandle_lock);
	return rc;
}

+2 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#include <drm/drm_irq.h>
#include "sde_rsc_priv.h"
#include "sde_dbg.h"
#include "sde_trace.h"

#define SDE_RSC_DRV_DBG_NAME		"sde_rsc_drv"
#define SDE_RSC_WRAPPER_DBG_NAME	"sde_rsc_wrapper"
@@ -987,6 +988,7 @@ int sde_rsc_client_state_update(struct sde_rsc_client *caller_client,
	}

	pr_debug("state switch successfully complete: %d\n", state);
	SDE_ATRACE_INT("rsc_state", state);
	rsc->current_state = state;
	SDE_EVT32(caller_client->id, caller_client->current_state,
			state, rsc->current_state, SDE_EVTLOG_FUNC_EXIT);