From 2bc8f4e36df6b0329417d1af20f1f14f43db62a8 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Tue, 7 Jun 2016 21:50:57 +0530 Subject: gpu: nvgpu: fix event id polling In gk20a_event_id_poll(), we always set the mask value and return it. This causes poll() from UMD to be always successful irrespective of event is really generated or not Fix this by adding a flag event_posted for each event Set this flag while posting the event In gk20a_event_id_poll(), set the mask value only if this flag is set. If flag is set, set mask and clear the flag Bug 200089620 Change-Id: If14236547c611fe4bfa1410ff5b69c9fa02d43bb Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/1160253 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/gpu/nvgpu/gk20a/tsg_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c index 5298d380..f7d5535d 100644 --- a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c @@ -231,6 +231,7 @@ void gk20a_tsg_event_id_post_event(struct tsg_gk20a *tsg, gk20a_dbg_info( "posting event for event_id=%d on tsg=%d\n", event_id, tsg->tsgid); + event_id_data->event_posted = true; wake_up_interruptible_all(&event_id_data->event_id_wq); -- cgit v1.2.2