diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/cde_gk20a.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ce2_gk20a.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 24 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.h | 2 |
4 files changed, 17 insertions, 17 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c index f5b68e72..6f8c160c 100644 --- a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c | |||
@@ -1125,9 +1125,9 @@ __releases(&cde_app->mutex) | |||
1125 | struct gk20a_cde_app *cde_app = &g->cde_app; | 1125 | struct gk20a_cde_app *cde_app = &g->cde_app; |
1126 | bool channel_idle; | 1126 | bool channel_idle; |
1127 | 1127 | ||
1128 | mutex_lock(&ch->jobs_lock); | 1128 | spin_lock(&ch->jobs_lock); |
1129 | channel_idle = list_empty(&ch->jobs); | 1129 | channel_idle = list_empty(&ch->jobs); |
1130 | mutex_unlock(&ch->jobs_lock); | 1130 | spin_unlock(&ch->jobs_lock); |
1131 | 1131 | ||
1132 | if (!channel_idle) | 1132 | if (!channel_idle) |
1133 | return; | 1133 | return; |
diff --git a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c index 8ea0b2d5..9be37a5e 100644 --- a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c | |||
@@ -126,9 +126,9 @@ static void gk20a_ce_finished_ctx_cb(struct channel_gk20a *ch, void *data) | |||
126 | bool channel_idle; | 126 | bool channel_idle; |
127 | u32 event; | 127 | u32 event; |
128 | 128 | ||
129 | mutex_lock(&ch->jobs_lock); | 129 | spin_lock(&ch->jobs_lock); |
130 | channel_idle = list_empty(&ch->jobs); | 130 | channel_idle = list_empty(&ch->jobs); |
131 | mutex_unlock(&ch->jobs_lock); | 131 | spin_unlock(&ch->jobs_lock); |
132 | 132 | ||
133 | if (!channel_idle) | 133 | if (!channel_idle) |
134 | return; | 134 | return; |
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index d4cf6915..e45f7501 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -472,14 +472,14 @@ void gk20a_channel_abort_clean_up(struct channel_gk20a *ch) | |||
472 | 472 | ||
473 | /* release all job semaphores (applies only to jobs that use | 473 | /* release all job semaphores (applies only to jobs that use |
474 | semaphore synchronization) */ | 474 | semaphore synchronization) */ |
475 | mutex_lock(&ch->jobs_lock); | 475 | spin_lock(&ch->jobs_lock); |
476 | list_for_each_entry_safe(job, n, &ch->jobs, list) { | 476 | list_for_each_entry_safe(job, n, &ch->jobs, list) { |
477 | if (job->post_fence->semaphore) { | 477 | if (job->post_fence->semaphore) { |
478 | gk20a_semaphore_release(job->post_fence->semaphore); | 478 | gk20a_semaphore_release(job->post_fence->semaphore); |
479 | released_job_semaphore = true; | 479 | released_job_semaphore = true; |
480 | } | 480 | } |
481 | } | 481 | } |
482 | mutex_unlock(&ch->jobs_lock); | 482 | spin_unlock(&ch->jobs_lock); |
483 | 483 | ||
484 | if (released_job_semaphore) | 484 | if (released_job_semaphore) |
485 | wake_up_interruptible_all(&ch->semaphore_wq); | 485 | wake_up_interruptible_all(&ch->semaphore_wq); |
@@ -512,9 +512,9 @@ int gk20a_wait_channel_idle(struct channel_gk20a *ch) | |||
512 | msecs_to_jiffies(gk20a_get_gr_idle_timeout(ch->g)); | 512 | msecs_to_jiffies(gk20a_get_gr_idle_timeout(ch->g)); |
513 | 513 | ||
514 | do { | 514 | do { |
515 | mutex_lock(&ch->jobs_lock); | 515 | spin_lock(&ch->jobs_lock); |
516 | channel_idle = list_empty(&ch->jobs); | 516 | channel_idle = list_empty(&ch->jobs); |
517 | mutex_unlock(&ch->jobs_lock); | 517 | spin_unlock(&ch->jobs_lock); |
518 | if (channel_idle) | 518 | if (channel_idle) |
519 | break; | 519 | break; |
520 | 520 | ||
@@ -1850,9 +1850,9 @@ static int gk20a_channel_add_job(struct channel_gk20a *c, | |||
1850 | 1850 | ||
1851 | gk20a_channel_timeout_start(c, job); | 1851 | gk20a_channel_timeout_start(c, job); |
1852 | 1852 | ||
1853 | mutex_lock(&c->jobs_lock); | 1853 | spin_lock(&c->jobs_lock); |
1854 | list_add_tail(&job->list, &c->jobs); | 1854 | list_add_tail(&job->list, &c->jobs); |
1855 | mutex_unlock(&c->jobs_lock); | 1855 | spin_unlock(&c->jobs_lock); |
1856 | } else { | 1856 | } else { |
1857 | err = -ETIMEDOUT; | 1857 | err = -ETIMEDOUT; |
1858 | goto err_free_job; | 1858 | goto err_free_job; |
@@ -1898,14 +1898,14 @@ static void gk20a_channel_clean_up_jobs(struct work_struct *work) | |||
1898 | while (1) { | 1898 | while (1) { |
1899 | bool completed; | 1899 | bool completed; |
1900 | 1900 | ||
1901 | mutex_lock(&c->jobs_lock); | 1901 | spin_lock(&c->jobs_lock); |
1902 | if (list_empty(&c->jobs)) { | 1902 | if (list_empty(&c->jobs)) { |
1903 | mutex_unlock(&c->jobs_lock); | 1903 | spin_unlock(&c->jobs_lock); |
1904 | break; | 1904 | break; |
1905 | } | 1905 | } |
1906 | job = list_first_entry(&c->jobs, | 1906 | job = list_first_entry(&c->jobs, |
1907 | struct channel_gk20a_job, list); | 1907 | struct channel_gk20a_job, list); |
1908 | mutex_unlock(&c->jobs_lock); | 1908 | spin_unlock(&c->jobs_lock); |
1909 | 1909 | ||
1910 | completed = gk20a_fence_is_expired(job->post_fence); | 1910 | completed = gk20a_fence_is_expired(job->post_fence); |
1911 | if (!completed) { | 1911 | if (!completed) { |
@@ -1948,9 +1948,9 @@ static void gk20a_channel_clean_up_jobs(struct work_struct *work) | |||
1948 | * so this wouldn't get freed here. */ | 1948 | * so this wouldn't get freed here. */ |
1949 | gk20a_channel_put(c); | 1949 | gk20a_channel_put(c); |
1950 | 1950 | ||
1951 | mutex_lock(&c->jobs_lock); | 1951 | spin_lock(&c->jobs_lock); |
1952 | list_del_init(&job->list); | 1952 | list_del_init(&job->list); |
1953 | mutex_unlock(&c->jobs_lock); | 1953 | spin_unlock(&c->jobs_lock); |
1954 | 1954 | ||
1955 | kfree(job); | 1955 | kfree(job); |
1956 | job_finished = 1; | 1956 | job_finished = 1; |
@@ -2331,7 +2331,7 @@ int gk20a_init_channel_support(struct gk20a *g, u32 chid) | |||
2331 | c->referenceable = false; | 2331 | c->referenceable = false; |
2332 | init_waitqueue_head(&c->ref_count_dec_wq); | 2332 | init_waitqueue_head(&c->ref_count_dec_wq); |
2333 | mutex_init(&c->ioctl_lock); | 2333 | mutex_init(&c->ioctl_lock); |
2334 | mutex_init(&c->jobs_lock); | 2334 | spin_lock_init(&c->jobs_lock); |
2335 | mutex_init(&c->last_submit.fence_lock); | 2335 | mutex_init(&c->last_submit.fence_lock); |
2336 | mutex_init(&c->timeout.lock); | 2336 | mutex_init(&c->timeout.lock); |
2337 | mutex_init(&c->sync_lock); | 2337 | mutex_init(&c->sync_lock); |
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h index 6469603b..4b2019dd 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h | |||
@@ -124,7 +124,7 @@ struct channel_gk20a { | |||
124 | struct list_head ch_entry; /* channel's entry in TSG */ | 124 | struct list_head ch_entry; /* channel's entry in TSG */ |
125 | 125 | ||
126 | struct list_head jobs; | 126 | struct list_head jobs; |
127 | struct mutex jobs_lock; | 127 | spinlock_t jobs_lock; |
128 | 128 | ||
129 | struct vm_gk20a *vm; | 129 | struct vm_gk20a *vm; |
130 | 130 | ||