summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2018-03-27 03:27:06 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-03-27 13:13:26 -0400
commit9b70ad24934988141c585d9fd85c59f5c9d58a38 (patch)
tree07c61f0c3062008c6f92fc0659c49f7ea3a568d0 /drivers/gpu/nvgpu/gk20a/channel_gk20a.c
parent27908cf4a980cb56daa530641cf1817d4e3f9faa (diff)
gpu: nvgpu: delete semaphore release support
Semaphores don't need to be released from CPU anymore, so clarify the code by deleting nvgpu_semaphore_release() and refactoring __nvgpu_semaphore_release() to nvgpu_semaphore_reset() that only "fast-forwards" the semaphore to a later value. While doing this, the meaning of nvgpu_semaphore_incr() changes, so rename it to nvgpu_semaphore_prepare(). Now it's only used to prepare an nvgpu_semaphore for a value that the HW will increment the sema to. Also change the BUG_ON that guards sema double-inits into just WARN_ON. Change-Id: I6f6df368ec5436cc97a229697742b6a4115dca51 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1680361 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index 65b17304..5befe086 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -216,8 +216,8 @@ void gk20a_channel_abort_clean_up(struct channel_gk20a *ch)
216 while (tmp_get != put) { 216 while (tmp_get != put) {
217 job = &ch->joblist.pre_alloc.jobs[tmp_get]; 217 job = &ch->joblist.pre_alloc.jobs[tmp_get];
218 if (job->post_fence->semaphore) { 218 if (job->post_fence->semaphore) {
219 __nvgpu_semaphore_release( 219 nvgpu_semaphore_reset(
220 job->post_fence->semaphore, true, 220 job->post_fence->semaphore,
221 ch->hw_sema); 221 ch->hw_sema);
222 released_job_semaphore = true; 222 released_job_semaphore = true;
223 } 223 }
@@ -228,8 +228,8 @@ void gk20a_channel_abort_clean_up(struct channel_gk20a *ch)
228 &ch->joblist.dynamic.jobs, 228 &ch->joblist.dynamic.jobs,
229 channel_gk20a_job, list) { 229 channel_gk20a_job, list) {
230 if (job->post_fence->semaphore) { 230 if (job->post_fence->semaphore) {
231 __nvgpu_semaphore_release( 231 nvgpu_semaphore_reset(
232 job->post_fence->semaphore, true, 232 job->post_fence->semaphore,
233 ch->hw_sema); 233 ch->hw_sema);
234 released_job_semaphore = true; 234 released_job_semaphore = true;
235 } 235 }