diff options
author | Thomas Fleury <tfleury@nvidia.com> | 2016-05-10 12:05:45 -0400 |
---|---|---|
committer | Vijayakumar Subbu <vsubbu@nvidia.com> | 2016-07-19 02:12:51 -0400 |
commit | c8ffe0fdecfa110a9f9beb1b7e0298d3c3c64cc2 (patch) | |
tree | 08054741c436ab6a783e710a9efa87fc7a0b71df /drivers/gpu/nvgpu/gk20a/sched_gk20a.h | |
parent | 90988af81237d3b56c063b750c32efcbee9ab9cc (diff) |
gpu: nvgpu: add sched control API
Added a dedicated device node to allow an
app manager to control TSG scheduling parameters:
- Get list of TSGs
- Get list of recent TSGs
- Get list of TSGs per pid
- Get TSG current scheduling parameters
- Set TSG timeslice
- Set TSG runlist interleave
Jira VFND-1586
Change-Id: I014c9d1534bce0eaea6c25ad114cf0cff317af79
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: http://git-master/r/1160384
(cherry picked from commit 75ca739517cc7f7f76714b5f6a1a57c39b8cb38e)
Reviewed-on: http://git-master/r/1167021
Reviewed-by: Richard Zhao <rizhao@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
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 */ | ||