summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2015-01-30 08:22:11 -0500
committerDan Willemsen <dwillemsen@nvidia.com>2015-04-04 21:05:59 -0400
commitadb33505b21a8e75267bb74d602becf8db51946b (patch)
tree6b8d674e5c098ec0b85b692c5d50c59c749bc177 /drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c
parent24ddf71b9009291b829e6c30eb1b22e8838f7367 (diff)
gpu: nvgpu: add open channel ioctl to ctrl node
Add the ioctl to open a new gpu channel to also the control node for improved process startup performance, in addition to the current open ioctl in the channel node. The new channel fd creation is refactored to a separate function which is called from both ctrl and channel ioctls. Bug 1604952 Change-Id: I3357ceec694c0e6d7a85807183884324cb725d3a Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/679516 Reviewed-by: Sami Kiminki <skiminki@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c b/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c
index c8fe34a8..d314e078 100644
--- a/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2011-2014, NVIDIA Corporation. All rights reserved. 2 * Copyright (c) 2011-2015, NVIDIA Corporation. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License, 5 * under the terms and conditions of the GNU General Public License,
@@ -421,6 +421,12 @@ long gk20a_ctrl_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg
421 err = gk20a_ctrl_get_tpc_masks(g, 421 err = gk20a_ctrl_get_tpc_masks(g,
422 (struct nvgpu_gpu_get_tpc_masks_args *)buf); 422 (struct nvgpu_gpu_get_tpc_masks_args *)buf);
423 break; 423 break;
424 case NVGPU_GPU_IOCTL_OPEN_CHANNEL:
425 /* this arg type here, but ..gpu_open_channel_args in nvgpu.h
426 * for consistency - they are the same */
427 err = gk20a_channel_open_ioctl(g,
428 (struct nvgpu_channel_open_args *)buf);
429 break;
424 default: 430 default:
425 dev_dbg(dev_from_gk20a(g), "unrecognized gpu ioctl cmd: 0x%x", cmd); 431 dev_dbg(dev_from_gk20a(g), "unrecognized gpu ioctl cmd: 0x%x", cmd);
426 err = -ENOTTY; 432 err = -ENOTTY;