diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2016-03-17 10:48:06 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-04-07 11:45:47 -0400 |
commit | 16658fd39da9021aeec08fe11c56d7877f723da7 (patch) | |
tree | d3368a04f4ab88382e72ddfbc3ab14efae5ecbe5 /drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |
parent | ce04ae15bb0952ce994cb6842ac6e6f34e85d064 (diff) |
gpu: nvgpu: post BPT_INT/PAUSE and BLOCKING_SYNC events
Post EVENT_ID_BPT_INT when bpt.int is pending
Post EVENT_ID_BPT_PAUSE when bpt.pause is pending
Post EVENT_ID_BLOCKING_SYNC whenever there is
non-stalling semaphore interrupt indicating work
completion from GR/CE2 engine
Bug 200089620
Change-Id: I91b7bf48f8585f0d318298fc0c4a66d42055f0a7
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1112274
(cherry picked from commit d2b744b1f9acac56435cd7e7ab9a7a845579ef24)
Reviewed-on: http://git-master/r/1120321
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 468ee7f1..da73d95d 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -2831,7 +2831,7 @@ int gk20a_channel_resume(struct gk20a *g) | |||
2831 | return 0; | 2831 | return 0; |
2832 | } | 2832 | } |
2833 | 2833 | ||
2834 | void gk20a_channel_semaphore_wakeup(struct gk20a *g) | 2834 | void gk20a_channel_semaphore_wakeup(struct gk20a *g, bool post_events) |
2835 | { | 2835 | { |
2836 | struct fifo_gk20a *f = &g->fifo; | 2836 | struct fifo_gk20a *f = &g->fifo; |
2837 | u32 chid; | 2837 | u32 chid; |
@@ -2842,6 +2842,18 @@ void gk20a_channel_semaphore_wakeup(struct gk20a *g) | |||
2842 | struct channel_gk20a *c = g->fifo.channel+chid; | 2842 | struct channel_gk20a *c = g->fifo.channel+chid; |
2843 | if (gk20a_channel_get(c)) { | 2843 | if (gk20a_channel_get(c)) { |
2844 | wake_up_interruptible_all(&c->semaphore_wq); | 2844 | wake_up_interruptible_all(&c->semaphore_wq); |
2845 | if (post_events) { | ||
2846 | if (gk20a_is_channel_marked_as_tsg(c)) { | ||
2847 | struct tsg_gk20a *tsg = | ||
2848 | &g->fifo.tsg[c->tsgid]; | ||
2849 | |||
2850 | gk20a_tsg_event_id_post_event(tsg, | ||
2851 | NVGPU_IOCTL_CHANNEL_EVENT_ID_BLOCKING_SYNC); | ||
2852 | } else { | ||
2853 | gk20a_channel_event_id_post_event(c, | ||
2854 | NVGPU_IOCTL_CHANNEL_EVENT_ID_BLOCKING_SYNC); | ||
2855 | } | ||
2856 | } | ||
2845 | gk20a_channel_update(c, 0); | 2857 | gk20a_channel_update(c, 0); |
2846 | gk20a_channel_put(c); | 2858 | gk20a_channel_put(c); |
2847 | } | 2859 | } |