diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/sched.h')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/sched.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/sched.h b/drivers/gpu/nvgpu/common/linux/sched.h new file mode 100644 index 00000000..a699bbea --- /dev/null +++ b/drivers/gpu/nvgpu/common/linux/sched.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
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, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
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/>. | ||
15 | */ | ||
16 | #ifndef __NVGPU_SCHED_H | ||
17 | #define __NVGPU_SCHED_H | ||
18 | |||
19 | struct gk20a; | ||
20 | struct gpu_ops; | ||
21 | struct tsg_gk20a; | ||
22 | struct poll_table_struct; | ||
23 | |||
24 | struct gk20a_sched_ctrl { | ||
25 | struct gk20a *g; | ||
26 | |||
27 | struct nvgpu_mutex control_lock; | ||
28 | bool control_locked; | ||
29 | bool sw_ready; | ||
30 | struct nvgpu_mutex status_lock; | ||
31 | struct nvgpu_mutex busy_lock; | ||
32 | |||
33 | u64 status; | ||
34 | |||
35 | size_t bitmap_size; | ||
36 | u64 *active_tsg_bitmap; | ||
37 | u64 *recent_tsg_bitmap; | ||
38 | u64 *ref_tsg_bitmap; | ||
39 | |||
40 | struct nvgpu_cond readout_wq; | ||
41 | }; | ||
42 | |||
43 | int gk20a_sched_dev_release(struct inode *inode, struct file *filp); | ||
44 | int gk20a_sched_dev_open(struct inode *inode, struct file *filp); | ||
45 | long gk20a_sched_dev_ioctl(struct file *, unsigned int, unsigned long); | ||
46 | ssize_t gk20a_sched_dev_read(struct file *, char __user *, size_t, loff_t *); | ||
47 | unsigned int gk20a_sched_dev_poll(struct file *, struct poll_table_struct *); | ||
48 | |||
49 | void gk20a_sched_ctrl_tsg_added(struct gk20a *, struct tsg_gk20a *); | ||
50 | void gk20a_sched_ctrl_tsg_removed(struct gk20a *, struct tsg_gk20a *); | ||
51 | int gk20a_sched_ctrl_init(struct gk20a *); | ||
52 | |||
53 | void gk20a_sched_ctrl_cleanup(struct gk20a *g); | ||
54 | |||
55 | #endif /* __NVGPU_SCHED_H */ | ||