summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorJordan Crouse <jcrouse@codeaurora.org>2017-06-28 09:55:13 -0600
committerJordan Crouse <jcrouse@codeaurora.org>2017-07-03 13:40:27 -0600
commit48db6e4716499d2d995fce9d396892e8f5313cff (patch)
tree2b53c7528acfe35709c1f871945d7955b6aadb45 /drivers/gpu
parent130cbfae0872f54fdd73c8e549bd2630de3068cf (diff)
drm/msm: Change the profiling structure
Remove the queued time from the profile struct and turn the submit time into a proper timespec (tv_sec + tv_nsec). This should sync up better with what userspace is used to seeing. Change-Id: Ic0dedbad0621fa248e6cffde2d1ee3f9b609e19d Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/msm/adreno/a5xx_gpu.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
index 687ca96d0636..e27ea604ac5b 100644
--- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
@@ -125,7 +125,8 @@ static void a5xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit)
struct msm_ringbuffer *ring = gpu->rb[submit->ring];
unsigned int i, ibs = 0;
unsigned long flags;
- u64 ktime, ticks;
+ u64 ticks;
+ ktime_t time;
a5xx_set_pagetable(gpu, ring, submit->aspace);
@@ -253,18 +254,19 @@ static void a5xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit)
local_irq_save(flags);
ticks = gpu_read64(gpu, REG_A5XX_RBBM_ALWAYSON_COUNTER_LO,
REG_A5XX_RBBM_ALWAYSON_COUNTER_HI);
- ktime = ktime_get_raw_ns();
+ time = ktime_get_raw();
local_irq_restore(flags);
if (submit->profile_buf) {
- /* Write the data into the use-specified profile buffer */
+ struct timespec64 ts = ktime_to_timespec64(time);
- submit->profile_buf->queue_time = ktime;
- submit->profile_buf->submit_time = ktime;
+ /* Write the data into the user-specified profile buffer */
+ submit->profile_buf->time.tv_sec = ts.tv_sec;
+ submit->profile_buf->time.tv_nsec = ts.tv_nsec;
submit->profile_buf->ticks_queued = ticks;
}
- trace_msm_submitted(submit, ticks, ktime);
+ trace_msm_submitted(submit, ticks, ktime_to_ns(time));
a5xx_flush(gpu, ring);