From 86225cb04eb040a83400d5ad6619b3c2318a53f8 Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Thu, 2 Jun 2016 17:17:14 -0700 Subject: gpu: nvgpu: add read_ptimer to gops Move all places that read ptimer to use the callback. It's for add vgpu implementation of read ptimer. Bug 1395833 Change-Id: Ia339f2f08d75ca4969a443fffc9a61cff1d3d2b7 Signed-off-by: Richard Zhao Reviewed-on: http://git-master/r/1159587 (cherry picked from commit a01f804684f875c9cffc31eb2c1038f2f29ec66f) Reviewed-on: http://git-master/r/1158449 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c index 3682d904..aadbf7af 100644 --- a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c @@ -656,7 +656,6 @@ void gk20a_ctxsw_trace_channel_reset(struct gk20a *g, struct channel_gk20a *ch) struct nvgpu_ctxsw_trace_entry entry = { .vmid = 0, .tag = NVGPU_CTXSW_TAG_ENGINE_RESET, - .timestamp = gk20a_read_ptimer(g), .context_id = 0, .pid = ch->pid, }; @@ -664,6 +663,7 @@ void gk20a_ctxsw_trace_channel_reset(struct gk20a *g, struct channel_gk20a *ch) if (!g->ctxsw_trace) return; + g->ops.read_ptimer(g, &entry.timestamp); gk20a_ctxsw_trace_write(g, &entry); gk20a_ctxsw_trace_wake_up(g, 0); #endif @@ -676,7 +676,6 @@ void gk20a_ctxsw_trace_tsg_reset(struct gk20a *g, struct tsg_gk20a *tsg) struct nvgpu_ctxsw_trace_entry entry = { .vmid = 0, .tag = NVGPU_CTXSW_TAG_ENGINE_RESET, - .timestamp = gk20a_read_ptimer(g), .context_id = 0, .pid = 0, }; @@ -685,6 +684,7 @@ void gk20a_ctxsw_trace_tsg_reset(struct gk20a *g, struct tsg_gk20a *tsg) if (!g->ctxsw_trace) return; + g->ops.read_ptimer(g, &entry.timestamp); mutex_lock(&tsg->ch_list_lock); if (!list_empty(&tsg->ch_list)) { ch = list_entry(tsg->ch_list.next, -- cgit v1.2.2