diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-03-23 15:49:58 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-02 11:28:22 -0400 |
commit | 660c9a95104b37c947e0c2f6aeda4c92698b40f4 (patch) | |
tree | e00489bfb3b4c586015a555e3517e6fa8fc6b3a6 /drivers | |
parent | 9adc49f94bd9df94e7d77b08eb2b6e98d7eb5758 (diff) |
gpu: nvgpu: Move ctrl IOCTL creation to Linux module
Move all code related to ctrl devnode to under Linux module.
JIRA NVGPU-16
Change-Id: I834b46ec4172076d7bde459168f1e6bc8c5d6c0c
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1330802
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/Makefile.nvgpu | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c (renamed from drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c) | 9 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_ctrl.h (renamed from drivers/gpu/nvgpu/gk20a/ctrl_gk20a.h) | 8 |
4 files changed, 10 insertions, 11 deletions
diff --git a/drivers/gpu/nvgpu/Makefile.nvgpu b/drivers/gpu/nvgpu/Makefile.nvgpu index d0eb1085..9186bcc7 100644 --- a/drivers/gpu/nvgpu/Makefile.nvgpu +++ b/drivers/gpu/nvgpu/Makefile.nvgpu | |||
@@ -26,6 +26,7 @@ nvgpu-y := \ | |||
26 | common/linux/kmem.o \ | 26 | common/linux/kmem.o \ |
27 | common/linux/timers.o \ | 27 | common/linux/timers.o \ |
28 | common/linux/ioctl.o \ | 28 | common/linux/ioctl.o \ |
29 | common/linux/ioctl_ctrl.o \ | ||
29 | common/mm/nvgpu_allocator.o \ | 30 | common/mm/nvgpu_allocator.o \ |
30 | common/mm/bitmap_allocator.o \ | 31 | common/mm/bitmap_allocator.o \ |
31 | common/mm/buddy_allocator.o \ | 32 | common/mm/buddy_allocator.o \ |
@@ -40,7 +41,6 @@ nvgpu-y := \ | |||
40 | gk20a/pramin_gk20a.o \ | 41 | gk20a/pramin_gk20a.o \ |
41 | gk20a/sched_gk20a.o \ | 42 | gk20a/sched_gk20a.o \ |
42 | gk20a/as_gk20a.o \ | 43 | gk20a/as_gk20a.o \ |
43 | gk20a/ctrl_gk20a.o \ | ||
44 | gk20a/ce2_gk20a.o \ | 44 | gk20a/ce2_gk20a.o \ |
45 | gk20a/fifo_gk20a.o \ | 45 | gk20a/fifo_gk20a.o \ |
46 | gk20a/channel_gk20a.o \ | 46 | gk20a/channel_gk20a.o \ |
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl.c b/drivers/gpu/nvgpu/common/linux/ioctl.c index 083d6102..202ea0ef 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl.c | |||
@@ -24,9 +24,9 @@ | |||
24 | #include "gk20a/dbg_gpu_gk20a.h" | 24 | #include "gk20a/dbg_gpu_gk20a.h" |
25 | #include "gk20a/ctxsw_trace_gk20a.h" | 25 | #include "gk20a/ctxsw_trace_gk20a.h" |
26 | #include "gk20a/channel_gk20a.h" | 26 | #include "gk20a/channel_gk20a.h" |
27 | #include "gk20a/ctrl_gk20a.h" | ||
28 | #include "gk20a/as_gk20a.h" | 27 | #include "gk20a/as_gk20a.h" |
29 | #include "gk20a/tsg_gk20a.h" | 28 | #include "gk20a/tsg_gk20a.h" |
29 | #include "ioctl_ctrl.h" | ||
30 | 30 | ||
31 | #define GK20A_NUM_CDEVS 7 | 31 | #define GK20A_NUM_CDEVS 7 |
32 | 32 | ||
diff --git a/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c index fba39a50..fa05deb9 100644 --- a/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c | |||
@@ -14,19 +14,18 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/highmem.h> | 17 | #include <linux/uaccess.h> |
18 | #include <linux/cdev.h> | 18 | #include <linux/cdev.h> |
19 | #include <linux/file.h> | 19 | #include <linux/file.h> |
20 | #include <linux/anon_inodes.h> | 20 | #include <linux/anon_inodes.h> |
21 | #include <linux/nvgpu.h> | ||
22 | #include <linux/bitops.h> | 21 | #include <linux/bitops.h> |
23 | #include <uapi/linux/nvgpu.h> | 22 | #include <uapi/linux/nvgpu.h> |
24 | #include <linux/delay.h> | ||
25 | 23 | ||
26 | #include <nvgpu/kmem.h> | 24 | #include <nvgpu/kmem.h> |
27 | 25 | ||
28 | #include "gk20a.h" | 26 | #include "ioctl_ctrl.h" |
29 | #include "fence_gk20a.h" | 27 | #include "gk20a/gk20a.h" |
28 | #include "gk20a/fence_gk20a.h" | ||
30 | 29 | ||
31 | #define HZ_TO_MHZ(a) ((a > 0xF414F9CD7) ? 0xffff : (a >> 32) ? \ | 30 | #define HZ_TO_MHZ(a) ((a > 0xF414F9CD7) ? 0xffff : (a >> 32) ? \ |
32 | (u32) ((a * 0x10C8ULL) >> 32) : (u16) ((u32) a/MHZ)) | 31 | (u32) ((a * 0x10C8ULL) >> 32) : (u16) ((u32) a/MHZ)) |
diff --git a/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.h b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.h index 26ca4e20..8b4a5e59 100644 --- a/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.h +++ b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2011-2012, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2011-2017, 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, |
@@ -13,11 +13,11 @@ | |||
13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU General Public License |
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | #ifndef CTRL_GK20A_H | 16 | #ifndef __NVGPU_IOCTL_CTRL_H__ |
17 | #define CTRL_GK20A_H | 17 | #define __NVGPU_IOCTL_CTRL_H__ |
18 | 18 | ||
19 | int gk20a_ctrl_dev_open(struct inode *inode, struct file *filp); | 19 | int gk20a_ctrl_dev_open(struct inode *inode, struct file *filp); |
20 | int gk20a_ctrl_dev_release(struct inode *inode, struct file *filp); | 20 | int gk20a_ctrl_dev_release(struct inode *inode, struct file *filp); |
21 | long gk20a_ctrl_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); | 21 | long gk20a_ctrl_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); |
22 | 22 | ||
23 | #endif /* CTRL_GK20A_H */ | 23 | #endif |