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

Commit 9bfd3339 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: use the wall clock for the user profiling buffer"

parents 728b043e 731efad8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -523,7 +523,7 @@ static int sendcmd(struct adreno_device *adreno_dev,
		return ret;
	}

	secs = time.clock;
	secs = time.ktime;
	nsecs = do_div(secs, 1000000000);

	trace_adreno_cmdbatch_submitted(cmdbatch, (int) dispatcher->inflight,
+7 −7
Original line number Diff line number Diff line
@@ -100,7 +100,11 @@ void adreno_ringbuffer_submit(struct adreno_ringbuffer *rb,
		else
			time->ticks = 0;

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

		/* Get the timeofday for the wall time (for the user) */
		getnstimeofday(&time->utime);

		local_irq_restore(flags);
	}
@@ -1506,12 +1510,8 @@ int adreno_ringbuffer_submitcmd(struct adreno_device *adreno_dev,

	/* Put the timevalues in the profiling buffer */
	if (cmdbatch_user_profiling) {
		uint64_t secs;
		unsigned long nsecs;
		secs = time->clock;
		nsecs = do_div(secs, 1000000000);
		profile_buffer->wall_clock_s = secs;
		profile_buffer->wall_clock_ns = nsecs;
		profile_buffer->wall_clock_s = time->utime.tv_sec;
		profile_buffer->wall_clock_ns = time->utime.tv_nsec;
		profile_buffer->gpu_ticks_queued = time->ticks;
	}

+4 −2
Original line number Diff line number Diff line
@@ -43,11 +43,13 @@ union adreno_ttbr0 {
 * struct adreno_submit_time - utility structure to store the wall clock / GPU
 * ticks at command submit time
 * @ticks: GPU ticks at submit time (from the 19.2Mhz timer)
 * @clock: local clock time (in nanoseconds)
 * @ktime: local clock time (in nanoseconds)
 * @utime: Wall clock time
 */
struct adreno_submit_time {
	uint64_t ticks;
	u64 clock;
	u64 ktime;
	struct timespec utime;
};

/**