summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/common/bus.c5
-rw-r--r--drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c3
-rw-r--r--drivers/gpu/nvgpu/vgpu/vgpu.c5
3 files changed, 2 insertions, 11 deletions
diff --git a/drivers/gpu/nvgpu/common/bus.c b/drivers/gpu/nvgpu/common/bus.c
index c88262a0..a84348cd 100644
--- a/drivers/gpu/nvgpu/common/bus.c
+++ b/drivers/gpu/nvgpu/common/bus.c
@@ -31,11 +31,6 @@ int nvgpu_get_timestamps_zipper(struct gk20a *g,
31 int err = 0; 31 int err = 0;
32 unsigned int i = 0; 32 unsigned int i = 0;
33 33
34 if (source_id != NVGPU_GPU_GET_CPU_TIME_CORRELATION_INFO_SRC_ID_TSC) {
35 nvgpu_err(g, "source_id %u not supported", source_id);
36 return -EINVAL;
37 }
38
39 if (gk20a_busy(g)) { 34 if (gk20a_busy(g)) {
40 nvgpu_err(g, "GPU not powered on\n"); 35 nvgpu_err(g, "GPU not powered on\n");
41 err = -EINVAL; 36 err = -EINVAL;
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c
index 30988462..88c8debf 100644
--- a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c
+++ b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c
@@ -558,7 +558,8 @@ static int nvgpu_gpu_get_cpu_time_correlation_info(
558 int err; 558 int err;
559 u32 i; 559 u32 i;
560 560
561 if (args->count > NVGPU_GPU_GET_CPU_TIME_CORRELATION_INFO_MAX_COUNT) 561 if (args->count > NVGPU_GPU_GET_CPU_TIME_CORRELATION_INFO_MAX_COUNT ||
562 args->source_id != NVGPU_GPU_GET_CPU_TIME_CORRELATION_INFO_SRC_ID_TSC)
562 return -EINVAL; 563 return -EINVAL;
563 564
564 samples = nvgpu_kzalloc(g, args->count * 565 samples = nvgpu_kzalloc(g, args->count *
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c
index 7949ff24..84034b38 100644
--- a/drivers/gpu/nvgpu/vgpu/vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/vgpu.c
@@ -416,11 +416,6 @@ int vgpu_get_timestamps_zipper(struct gk20a *g,
416 return -EINVAL; 416 return -EINVAL;
417 } 417 }
418 418
419 if (source_id != NVGPU_GPU_GET_CPU_TIME_CORRELATION_INFO_SRC_ID_TSC) {
420 nvgpu_err(g, "source_id %u not supported", source_id);
421 return -EINVAL;
422 }
423
424 msg.cmd = TEGRA_VGPU_CMD_GET_TIMESTAMPS_ZIPPER; 419 msg.cmd = TEGRA_VGPU_CMD_GET_TIMESTAMPS_ZIPPER;
425 msg.handle = vgpu_get_handle(g); 420 msg.handle = vgpu_get_handle(g);
426 p->source_id = TEGRA_VGPU_GET_TIMESTAMPS_ZIPPER_SRC_ID_TSC; 421 p->source_id = TEGRA_VGPU_GET_TIMESTAMPS_ZIPPER_SRC_ID_TSC;