diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/enabled.h | 18 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c | 14 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/vgpu.c | 1 |
3 files changed, 21 insertions, 12 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/enabled.h b/drivers/gpu/nvgpu/include/nvgpu/enabled.h index 82f9e6d2..f2b5dbf7 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/enabled.h +++ b/drivers/gpu/nvgpu/include/nvgpu/enabled.h | |||
@@ -78,28 +78,28 @@ struct gk20a; | |||
78 | /* NVGPU_IOCTL_CHANNEL_CYCLE_STATS_SNAPSHOT is available */ | 78 | /* NVGPU_IOCTL_CHANNEL_CYCLE_STATS_SNAPSHOT is available */ |
79 | #define NVGPU_SUPPORT_CYCLE_STATS_SNAPSHOT 33 | 79 | #define NVGPU_SUPPORT_CYCLE_STATS_SNAPSHOT 33 |
80 | /* Both gpu driver and device support TSG */ | 80 | /* Both gpu driver and device support TSG */ |
81 | #define NVGPU_SUPPORT_TSG 33 | 81 | #define NVGPU_SUPPORT_TSG 34 |
82 | /* Fast deterministic submits with no job tracking are supported */ | 82 | /* Fast deterministic submits with no job tracking are supported */ |
83 | #define NVGPU_SUPPORT_DETERMINISTIC_SUBMIT_NO_JOBTRACKING 34 | 83 | #define NVGPU_SUPPORT_DETERMINISTIC_SUBMIT_NO_JOBTRACKING 35 |
84 | /* Deterministic submits are supported even with job tracking */ | 84 | /* Deterministic submits are supported even with job tracking */ |
85 | #define NVGPU_SUPPORT_DETERMINISTIC_SUBMIT_FULL 35 | 85 | #define NVGPU_SUPPORT_DETERMINISTIC_SUBMIT_FULL 36 |
86 | /* NVGPU_SUBMIT_GPFIFO_FLAGS_RESCHEDULE_RUNLIST is available */ | 86 | /* NVGPU_SUBMIT_GPFIFO_FLAGS_RESCHEDULE_RUNLIST is available */ |
87 | #define NVGPU_SUPPORT_RESCHEDULE_RUNLIST 36 | 87 | #define NVGPU_SUPPORT_RESCHEDULE_RUNLIST 37 |
88 | 88 | ||
89 | /* NVGPU_GPU_IOCTL_GET_EVENT_FD is available */ | 89 | /* NVGPU_GPU_IOCTL_GET_EVENT_FD is available */ |
90 | #define NVGPU_SUPPORT_DEVICE_EVENTS 37 | 90 | #define NVGPU_SUPPORT_DEVICE_EVENTS 38 |
91 | /* FECS context switch tracing is available */ | 91 | /* FECS context switch tracing is available */ |
92 | #define NVGPU_SUPPORT_FECS_CTXSW_TRACE 38 | 92 | #define NVGPU_SUPPORT_FECS_CTXSW_TRACE 39 |
93 | 93 | ||
94 | /* NVGPU_GPU_IOCTL_SET_DETERMINISTIC_OPTS is available */ | 94 | /* NVGPU_GPU_IOCTL_SET_DETERMINISTIC_OPTS is available */ |
95 | #define NVGPU_SUPPORT_DETERMINISTIC_OPTS 39 | 95 | #define NVGPU_SUPPORT_DETERMINISTIC_OPTS 40 |
96 | 96 | ||
97 | /* | 97 | /* |
98 | * Security flags | 98 | * Security flags |
99 | */ | 99 | */ |
100 | 100 | ||
101 | #define NVGPU_SEC_SECUREGPCCS 40 | 101 | #define NVGPU_SEC_SECUREGPCCS 41 |
102 | #define NVGPU_SEC_PRIVSECURITY 41 | 102 | #define NVGPU_SEC_PRIVSECURITY 42 |
103 | 103 | ||
104 | /* | 104 | /* |
105 | * PMU flags. | 105 | * PMU flags. |
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 | ||
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c index 2cd99e8c..c753fd97 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/vgpu.c | |||
@@ -371,7 +371,6 @@ int vgpu_init_gpu_characteristics(struct gk20a *g) | |||
371 | g->gpu_characteristics.map_buffer_batch_limit = 0; | 371 | g->gpu_characteristics.map_buffer_batch_limit = 0; |
372 | 372 | ||
373 | /* features vgpu does not support */ | 373 | /* features vgpu does not support */ |
374 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_CYCLE_STATS, false); | ||
375 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_RESCHEDULE_RUNLIST, false); | 374 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_RESCHEDULE_RUNLIST, false); |
376 | 375 | ||
377 | return 0; | 376 | return 0; |