diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/sched_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/sched_gk20a.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/sched_gk20a.h b/drivers/gpu/nvgpu/gk20a/sched_gk20a.h new file mode 100644 index 00000000..8f533056 --- /dev/null +++ b/drivers/gpu/nvgpu/gk20a/sched_gk20a.h | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2016, 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 | |||
14 | #ifndef __SCHED_GK20A_H | ||
15 | #define __SCHED_GK20A_H | ||
16 | |||
17 | struct gk20a; | ||
18 | struct gpu_ops; | ||
19 | struct tsg_gk20a; | ||
20 | |||
21 | struct gk20a_sched_ctrl { | ||
22 | struct gk20a *g; | ||
23 | |||
24 | struct mutex control_lock; | ||
25 | bool control_locked; | ||
26 | bool sw_ready; | ||
27 | struct mutex status_lock; | ||
28 | struct mutex busy_lock; | ||
29 | |||
30 | u64 status; | ||
31 | |||
32 | size_t bitmap_size; | ||
33 | u64 *active_tsg_bitmap; | ||
34 | u64 *recent_tsg_bitmap; | ||
35 | |||
36 | wait_queue_head_t readout_wq; | ||
37 | }; | ||
38 | |||
39 | int gk20a_sched_dev_release(struct inode *inode, struct file *filp); | ||
40 | int gk20a_sched_dev_open(struct inode *inode, struct file *filp); | ||
41 | long gk20a_sched_dev_ioctl(struct file *, unsigned int, unsigned long); | ||
42 | ssize_t gk20a_sched_dev_read(struct file *, char __user *, size_t, loff_t *); | ||
43 | unsigned int gk20a_sched_dev_poll(struct file *, struct poll_table_struct *); | ||
44 | |||
45 | void gk20a_sched_ctrl_tsg_added(struct gk20a *, struct tsg_gk20a *); | ||
46 | void gk20a_sched_ctrl_tsg_removed(struct gk20a *, struct tsg_gk20a *); | ||
47 | int gk20a_sched_ctrl_init(struct gk20a *); | ||
48 | |||
49 | void gk20a_sched_debugfs_init(struct device *dev); | ||
50 | void gk20a_sched_ctrl_cleanup(struct gk20a *g); | ||
51 | |||
52 | #endif /* __SCHED_GK20A_H */ | ||