diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.h | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/gr_gm20b.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c | 5 |
4 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c index cff889fb..3c6b1b26 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c | |||
@@ -230,6 +230,8 @@ gk20a_ctrl_ioctl_gpu_characteristics( | |||
230 | pgpu->sm_arch_spa_version = g->params.sm_arch_spa_version; | 230 | pgpu->sm_arch_spa_version = g->params.sm_arch_spa_version; |
231 | pgpu->sm_arch_warp_count = g->params.sm_arch_warp_count; | 231 | pgpu->sm_arch_warp_count = g->params.sm_arch_warp_count; |
232 | 232 | ||
233 | pgpu->max_css_buffer_size = g->gr.max_css_buffer_size; | ||
234 | |||
233 | if (request->gpu_characteristics_buf_size > 0) { | 235 | if (request->gpu_characteristics_buf_size > 0) { |
234 | size_t write_size = sizeof(*pgpu); | 236 | size_t write_size = sizeof(*pgpu); |
235 | 237 | ||
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h index d411a2fa..2b3b74bc 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h | |||
@@ -417,6 +417,7 @@ struct gr_gk20a { | |||
417 | struct nvgpu_mutex cs_lock; | 417 | struct nvgpu_mutex cs_lock; |
418 | struct gk20a_cs_snapshot *cs_data; | 418 | struct gk20a_cs_snapshot *cs_data; |
419 | #endif | 419 | #endif |
420 | u32 max_css_buffer_size; | ||
420 | }; | 421 | }; |
421 | 422 | ||
422 | void gk20a_fecs_dump_falcon_stats(struct gk20a *g); | 423 | void gk20a_fecs_dump_falcon_stats(struct gk20a *g); |
diff --git a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c index 61f608f4..4c49f734 100644 --- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c | |||
@@ -1126,7 +1126,7 @@ void gr_gm20b_init_cyclestats(struct gk20a *g) | |||
1126 | #if defined(CONFIG_GK20A_CYCLE_STATS) | 1126 | #if defined(CONFIG_GK20A_CYCLE_STATS) |
1127 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_CYCLE_STATS, true); | 1127 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_CYCLE_STATS, true); |
1128 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_CYCLE_STATS_SNAPSHOT, true); | 1128 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_CYCLE_STATS_SNAPSHOT, true); |
1129 | g->gpu_characteristics.max_css_buffer_size = 0xffffffff; | 1129 | g->gr.max_css_buffer_size = 0xffffffff; |
1130 | #else | 1130 | #else |
1131 | (void)g; | 1131 | (void)g; |
1132 | #endif | 1132 | #endif |
diff --git a/drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c b/drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c index fca6525a..0e440241 100644 --- a/drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c +++ b/drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c | |||
@@ -35,11 +35,10 @@ void vgpu_gr_gm20b_init_cyclestats(struct gk20a *g) | |||
35 | /* cyclestats not supported on vgpu */ | 35 | /* cyclestats not supported on vgpu */ |
36 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_CYCLE_STATS, false); | 36 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_CYCLE_STATS, false); |
37 | 37 | ||
38 | g->gpu_characteristics.max_css_buffer_size = | 38 | g->gr.max_css_buffer_size = vgpu_css_get_buffer_size(g); |
39 | vgpu_css_get_buffer_size(g); | ||
40 | 39 | ||
41 | /* snapshots not supported if the buffer size is 0 */ | 40 | /* snapshots not supported if the buffer size is 0 */ |
42 | if (g->gpu_characteristics.max_css_buffer_size == 0) | 41 | if (g->gr.max_css_buffer_size == 0) |
43 | snapshots_supported = false; | 42 | snapshots_supported = false; |
44 | 43 | ||
45 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_CYCLE_STATS_SNAPSHOT, | 44 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_CYCLE_STATS_SNAPSHOT, |