From d539e9741505581357f611e4d5fef21abfd08484 Mon Sep 17 00:00:00 2001 From: Sachit Kadle Date: Thu, 22 Sep 2016 15:55:33 -0700 Subject: gpu: nvgpu: fix semaphore wakeup logic Currently, when we receive a semaphore wakeup interrupt, we call the channel_update callback, which schedules deferred job clean-up. For deterministic channels, we don't allow semaphore-backed syncs anyways. That means for these channels, if we get a semaphore wakeup interrupt, it must be for a userspace-managed semaphore. In this case, there is no need to call into the channel_update callback. So for deterministic channels, we skip this. Bug 1795076 Change-Id: I4cdfecd53144078c5cd4be8a41c5c3b7d74c338e Signed-off-by: Sachit Kadle Reviewed-on: http://git-master/r/1225620 (cherry picked from commit 64a6db0080c3b198ddc2029544f52eb590dc08ff) Reviewed-on: http://git-master/r/1225615 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 7481e747..6c4b949a 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c @@ -3341,7 +3341,17 @@ void gk20a_channel_semaphore_wakeup(struct gk20a *g, bool post_events) NVGPU_IOCTL_CHANNEL_EVENT_ID_BLOCKING_SYNC); } } - gk20a_channel_update(c, 0); + /* + * Only non-deterministic channels get the + * channel_update callback. We don't allow + * semaphore-backed syncs for these channels anyways, + * since they have a dependency on the sync framework. + * If deterministic channels are receiving a semaphore + * wakeup, it must be for a user-space managed + * semaphore. + */ + if (!c->deterministic) + gk20a_channel_update(c, 0); gk20a_channel_put(c); } } -- cgit v1.2.2