diff options
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/gm20b')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c b/drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c index 56b1edbc..fca6525a 100644 --- a/drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c +++ b/drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c | |||
@@ -30,10 +30,20 @@ | |||
30 | void vgpu_gr_gm20b_init_cyclestats(struct gk20a *g) | 30 | void vgpu_gr_gm20b_init_cyclestats(struct gk20a *g) |
31 | { | 31 | { |
32 | #if defined(CONFIG_GK20A_CYCLE_STATS) | 32 | #if defined(CONFIG_GK20A_CYCLE_STATS) |
33 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_CYCLE_STATS, true); | 33 | bool snapshots_supported = true; |
34 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_CYCLE_STATS_SNAPSHOT, true); | 34 | |
35 | /* cyclestats not supported on vgpu */ | ||
36 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_CYCLE_STATS, false); | ||
37 | |||
35 | g->gpu_characteristics.max_css_buffer_size = | 38 | g->gpu_characteristics.max_css_buffer_size = |
36 | vgpu_css_get_buffer_size(g); | 39 | vgpu_css_get_buffer_size(g); |
40 | |||
41 | /* snapshots not supported if the buffer size is 0 */ | ||
42 | if (g->gpu_characteristics.max_css_buffer_size == 0) | ||
43 | snapshots_supported = false; | ||
44 | |||
45 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_CYCLE_STATS_SNAPSHOT, | ||
46 | snapshots_supported); | ||
37 | #endif | 47 | #endif |
38 | } | 48 | } |
39 | 49 | ||