diff options
author | Sidath Senanayake <sidaths@google.com> | 2020-08-28 19:25:55 +0100 |
---|---|---|
committer | Sidath Senanayake <sidaths@google.com> | 2020-09-02 21:01:39 +0100 |
commit | 901002651771415370634f7fd5bccb2b521aed9b (patch) | |
tree | cd0fb5e2fd24ff0bc9e1c5559264365668ac7318 /mali_kbase/mali_kbase_js.c | |
parent | 6e032ea6a5d703423946308b4ee0be1c198eca8d (diff) | |
download | gpu-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_js.c')
-rw-r--r-- | mali_kbase/mali_kbase_js.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mali_kbase/mali_kbase_js.c b/mali_kbase/mali_kbase_js.c index 0b0c5bf..40a2684 100644 --- a/mali_kbase/mali_kbase_js.c +++ b/mali_kbase/mali_kbase_js.c @@ -2727,7 +2727,7 @@ static void js_return_of_end_rp(struct kbase_jd_atom *const end_katom) spin_unlock_irqrestore(&kbdev->hwaccess_lock, flags); } -static void js_return_worker(struct work_struct *data) +static void js_return_worker(struct kthread_work *data) { struct kbase_jd_atom *katom = container_of(data, struct kbase_jd_atom, work); @@ -2879,15 +2879,15 @@ void kbase_js_unpull(struct kbase_context *kctx, struct kbase_jd_atom *katom) jsctx_rb_unpull(kctx, katom); - WARN_ON(work_pending(&katom->work)); + /* At this point no work should be pending on katom->work */ /* Block re-submission until workqueue has run */ atomic_inc(&katom->blocked); kbase_job_check_leave_disjoint(kctx->kbdev, katom); - INIT_WORK(&katom->work, js_return_worker); - queue_work(kctx->jctx.job_done_wq, &katom->work); + kthread_init_work(&katom->work, js_return_worker); + kthread_queue_work(&kctx->kbdev->job_done_worker, &katom->work); } /** |