summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c
diff options
context:
space:
mode:
authorSrikar Srimath Tirumala <srikars@nvidia.com>2018-02-26 18:29:36 -0500
committerSrikar Srimath Tirumala <srikars@nvidia.com>2018-02-26 22:01:16 -0500
commita26de1185a9cc894d37ea826f67ba4f34a646fb3 (patch)
tree46978009c79ebc707502a25fd298bad80f4bdb57 /drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c
parentc0196d50032c218b83cc6e5a655bc82fe75c45f7 (diff)
Revert "gpu: nvgpu: Use gv11b_css_hw_set_handled_snapshots for GV11B"
This reverts commit 2f2e51bbae39009d0305f6aaf01596571a8f5d5c. Bug 2068936 Change-Id: I539cdc12a3bd0d9d7fe0ce7dbe9cb7a274eeaa57 Signed-off-by: Srikar Srimath Tirumala <srikars@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1664647 Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c
index d8ba332b..617ea61d 100644
--- a/drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c
@@ -57,6 +57,15 @@ static inline u32 css_hw_get_pending_snapshots(struct gk20a *g)
57 sizeof(struct gk20a_cs_snapshot_fifo_entry); 57 sizeof(struct gk20a_cs_snapshot_fifo_entry);
58} 58}
59 59
60/* informs hw how many snapshots have been processed (frees up fifo space) */
61static inline void gv11b_css_hw_set_handled_snapshots(struct gk20a *g, u32 done)
62{
63 if (done > 0) {
64 gk20a_writel(g, perf_pmasys_mem_bump_r(),
65 done * sizeof(struct gk20a_cs_snapshot_fifo_entry));
66 }
67}
68
60/* disable streaming to memory */ 69/* disable streaming to memory */
61static void gv11b_css_hw_reset_streaming(struct gk20a *g) 70static void gv11b_css_hw_reset_streaming(struct gk20a *g)
62{ 71{
@@ -77,17 +86,6 @@ static void gv11b_css_hw_reset_streaming(struct gk20a *g)
77 gv11b_css_hw_set_handled_snapshots(g, css_hw_get_pending_snapshots(g)); 86 gv11b_css_hw_set_handled_snapshots(g, css_hw_get_pending_snapshots(g));
78} 87}
79 88
80/* informs hw how many snapshots have been processed (frees up fifo space) */
81void gv11b_css_hw_set_handled_snapshots(struct gk20a *g, u32 done)
82{
83 if (done == 0u) {
84 return;
85 }
86
87 gk20a_writel(g, perf_pmasys_mem_bump_r(),
88 done * sizeof(struct gk20a_cs_snapshot_fifo_entry));
89}
90
91int gv11b_css_hw_enable_snapshot(struct channel_gk20a *ch, 89int gv11b_css_hw_enable_snapshot(struct channel_gk20a *ch,
92 struct gk20a_cs_snapshot_client *cs_client) 90 struct gk20a_cs_snapshot_client *cs_client)
93{ 91{