diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2016-03-31 03:04:05 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-04-07 11:44:58 -0400 |
commit | ce04ae15bb0952ce994cb6842ac6e6f34e85d064 (patch) | |
tree | 5ae30fb507d470c1f732bcd5649d1a7fe8352101 /drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |
parent | 5f10073540acba056ccf905010dd400d8f32ca31 (diff) |
gpu: nvgpu: APIs to post event id events
Add below channel and TSG APIs to post events
on event_id interface
gk20a_channel_event_id_post_event()
gk20a_tsg_event_id_post_event()
Bug 200089620
Change-Id: I0cfadc9ffdb880b2410f97758fad47905c620db1
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1112267
(cherry picked from commit 9f50d7da4500af4dbf4dabe7916eda6fc220f4fb)
Reviewed-on: http://git-master/r/1120320
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 4ad9d85b..468ee7f1 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -2583,6 +2583,28 @@ static int gk20a_channel_get_event_data_from_id(struct channel_gk20a *ch, | |||
2583 | } | 2583 | } |
2584 | } | 2584 | } |
2585 | 2585 | ||
2586 | void gk20a_channel_event_id_post_event(struct channel_gk20a *ch, | ||
2587 | int event_id) | ||
2588 | { | ||
2589 | struct gk20a_event_id_data *event_id_data; | ||
2590 | int err = 0; | ||
2591 | |||
2592 | err = gk20a_channel_get_event_data_from_id(ch, event_id, | ||
2593 | &event_id_data); | ||
2594 | if (err) | ||
2595 | return; | ||
2596 | |||
2597 | mutex_lock(&event_id_data->lock); | ||
2598 | |||
2599 | gk20a_dbg_info( | ||
2600 | "posting event for event_id=%d on ch=%d\n", | ||
2601 | event_id, ch->hw_chid); | ||
2602 | |||
2603 | wake_up_interruptible_all(&event_id_data->event_id_wq); | ||
2604 | |||
2605 | mutex_unlock(&event_id_data->lock); | ||
2606 | } | ||
2607 | |||
2586 | static int gk20a_channel_event_id_enable(struct channel_gk20a *ch, | 2608 | static int gk20a_channel_event_id_enable(struct channel_gk20a *ch, |
2587 | int event_id, | 2609 | int event_id, |
2588 | int *fd) | 2610 | int *fd) |