summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2018-02-14 11:12:47 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-03-07 12:45:04 -0500
commitb063870f909f368820ae9b0726407d18dc28f24c (patch)
tree0b966c4628da3c52b46d2bcd386f6c4dbf5735ec /drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
parentca95adb2d4e51431de2f8fbe252bade55ba0ed46 (diff)
gpu: nvgpu: BUG_ON for sema increment, not value
When adding a sema wait to a pushbuf, verify that the sema threshold has been incremented from the original value by reading the incremented field instead of value (which is set to nonzero by nvgpu_semaphore_incr()). Value could be 0 even after an increment if new semas weren't reset to 0. Jira NVGPU-514 Change-Id: I295451fbc7eb9e597aea12d73074e99f74a6a899 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1658100 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
index 9649c573..85c55955 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
@@ -625,7 +625,7 @@ static int __semaphore_wait_fd_fast_path(struct channel_gk20a *c,
625 return err; 625 return err;
626 626
627 nvgpu_semaphore_get(sema); 627 nvgpu_semaphore_get(sema);
628 BUG_ON(!nvgpu_atomic_read(&sema->value)); 628 BUG_ON(!sema->incremented);
629 add_sema_cmd(c->g, c, sema, wait_cmd, 8, true, false); 629 add_sema_cmd(c->g, c, sema, wait_cmd, 8, true, false);
630 630
631 /* 631 /*