diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/common/fifo/submit.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/fifo/submit.c b/drivers/gpu/nvgpu/common/fifo/submit.c index 599539cd..4effc663 100644 --- a/drivers/gpu/nvgpu/common/fifo/submit.c +++ b/drivers/gpu/nvgpu/common/fifo/submit.c | |||
@@ -59,13 +59,11 @@ static int nvgpu_submit_prepare_syncs(struct channel_gk20a *c, | |||
59 | c->sync = nvgpu_channel_sync_create(c, false); | 59 | c->sync = nvgpu_channel_sync_create(c, false); |
60 | if (!c->sync) { | 60 | if (!c->sync) { |
61 | err = -ENOMEM; | 61 | err = -ENOMEM; |
62 | nvgpu_mutex_release(&c->sync_lock); | ||
63 | goto fail; | 62 | goto fail; |
64 | } | 63 | } |
65 | new_sync_created = true; | 64 | new_sync_created = true; |
66 | } | 65 | } |
67 | nvgpu_atomic_inc(&c->sync->refcount); | 66 | nvgpu_atomic_inc(&c->sync->refcount); |
68 | nvgpu_mutex_release(&c->sync_lock); | ||
69 | } | 67 | } |
70 | 68 | ||
71 | if (g->ops.fifo.resetup_ramfc && new_sync_created) { | 69 | if (g->ops.fifo.resetup_ramfc && new_sync_created) { |
@@ -151,6 +149,9 @@ static int nvgpu_submit_prepare_syncs(struct channel_gk20a *c, | |||
151 | goto clean_up_incr_cmd; | 149 | goto clean_up_incr_cmd; |
152 | } | 150 | } |
153 | 151 | ||
152 | if (g->aggressive_sync_destroy_thresh) { | ||
153 | nvgpu_mutex_release(&c->sync_lock); | ||
154 | } | ||
154 | return 0; | 155 | return 0; |
155 | 156 | ||
156 | clean_up_incr_cmd: | 157 | clean_up_incr_cmd: |
@@ -169,6 +170,9 @@ clean_up_wait_cmd: | |||
169 | job->wait_cmd = NULL; | 170 | job->wait_cmd = NULL; |
170 | } | 171 | } |
171 | fail: | 172 | fail: |
173 | if (g->aggressive_sync_destroy_thresh) { | ||
174 | nvgpu_mutex_release(&c->sync_lock); | ||
175 | } | ||
172 | *wait_cmd = NULL; | 176 | *wait_cmd = NULL; |
173 | return err; | 177 | return err; |
174 | } | 178 | } |