diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2014-09-30 06:23:35 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:11:51 -0400 |
commit | b564dc87b66ac6411e5aac0065b7e63db9a96a06 (patch) | |
tree | ca17d21ce70ec51bf15ddcf4cde0cee04073cbe5 /drivers/gpu/nvgpu/gk20a/channel_gk20a.h | |
parent | 5ce4438380eeb7cf4cb5f53e80b2b28dd3ee0fe2 (diff) |
gpu: nvgpu: add update callback to gk20a channel
Add support for a callback function with user data pointer to be
scheduled from the end of gk20a_channel_update. The function and its
private data are supplied when opening a new channel.
Change-Id: Ib6b408855ea60d46a6a114a69c01904703019572
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/552014
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
Tested-by: Arto Merilainen <amerilainen@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h index a17e6ea9..aa87464b 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h | |||
@@ -157,6 +157,12 @@ struct channel_gk20a { | |||
157 | 157 | ||
158 | /* event support */ | 158 | /* event support */ |
159 | struct channel_gk20a_poll_events poll_events; | 159 | struct channel_gk20a_poll_events poll_events; |
160 | |||
161 | /* signal channel owner via a callback, if set, in gk20a_channel_update | ||
162 | * via schedule_work */ | ||
163 | void (*update_fn)(struct channel_gk20a *, void *); | ||
164 | void *update_fn_data; | ||
165 | struct work_struct update_fn_work; | ||
160 | }; | 166 | }; |
161 | 167 | ||
162 | static inline bool gk20a_channel_as_bound(struct channel_gk20a *ch) | 168 | static inline bool gk20a_channel_as_bound(struct channel_gk20a *ch) |
@@ -196,6 +202,9 @@ void gk20a_init_channel(struct gpu_ops *gops); | |||
196 | 202 | ||
197 | int gk20a_wait_channel_idle(struct channel_gk20a *ch); | 203 | int gk20a_wait_channel_idle(struct channel_gk20a *ch); |
198 | struct channel_gk20a *gk20a_open_new_channel(struct gk20a *g); | 204 | struct channel_gk20a *gk20a_open_new_channel(struct gk20a *g); |
205 | struct channel_gk20a *gk20a_open_new_channel_with_cb(struct gk20a *g, | ||
206 | void (*update_fn)(struct channel_gk20a *, void *), | ||
207 | void *update_fn_data); | ||
199 | void channel_gk20a_unbind(struct channel_gk20a *ch_gk20a); | 208 | void channel_gk20a_unbind(struct channel_gk20a *ch_gk20a); |
200 | 209 | ||
201 | int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, | 210 | int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, |