summaryrefslogtreecommitdiff
path: root/mali_kbase/mali_kbase_softjobs.c
diff options
context:
space:
mode:
authorJack Diver <diverj@google.com>2022-11-07 12:13:47 +0000
committerJack Diver <diverj@google.com>2022-11-09 17:51:01 +0000
commite19249ece66a726b13d0ed8734c4059f364ca2f5 (patch)
tree0bdfdcc3c70a6378c8265b03e3fba6b8120ffa21 /mali_kbase/mali_kbase_softjobs.c
parent34e635317dc2a91076ac341df3867ac3bdb31ef1 (diff)
downloadgpu-e19249ece66a726b13d0ed8734c4059f364ca2f5.tar.gz
Revert "Revert "Merge r38p1 from upstream into partner/android13-gs-pixel-5.10-tm-qpr2""
This reverts commit 34e635317dc2a91076ac341df3867ac3bdb31ef1. Bug: 228779790 Change-Id: Ic9d131af5568d7f55f610f255fa1c02925b18482 (cherry picked from commit 1c916e3f7c4d999f68e40c60fee6fe39418fcecd)
Diffstat (limited to 'mali_kbase/mali_kbase_softjobs.c')
-rw-r--r--mali_kbase/mali_kbase_softjobs.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/mali_kbase/mali_kbase_softjobs.c b/mali_kbase/mali_kbase_softjobs.c
index ae3b9ad..665bc09 100644
--- a/mali_kbase/mali_kbase_softjobs.c
+++ b/mali_kbase/mali_kbase_softjobs.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
/*
*
- * (C) COPYRIGHT 2011-2021 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT 2011-2022 ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -75,7 +75,7 @@ static void kbasep_add_waiting_with_timeout(struct kbase_jd_atom *katom)
/* Record the start time of this atom so we could cancel it at
* the right time.
*/
- katom->start_timestamp = ktime_get();
+ katom->start_timestamp = ktime_get_raw();
/* Add the atom to the waiting list before the timer is
* (re)started to make sure that it gets processed.
@@ -215,7 +215,7 @@ void kbase_soft_event_wait_callback(struct kbase_jd_atom *katom)
rt_mutex_lock(&kctx->jctx.lock);
kbasep_remove_waiting_soft_job(katom);
kbase_finish_soft_job(katom);
- if (jd_done_nolock(katom, true))
+ if (kbase_jd_done_nolock(katom, true))
kbase_js_sched_all(kctx->kbdev);
rt_mutex_unlock(&kctx->jctx.lock);
}
@@ -229,7 +229,7 @@ static void kbasep_soft_event_complete_job(struct kthread_work *work)
int resched;
rt_mutex_lock(&kctx->jctx.lock);
- resched = jd_done_nolock(katom, true);
+ resched = kbase_jd_done_nolock(katom, true);
rt_mutex_unlock(&kctx->jctx.lock);
if (resched)
@@ -390,7 +390,7 @@ void kbasep_soft_job_timeout_worker(struct timer_list *timer)
soft_job_timeout);
u32 timeout_ms = (u32)atomic_read(
&kctx->kbdev->js_data.soft_job_timeout_ms);
- ktime_t cur_time = ktime_get();
+ ktime_t cur_time = ktime_get_raw();
bool restarting = false;
unsigned long lflags;
struct list_head *entry, *tmp;
@@ -500,7 +500,7 @@ out:
static void kbasep_soft_event_cancel_job(struct kbase_jd_atom *katom)
{
katom->event_code = BASE_JD_EVENT_JOB_CANCELLED;
- if (jd_done_nolock(katom, true))
+ if (kbase_jd_done_nolock(katom, true))
kbase_js_sched_all(katom->kctx->kbdev);
}
@@ -812,11 +812,7 @@ int kbase_mem_copy_from_extres(struct kbase_context *kctx,
dma_to_copy = min(dma_buf->size,
(size_t)(buf_data->nr_extres_pages * PAGE_SIZE));
- ret = dma_buf_begin_cpu_access(dma_buf,
-#if KERNEL_VERSION(4, 6, 0) > LINUX_VERSION_CODE && !defined(CONFIG_CHROMEOS)
- 0, dma_to_copy,
-#endif
- DMA_FROM_DEVICE);
+ ret = dma_buf_begin_cpu_access(dma_buf, DMA_FROM_DEVICE);
if (ret)
goto out_unlock;
@@ -843,11 +839,7 @@ int kbase_mem_copy_from_extres(struct kbase_context *kctx,
break;
}
}
- dma_buf_end_cpu_access(dma_buf,
-#if KERNEL_VERSION(4, 6, 0) > LINUX_VERSION_CODE && !defined(CONFIG_CHROMEOS)
- 0, dma_to_copy,
-#endif
- DMA_FROM_DEVICE);
+ dma_buf_end_cpu_access(dma_buf, DMA_FROM_DEVICE);
break;
}
default:
@@ -1357,7 +1349,7 @@ static void kbasep_jit_finish_worker(struct kthread_work *work)
rt_mutex_lock(&kctx->jctx.lock);
kbase_finish_soft_job(katom);
- resched = jd_done_nolock(katom, true);
+ resched = kbase_jd_done_nolock(katom, true);
rt_mutex_unlock(&kctx->jctx.lock);
if (resched)
@@ -1798,7 +1790,7 @@ void kbase_resume_suspended_soft_jobs(struct kbase_device *kbdev)
if (kbase_process_soft_job(katom_iter) == 0) {
kbase_finish_soft_job(katom_iter);
- resched |= jd_done_nolock(katom_iter, true);
+ resched |= kbase_jd_done_nolock(katom_iter, true);
#ifdef CONFIG_MALI_ARBITER_SUPPORT
atomic_dec(&kbdev->pm.gpu_users_waiting);
#endif /* CONFIG_MALI_ARBITER_SUPPORT */