diff options
author | Richard Zhao <rizhao@nvidia.com> | 2016-06-02 20:17:14 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-06-16 17:06:46 -0400 |
commit | 86225cb04eb040a83400d5ad6619b3c2318a53f8 (patch) | |
tree | 3c61b7b6831ee2f01c9977d77b3ac9bbaf0f3407 /drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c | |
parent | 03164b0f4abeb06d4b5207531b97f11fe4a860dd (diff) |
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 <rizhao@nvidia.com>
Reviewed-on: http://git-master/r/1159587
(cherry picked from commit a01f804684f875c9cffc31eb2c1038f2f29ec66f)
Reviewed-on: http://git-master/r/1158449
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) | |||
656 | struct nvgpu_ctxsw_trace_entry entry = { | 656 | struct nvgpu_ctxsw_trace_entry entry = { |
657 | .vmid = 0, | 657 | .vmid = 0, |
658 | .tag = NVGPU_CTXSW_TAG_ENGINE_RESET, | 658 | .tag = NVGPU_CTXSW_TAG_ENGINE_RESET, |
659 | .timestamp = gk20a_read_ptimer(g), | ||
660 | .context_id = 0, | 659 | .context_id = 0, |
661 | .pid = ch->pid, | 660 | .pid = ch->pid, |
662 | }; | 661 | }; |
@@ -664,6 +663,7 @@ void gk20a_ctxsw_trace_channel_reset(struct gk20a *g, struct channel_gk20a *ch) | |||
664 | if (!g->ctxsw_trace) | 663 | if (!g->ctxsw_trace) |
665 | return; | 664 | return; |
666 | 665 | ||
666 | g->ops.read_ptimer(g, &entry.timestamp); | ||
667 | gk20a_ctxsw_trace_write(g, &entry); | 667 | gk20a_ctxsw_trace_write(g, &entry); |
668 | gk20a_ctxsw_trace_wake_up(g, 0); | 668 | gk20a_ctxsw_trace_wake_up(g, 0); |
669 | #endif | 669 | #endif |
@@ -676,7 +676,6 @@ void gk20a_ctxsw_trace_tsg_reset(struct gk20a *g, struct tsg_gk20a *tsg) | |||
676 | struct nvgpu_ctxsw_trace_entry entry = { | 676 | struct nvgpu_ctxsw_trace_entry entry = { |
677 | .vmid = 0, | 677 | .vmid = 0, |
678 | .tag = NVGPU_CTXSW_TAG_ENGINE_RESET, | 678 | .tag = NVGPU_CTXSW_TAG_ENGINE_RESET, |
679 | .timestamp = gk20a_read_ptimer(g), | ||
680 | .context_id = 0, | 679 | .context_id = 0, |
681 | .pid = 0, | 680 | .pid = 0, |
682 | }; | 681 | }; |
@@ -685,6 +684,7 @@ void gk20a_ctxsw_trace_tsg_reset(struct gk20a *g, struct tsg_gk20a *tsg) | |||
685 | if (!g->ctxsw_trace) | 684 | if (!g->ctxsw_trace) |
686 | return; | 685 | return; |
687 | 686 | ||
687 | g->ops.read_ptimer(g, &entry.timestamp); | ||
688 | mutex_lock(&tsg->ch_list_lock); | 688 | mutex_lock(&tsg->ch_list_lock); |
689 | if (!list_empty(&tsg->ch_list)) { | 689 | if (!list_empty(&tsg->ch_list)) { |
690 | ch = list_entry(tsg->ch_list.next, | 690 | ch = list_entry(tsg->ch_list.next, |