summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index 2ba160dd..21a3bec5 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -467,6 +467,11 @@ static int gk20a_channel_cycle_stats(struct channel_gk20a *ch,
467 struct dma_buf *dmabuf; 467 struct dma_buf *dmabuf;
468 void *virtual_address; 468 void *virtual_address;
469 469
470 /* is it allowed to handle calls for current GPU? */
471 if (0 == (ch->g->gpu_characteristics.flags &
472 NVGPU_GPU_FLAGS_SUPPORT_CYCLE_STATS))
473 return -ENOSYS;
474
470 if (args->dmabuf_fd && !ch->cyclestate.cyclestate_buffer_handler) { 475 if (args->dmabuf_fd && !ch->cyclestate.cyclestate_buffer_handler) {
471 476
472 /* set up new cyclestats buffer */ 477 /* set up new cyclestats buffer */
@@ -556,6 +561,11 @@ static int gk20a_channel_cycle_stats_snapshot(struct channel_gk20a *ch,
556{ 561{
557 int ret; 562 int ret;
558 563
564 /* is it allowed to handle calls for current GPU? */
565 if (0 == (ch->g->gpu_characteristics.flags &
566 NVGPU_GPU_FLAGS_SUPPORT_CYCLE_STATS_SNAPSHOT))
567 return -ENOSYS;
568
559 if (!args->dmabuf_fd) 569 if (!args->dmabuf_fd)
560 return -EINVAL; 570 return -EINVAL;
561 571