summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
index 37ca8244..bb9f314c 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
@@ -26,6 +26,8 @@
26#include <linux/wait.h> 26#include <linux/wait.h>
27#include <linux/mutex.h> 27#include <linux/mutex.h>
28#include <linux/nvhost_ioctl.h> 28#include <linux/nvhost_ioctl.h>
29#include <linux/poll.h>
30
29struct gk20a; 31struct gk20a;
30struct gr_gk20a; 32struct gr_gk20a;
31struct dbg_session_gk20a; 33struct dbg_session_gk20a;
@@ -74,6 +76,12 @@ struct channel_gk20a_job {
74 struct list_head list; 76 struct list_head list;
75}; 77};
76 78
79struct channel_gk20a_poll_events {
80 struct mutex lock;
81 bool events_enabled;
82 int num_pending_events;
83};
84
77/* this is the priv element of struct nvhost_channel */ 85/* this is the priv element of struct nvhost_channel */
78struct channel_gk20a { 86struct channel_gk20a {
79 struct gk20a *g; 87 struct gk20a *g;
@@ -148,6 +156,9 @@ struct channel_gk20a {
148#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION 156#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
149 u64 virt_ctx; 157 u64 virt_ctx;
150#endif 158#endif
159
160 /* event support */
161 struct channel_gk20a_poll_events poll_events;
151}; 162};
152 163
153static inline bool gk20a_channel_as_bound(struct channel_gk20a *ch) 164static inline bool gk20a_channel_as_bound(struct channel_gk20a *ch)
@@ -180,6 +191,8 @@ long gk20a_channel_ioctl(struct file *filp,
180int gk20a_channel_release(struct inode *inode, struct file *filp); 191int gk20a_channel_release(struct inode *inode, struct file *filp);
181struct channel_gk20a *gk20a_get_channel_from_file(int fd); 192struct channel_gk20a *gk20a_get_channel_from_file(int fd);
182void gk20a_channel_update(struct channel_gk20a *c, int nr_completed); 193void gk20a_channel_update(struct channel_gk20a *c, int nr_completed);
194unsigned int gk20a_channel_poll(struct file *filep, poll_table *wait);
195void gk20a_channel_event(struct channel_gk20a *ch);
183 196
184void gk20a_init_channel(struct gpu_ops *gops); 197void gk20a_init_channel(struct gpu_ops *gops);
185 198