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

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

Merge "msm: kgsl: Add a trace event for the GPU clock"

parents 74279ae8 f62ac94c
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
#include "adreno_iommu.h"
#include "adreno_pm4types.h"
#include "adreno_ringbuffer.h"
#include "adreno_trace.h"

#include "a3xx_reg.h"
#include "adreno_a5xx.h"
@@ -37,6 +38,7 @@
	((_rb)->buffer_desc.gpuaddr + ((_pos) * sizeof(unsigned int)))

static void adreno_get_submit_time(struct adreno_device *adreno_dev,
		struct adreno_ringbuffer *rb,
		struct adreno_submit_time *time)
{
	unsigned long flags;
@@ -66,6 +68,9 @@ static void adreno_get_submit_time(struct adreno_device *adreno_dev,
	} else
		time->ticks = 0;

	/* Trace the GPU time to create a mapping to ftrace time */
	trace_adreno_cmdbatch_sync(rb->drawctxt_active, time->ticks);

	/* Get the kernel clock for time since boot */
	time->ktime = local_clock();

@@ -148,7 +153,7 @@ void adreno_ringbuffer_submit(struct adreno_ringbuffer *rb,
	struct adreno_device *adreno_dev = ADRENO_RB_DEVICE(rb);

	if (time != NULL)
		adreno_get_submit_time(adreno_dev, time);
		adreno_get_submit_time(adreno_dev, rb, time);

	adreno_ringbuffer_wptr(adreno_dev, rb);
}
+23 −0
Original line number Diff line number Diff line
@@ -148,6 +148,29 @@ TRACE_EVENT(adreno_cmdbatch_retired,
	)
);

TRACE_EVENT(adreno_cmdbatch_sync,
	TP_PROTO(struct adreno_context *drawctxt,
		uint64_t ticks),
	TP_ARGS(drawctxt, ticks),
	TP_STRUCT__entry(
		__field(unsigned int, id)
		__field(unsigned int, timestamp)
		__field(uint64_t, ticks)
		__field(int, prio)
	),
	TP_fast_assign(
		__entry->id = drawctxt->base.id;
		__entry->timestamp = drawctxt->timestamp;
		__entry->ticks = ticks;
		__entry->prio = drawctxt->base.priority;
	),
	TP_printk(
		"ctx=%u ctx_prio=%d ts=%u ticks=%lld",
			__entry->id, __entry->prio, __entry->timestamp,
			__entry->ticks
	)
);

TRACE_EVENT(adreno_cmdbatch_fault,
	TP_PROTO(struct kgsl_drawobj_cmd *cmdobj, unsigned int fault),
	TP_ARGS(cmdobj, fault),