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/channel_gk20a.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h index 29a13d24..4e0db3cf 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h @@ -84,6 +84,8 @@ struct gk20a_event_id_data { bool is_tsg; u32 event_id; + bool event_posted; + wait_queue_head_t event_id_wq; struct mutex lock; struct list_head event_id_node; -- cgit v1.2.2