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>2011-11-30 21:49:33 -0800
commitb04d67acb91dc0f388675f85a28bfa955c25d978 (patch)
tree61c61fd1686a7b50f06960d91d68f348851a0c4c /include/linux/nvhost_ioctl.h
parentb77c1336fc29ac5a7066de146100551258a01746 (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 {