summaryrefslogtreecommitdiff
path: root/include/linux/nvhost_ioctl.h
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2011-09-06 13:06:40 +0300
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 01:21:11 -0700
commit068536d9706e00304ad154e552626f1887217cde (patch)
treee9556bdb12eed7dd51a51b875c8ed4e8d2ef16a5 /include/linux/nvhost_ioctl.h
parenta894a718c3a3320dea57b4063e34fb12631e5b5d (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: I2f346918ae15427b826a2ec0c28bee6bc72dc859 Reviewed-on: http://git-master/r/59595 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: Rfb9ae7e88bec3a0c1e8f51f49f3e6f473d853b21
Diffstat (limited to 'include/linux/nvhost_ioctl.h')
-rw-r--r--include/linux/nvhost_ioctl.h11
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 {