summaryrefslogtreecommitdiff
path: root/mali_kbase/mali_kbase_sync_file.c
diff options
context:
space:
mode:
authorSidath Senanayake <sidaths@google.com>2020-08-28 19:25:55 +0100
committerSidath Senanayake <sidaths@google.com>2020-09-02 21:01:39 +0100
commit901002651771415370634f7fd5bccb2b521aed9b (patch)
treecd0fb5e2fd24ff0bc9e1c5559264365668ac7318 /mali_kbase/mali_kbase_sync_file.c
parent6e032ea6a5d703423946308b4ee0be1c198eca8d (diff)
downloadgpu-901002651771415370634f7fd5bccb2b521aed9b.tar.gz
mali_kbase: convert event and jd workqueues to per-device kthreads
Use kthreads instead of workqueues to allow more control over mali driver scheduling. Hoist the kthreads to be per-device. Bug: 156057140 Bug: 157077800 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: Ic7fd80cb6be7b514fc824658bfd2e5fd090f4555
Diffstat (limited to 'mali_kbase/mali_kbase_sync_file.c')
-rw-r--r--mali_kbase/mali_kbase_sync_file.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mali_kbase/mali_kbase_sync_file.c b/mali_kbase/mali_kbase_sync_file.c
index 0679c48..20579cb 100644
--- a/mali_kbase/mali_kbase_sync_file.c
+++ b/mali_kbase/mali_kbase_sync_file.c
@@ -186,14 +186,14 @@ static void kbase_fence_wait_callback(struct dma_fence *fence,
kbase_fence_dep_count_set(katom, -1);
/* To prevent a potential deadlock we schedule the work onto the
- * job_done_wq workqueue
+ * job_done_worker kthread
*
* The issue is that we may signal the timeline while holding
* kctx->jctx.lock and the callbacks are run synchronously from
* sync_timeline_signal. So we simply defer the work.
*/
- INIT_WORK(&katom->work, kbase_sync_fence_wait_worker);
- queue_work(kctx->jctx.job_done_wq, &katom->work);
+ kthread_init_work(&katom->work, kbase_sync_fence_wait_worker);
+ kthread_queue_work(&kctx->kbdev->job_done_worker, &katom->work);
}
}
@@ -235,8 +235,8 @@ int kbase_sync_fence_in_wait(struct kbase_jd_atom *katom)
/* We should cause the dependent jobs in the bag to be failed,
* to do this we schedule the work queue to complete this job */
- INIT_WORK(&katom->work, kbase_sync_fence_wait_worker);
- queue_work(katom->kctx->jctx.job_done_wq, &katom->work);
+ kthread_init_work(&katom->work, kbase_sync_fence_wait_worker);
+ kthread_queue_work(&katom->kctx->kbdev->job_done_worker, &katom->work);
}
return 1; /* completion to be done later by callback/worker */