diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/tsg_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c index a0232a69..51e6407c 100644 --- a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | |||
@@ -212,6 +212,28 @@ static int gk20a_tsg_get_event_data_from_id(struct tsg_gk20a *tsg, | |||
212 | } | 212 | } |
213 | } | 213 | } |
214 | 214 | ||
215 | void gk20a_tsg_event_id_post_event(struct tsg_gk20a *tsg, | ||
216 | int event_id) | ||
217 | { | ||
218 | struct gk20a_event_id_data *event_id_data; | ||
219 | int err = 0; | ||
220 | |||
221 | err = gk20a_tsg_get_event_data_from_id(tsg, event_id, | ||
222 | &event_id_data); | ||
223 | if (err) | ||
224 | return; | ||
225 | |||
226 | mutex_lock(&event_id_data->lock); | ||
227 | |||
228 | gk20a_dbg_info( | ||
229 | "posting event for event_id=%d on tsg=%d\n", | ||
230 | event_id, tsg->tsgid); | ||
231 | |||
232 | wake_up_interruptible_all(&event_id_data->event_id_wq); | ||
233 | |||
234 | mutex_unlock(&event_id_data->lock); | ||
235 | } | ||
236 | |||
215 | static int gk20a_tsg_event_id_enable(struct tsg_gk20a *tsg, | 237 | static int gk20a_tsg_event_id_enable(struct tsg_gk20a *tsg, |
216 | int event_id, | 238 | int event_id, |
217 | int *fd) | 239 | int *fd) |