summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index a5243834..02ec5835 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -2519,18 +2519,25 @@ static unsigned int gk20a_event_id_poll(struct file *filep, poll_table *wait)
2519 if (event_id_data->is_tsg) { 2519 if (event_id_data->is_tsg) {
2520 struct tsg_gk20a *tsg = g->fifo.tsg + event_id_data->id; 2520 struct tsg_gk20a *tsg = g->fifo.tsg + event_id_data->id;
2521 2521
2522 gk20a_dbg_info( 2522 if (event_id_data->event_posted) {
2523 "found pending event_id=%d on TSG=%d\n", 2523 gk20a_dbg_info(
2524 event_id, tsg->tsgid); 2524 "found pending event_id=%d on TSG=%d\n",
2525 event_id, tsg->tsgid);
2526 mask = (POLLPRI | POLLIN);
2527 event_id_data->event_posted = false;
2528 }
2525 } else { 2529 } else {
2526 struct channel_gk20a *ch = g->fifo.channel 2530 struct channel_gk20a *ch = g->fifo.channel
2527 + event_id_data->id; 2531 + event_id_data->id;
2528 2532
2529 gk20a_dbg_info( 2533 if (event_id_data->event_posted) {
2530 "found pending event_id=%d on chid=%d\n", 2534 gk20a_dbg_info(
2531 event_id, ch->hw_chid); 2535 "found pending event_id=%d on chid=%d\n",
2536 event_id, ch->hw_chid);
2537 mask = (POLLPRI | POLLIN);
2538 event_id_data->event_posted = false;
2539 }
2532 } 2540 }
2533 mask = (POLLPRI | POLLIN);
2534 2541
2535 mutex_unlock(&event_id_data->lock); 2542 mutex_unlock(&event_id_data->lock);
2536 2543
@@ -2609,6 +2616,7 @@ void gk20a_channel_event_id_post_event(struct channel_gk20a *ch,
2609 gk20a_dbg_info( 2616 gk20a_dbg_info(
2610 "posting event for event_id=%d on ch=%d\n", 2617 "posting event for event_id=%d on ch=%d\n",
2611 event_id, ch->hw_chid); 2618 event_id, ch->hw_chid);
2619 event_id_data->event_posted = true;
2612 2620
2613 wake_up_interruptible_all(&event_id_data->event_id_wq); 2621 wake_up_interruptible_all(&event_id_data->event_id_wq);
2614 2622