diff options
author | Martin Radev <mradev@nvidia.com> | 2018-03-05 07:12:10 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-03-08 14:04:31 -0500 |
commit | a83c99ecb41c5fa0b287efafa22db0e9770ab3e4 (patch) | |
tree | af5a81edd87c39286ef38526e62e171c86557e21 /drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c | |
parent | da9b549cd15b2f193a1c8b30f96d4106b28ddd30 (diff) |
gpu: nvgpu: Use gv11b_css_hw_set_handled_snapshots for GV11B
The value of NV_PERF_PMASYS_MEM_BUMP is different for Volta
and NVGPU_IOCTL_CHANNEL_CYCLE_STATS_SNAPSHOT_CMD_FLUSH did not
have correct behavior on GV11B due to that.
The patch adds an instance of css_hw_set_handled_snapshots
for Volta to fix that.
Bug 1960846
Bug 2068936
Change-Id: Ic057338d3b1b951a66d070267e69a90f136598b9
Signed-off-by: Martin Radev <mradev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1668568
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c index 86977bb3..bb7c37bd 100644 --- a/drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/css_gr_gv11b.c | |||
@@ -57,15 +57,6 @@ 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 | |||
69 | /* disable streaming to memory */ | 60 | /* disable streaming to memory */ |
70 | static void gv11b_css_hw_reset_streaming(struct gk20a *g) | 61 | static void gv11b_css_hw_reset_streaming(struct gk20a *g) |
71 | { | 62 | { |
@@ -86,6 +77,15 @@ static void gv11b_css_hw_reset_streaming(struct gk20a *g) | |||
86 | gv11b_css_hw_set_handled_snapshots(g, css_hw_get_pending_snapshots(g)); | 77 | gv11b_css_hw_set_handled_snapshots(g, css_hw_get_pending_snapshots(g)); |
87 | } | 78 | } |
88 | 79 | ||
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 > 0) { | ||
84 | gk20a_writel(g, perf_pmasys_mem_bump_r(), | ||
85 | done * sizeof(struct gk20a_cs_snapshot_fifo_entry)); | ||
86 | } | ||
87 | } | ||
88 | |||
89 | int gv11b_css_hw_enable_snapshot(struct channel_gk20a *ch, | 89 | int gv11b_css_hw_enable_snapshot(struct channel_gk20a *ch, |
90 | struct gk20a_cs_snapshot_client *cs_client) | 90 | struct gk20a_cs_snapshot_client *cs_client) |
91 | { | 91 | { |