summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2014-12-18 03:57:02 -0500
committerDan Willemsen <dwillemsen@nvidia.com>2015-04-04 18:06:04 -0400
commit4f3647ca32650ff93da1c1159bc87561e89489fa (patch)
tree007c8af6564046dc02f44965518bbf7824ca61f2 /drivers
parenta9423dd19247f7490b0ae363e53d9c720bc939ab (diff)
gpu: nvgpu: protect channel abort with submit lock
Bug 200065789 Change-Id: I59eb93c7929a77cd4de4be40fd7902cd05e536c7 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/665655 (cherry-picked from commit 4ee1893926557b01d7058a0a4c1c23e4476d7668) Reviewed-on: http://git-master/r/668850 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index de51e83e..28b0bbc7 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * GK20A Graphics channel 2 * GK20A Graphics channel
3 * 3 *
4 * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2011-2015, NVIDIA CORPORATION. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License, 7 * under the terms and conditions of the GNU General Public License,
@@ -419,8 +419,10 @@ void gk20a_channel_abort(struct channel_gk20a *ch)
419 bool released_job_semaphore = false; 419 bool released_job_semaphore = false;
420 420
421 /* ensure no fences are pending */ 421 /* ensure no fences are pending */
422 mutex_lock(&ch->submit_lock);
422 if (ch->sync) 423 if (ch->sync)
423 ch->sync->set_min_eq_max(ch->sync); 424 ch->sync->set_min_eq_max(ch->sync);
425 mutex_unlock(&ch->submit_lock);
424 426
425 /* release all job semaphores (applies only to jobs that use 427 /* release all job semaphores (applies only to jobs that use
426 semaphore synchronization) */ 428 semaphore synchronization) */