diff options
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/css_vgpu.c')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/css_vgpu.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/css_vgpu.c b/drivers/gpu/nvgpu/vgpu/css_vgpu.c index 0b3c6a25..bcb01fac 100644 --- a/drivers/gpu/nvgpu/vgpu/css_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/css_vgpu.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include "gk20a/platform_gk20a.h" | 29 | #include "gk20a/platform_gk20a.h" |
30 | #include "gk20a/css_gr_gk20a.h" | 30 | #include "gk20a/css_gr_gk20a.h" |
31 | #include "vgpu.h" | 31 | #include "vgpu.h" |
32 | #include "css_vgpu.h" | ||
32 | 33 | ||
33 | static struct tegra_hv_ivm_cookie *css_cookie; | 34 | static struct tegra_hv_ivm_cookie *css_cookie; |
34 | 35 | ||
@@ -93,7 +94,7 @@ fail: | |||
93 | return err; | 94 | return err; |
94 | } | 95 | } |
95 | 96 | ||
96 | static void vgpu_css_release_snapshot_buffer(struct gr_gk20a *gr) | 97 | void vgpu_css_release_snapshot_buffer(struct gr_gk20a *gr) |
97 | { | 98 | { |
98 | struct gk20a_cs_snapshot *data = gr->cs_data; | 99 | struct gk20a_cs_snapshot *data = gr->cs_data; |
99 | 100 | ||
@@ -108,7 +109,7 @@ static void vgpu_css_release_snapshot_buffer(struct gr_gk20a *gr) | |||
108 | gk20a_dbg_info("cyclestats(vgpu): buffer for snapshots released\n"); | 109 | gk20a_dbg_info("cyclestats(vgpu): buffer for snapshots released\n"); |
109 | } | 110 | } |
110 | 111 | ||
111 | static int vgpu_css_flush_snapshots(struct channel_gk20a *ch, | 112 | int vgpu_css_flush_snapshots(struct channel_gk20a *ch, |
112 | u32 *pending, bool *hw_overflow) | 113 | u32 *pending, bool *hw_overflow) |
113 | { | 114 | { |
114 | struct gk20a *g = ch->g; | 115 | struct gk20a *g = ch->g; |
@@ -164,7 +165,7 @@ static int vgpu_css_attach(struct channel_gk20a *ch, | |||
164 | return err; | 165 | return err; |
165 | } | 166 | } |
166 | 167 | ||
167 | static int vgpu_css_detach(struct channel_gk20a *ch, | 168 | int vgpu_css_detach(struct channel_gk20a *ch, |
168 | struct gk20a_cs_snapshot_client *cs_client) | 169 | struct gk20a_cs_snapshot_client *cs_client) |
169 | { | 170 | { |
170 | struct gk20a *g = ch->g; | 171 | struct gk20a *g = ch->g; |
@@ -190,7 +191,7 @@ static int vgpu_css_detach(struct channel_gk20a *ch, | |||
190 | return err; | 191 | return err; |
191 | } | 192 | } |
192 | 193 | ||
193 | static int vgpu_css_enable_snapshot_buffer(struct channel_gk20a *ch, | 194 | int vgpu_css_enable_snapshot_buffer(struct channel_gk20a *ch, |
194 | struct gk20a_cs_snapshot_client *cs_client) | 195 | struct gk20a_cs_snapshot_client *cs_client) |
195 | { | 196 | { |
196 | int ret; | 197 | int ret; |
@@ -202,17 +203,4 @@ static int vgpu_css_enable_snapshot_buffer(struct channel_gk20a *ch, | |||
202 | ret = vgpu_css_init_snapshot_buffer(&ch->g->gr); | 203 | ret = vgpu_css_init_snapshot_buffer(&ch->g->gr); |
203 | return ret; | 204 | return ret; |
204 | } | 205 | } |
205 | |||
206 | void vgpu_init_css_ops(struct gpu_ops *gops) | ||
207 | { | ||
208 | gops->css.enable_snapshot = vgpu_css_enable_snapshot_buffer; | ||
209 | gops->css.disable_snapshot = vgpu_css_release_snapshot_buffer; | ||
210 | gops->css.check_data_available = vgpu_css_flush_snapshots; | ||
211 | gops->css.detach_snapshot = vgpu_css_detach; | ||
212 | |||
213 | /* Following entries are not used when virtual, NULL them */ | ||
214 | gops->css.set_handled_snapshots = NULL; | ||
215 | gops->css.allocate_perfmon_ids = NULL; | ||
216 | gops->css.release_perfmon_ids = NULL; | ||
217 | } | ||
218 | #endif /* CONFIG_GK20A_CYCLE_STATS */ | 206 | #endif /* CONFIG_GK20A_CYCLE_STATS */ |