diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2011-09-06 13:06:40 +0300 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-10-26 21:58:24 -0700 |
commit | 78886b008918786040a4a5957f2a0229345b0b84 (patch) | |
tree | 3499c97ba58fbaa205a9430840322e0a0d6dcf07 /include | |
parent | d0024f3ad1e4c6d4885355df3fda02435ccc471d (diff) |
nvhost: Throttle low-priority tasks
Add interface for setting priority of a channel. When the priority is
low, wait for channel to become empty before submitting it.
Bug 864407
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/57237
(cherry picked from commit 75228616ee2c3073e391c529aecb3f82be3fc5a4)
Change-Id: Ife8057586bfc3be02f772034bd2c497b2c59f7aa
Reviewed-on: http://git-master/r/60391
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nvhost_ioctl.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/nvhost_ioctl.h b/include/linux/nvhost_ioctl.h index ef6685ea418f..31ff22f45fb9 100644 --- a/include/linux/nvhost_ioctl.h +++ b/include/linux/nvhost_ioctl.h @@ -34,6 +34,9 @@ #define NVHOST_NO_TIMEOUT (-1) #define NVHOST_NO_CONTEXT 0x0 #define NVHOST_IOCTL_MAGIC 'H' +#define NVHOST_PRIORITY_LOW 50 +#define NVHOST_PRIORITY_MEDIUM 100 +#define NVHOST_PRIORITY_HIGH 150 /* version 0 header (used with write() submit interface) */ struct nvhost_submit_hdr { @@ -100,6 +103,10 @@ struct nvhost_set_timeout_args { __u32 timeout; }; +struct nvhost_set_priority_args { + __u32 priority; +}; + #define NVHOST_IOCTL_CHANNEL_FLUSH \ _IOR(NVHOST_IOCTL_MAGIC, 1, struct nvhost_get_param_args) #define NVHOST_IOCTL_CHANNEL_GET_SYNCPOINTS \ @@ -124,8 +131,10 @@ struct nvhost_set_timeout_args { _IOW(NVHOST_IOCTL_MAGIC, 11, struct nvhost_set_timeout_args) #define NVHOST_IOCTL_CHANNEL_GET_TIMEDOUT \ _IOR(NVHOST_IOCTL_MAGIC, 12, struct nvhost_get_param_args) +#define NVHOST_IOCTL_CHANNEL_SET_PRIORITY \ + _IOW(NVHOST_IOCTL_MAGIC, 13, struct nvhost_set_priority_args) #define NVHOST_IOCTL_CHANNEL_LAST \ - _IOC_NR(NVHOST_IOCTL_CHANNEL_GET_TIMEDOUT) + _IOC_NR(NVHOST_IOCTL_CHANNEL_SET_PRIORITY) #define NVHOST_IOCTL_CHANNEL_MAX_ARG_SIZE sizeof(struct nvhost_submit_hdr_ext) struct nvhost_ctrl_syncpt_read_args { |