summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c
diff options
context:
space:
mode:
authorPeter Daifuku <pdaifuku@nvidia.com>2017-11-07 19:05:58 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-11-08 20:56:47 -0500
commitcddf69c549c5c6fb2c69e4620636e96c698a4201 (patch)
tree7f02b61ece3e032caca55ac1b8f3d2414f4b33f9 /drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c
parent016231c045bfaa9f21feed00b88ac507c4935ebc (diff)
gpu: nvgpu: vgpu: cyclestat characteristics fixes
Fix characteristics for cyclestats: - SUPPORT_TSG and SUPPORT_CYCLE_STATS_SNAPSHOT were assigned the same value - For vgpu, SUPPORT_CYCLE_STATS was set redundantly (but differently) - For vgpu, if the css buffer size is 0, set the support flag to False JIRA ESRM-88 Bug 200296210 Change-Id: Iaf98dafec55f171b5968c2a8248290284bf30922 Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1593939 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c14
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 @@
30void vgpu_gr_gm20b_init_cyclestats(struct gk20a *g) 30void 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