diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c | 20 |
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) */ | ||
61 | static 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 */ |
61 | static void gv11b_css_hw_reset_streaming(struct gk20a *g) | 70 | static 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) */ | ||
81 | void 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 | |||
91 | int gv11b_css_hw_enable_snapshot(struct channel_gk20a *ch, | 89 | int 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 | { |