diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 9 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.h | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 3 |
3 files changed, 9 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 53b85ad8..444fec13 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -2501,6 +2501,12 @@ void gk20a_channel_event(struct channel_gk20a *ch) | |||
2501 | mutex_unlock(&ch->poll_events.lock); | 2501 | mutex_unlock(&ch->poll_events.lock); |
2502 | } | 2502 | } |
2503 | 2503 | ||
2504 | void gk20a_channel_post_event(struct channel_gk20a *ch) | ||
2505 | { | ||
2506 | gk20a_channel_event(ch); | ||
2507 | wake_up_interruptible_all(&ch->semaphore_wq); | ||
2508 | } | ||
2509 | |||
2504 | unsigned int gk20a_channel_poll(struct file *filep, poll_table *wait) | 2510 | unsigned int gk20a_channel_poll(struct file *filep, poll_table *wait) |
2505 | { | 2511 | { |
2506 | unsigned int mask = 0; | 2512 | unsigned int mask = 0; |
@@ -2656,8 +2662,7 @@ void gk20a_channel_semaphore_wakeup(struct gk20a *g) | |||
2656 | for (chid = 0; chid < f->num_channels; chid++) { | 2662 | for (chid = 0; chid < f->num_channels; chid++) { |
2657 | struct channel_gk20a *c = g->fifo.channel+chid; | 2663 | struct channel_gk20a *c = g->fifo.channel+chid; |
2658 | if (gk20a_channel_get(c)) { | 2664 | if (gk20a_channel_get(c)) { |
2659 | gk20a_channel_event(c); | 2665 | gk20a_channel_post_event(c); |
2660 | wake_up_interruptible_all(&c->semaphore_wq); | ||
2661 | gk20a_channel_update(c, 0); | 2666 | gk20a_channel_update(c, 0); |
2662 | gk20a_channel_put(c); | 2667 | gk20a_channel_put(c); |
2663 | } | 2668 | } |
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h index 4f0632dd..24a2fe11 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h | |||
@@ -223,6 +223,7 @@ struct channel_gk20a *gk20a_get_channel_from_file(int fd); | |||
223 | void gk20a_channel_update(struct channel_gk20a *c, int nr_completed); | 223 | void gk20a_channel_update(struct channel_gk20a *c, int nr_completed); |
224 | unsigned int gk20a_channel_poll(struct file *filep, poll_table *wait); | 224 | unsigned int gk20a_channel_poll(struct file *filep, poll_table *wait); |
225 | void gk20a_channel_event(struct channel_gk20a *ch); | 225 | void gk20a_channel_event(struct channel_gk20a *ch); |
226 | void gk20a_channel_post_event(struct channel_gk20a *ch); | ||
226 | 227 | ||
227 | void gk20a_init_channel(struct gpu_ops *gops); | 228 | void gk20a_init_channel(struct gpu_ops *gops); |
228 | 229 | ||
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index bfb11566..6e3ea00a 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -4890,8 +4890,7 @@ static int gk20a_gr_handle_semaphore_pending(struct gk20a *g, | |||
4890 | struct fifo_gk20a *f = &g->fifo; | 4890 | struct fifo_gk20a *f = &g->fifo; |
4891 | struct channel_gk20a *ch = &f->channel[isr_data->chid]; | 4891 | struct channel_gk20a *ch = &f->channel[isr_data->chid]; |
4892 | 4892 | ||
4893 | gk20a_channel_event(ch); | 4893 | gk20a_channel_post_event(ch); |
4894 | wake_up(&ch->semaphore_wq); | ||
4895 | 4894 | ||
4896 | return 0; | 4895 | return 0; |
4897 | } | 4896 | } |