summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSachit Kadle <skadle@nvidia.com>2016-09-22 18:55:33 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-10-26 18:04:29 -0400
commitd539e9741505581357f611e4d5fef21abfd08484 (patch)
tree18044e07e38f731af19cd8d619cc9f2b60eb62e8 /drivers
parent2fa54c94a67e13d84df980d646674dde0ad27168 (diff)
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 <skadle@nvidia.com> Reviewed-on: http://git-master/r/1225620 (cherry picked from commit 64a6db0080c3b198ddc2029544f52eb590dc08ff) Reviewed-on: http://git-master/r/1225615 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c12
1 files changed, 11 insertions, 1 deletions
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)
3341 NVGPU_IOCTL_CHANNEL_EVENT_ID_BLOCKING_SYNC); 3341 NVGPU_IOCTL_CHANNEL_EVENT_ID_BLOCKING_SYNC);
3342 } 3342 }
3343 } 3343 }
3344 gk20a_channel_update(c, 0); 3344 /*
3345 * Only non-deterministic channels get the
3346 * channel_update callback. We don't allow
3347 * semaphore-backed syncs for these channels anyways,
3348 * since they have a dependency on the sync framework.
3349 * If deterministic channels are receiving a semaphore
3350 * wakeup, it must be for a user-space managed
3351 * semaphore.
3352 */
3353 if (!c->deterministic)
3354 gk20a_channel_update(c, 0);
3345 gk20a_channel_put(c); 3355 gk20a_channel_put(c);
3346 } 3356 }
3347 } 3357 }