summaryrefslogtreecommitdiff
path: root/mali_kbase/mali_kbase_softjobs.c
diff options
context:
space:
mode:
authorKevin DuBois <kevindubois@google.com>2022-11-02 21:39:17 +0000
committerKevin DuBois <kevindubois@google.com>2022-11-02 22:39:21 +0000
commit34e635317dc2a91076ac341df3867ac3bdb31ef1 (patch)
treecf1c0e597ce1e7dcd9b276ff4d51be60c7fdca58 /mali_kbase/mali_kbase_softjobs.c
parent6dcd9736cbf84712dd7073dab4aea256e30517c2 (diff)
downloadgpu-34e635317dc2a91076ac341df3867ac3bdb31ef1.tar.gz
Revert "Merge r38p1 from upstream into partner/android13-gs-pixel-5.10-tm-qpr2"
This reverts commit 6dcd9736cbf84712dd7073dab4aea256e30517c2. Reason for revert: UMD taking too long to merge Bug: 228779790 Change-Id: I08b861ba3cfc8b025f653ef86b0a5ec643e5b13d
Diffstat (limited to 'mali_kbase/mali_kbase_softjobs.c')
-rw-r--r--mali_kbase/mali_kbase_softjobs.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/mali_kbase/mali_kbase_softjobs.c b/mali_kbase/mali_kbase_softjobs.c
index 665bc09..ae3b9ad 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-2022 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT 2011-2021 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_raw();
+ katom->start_timestamp = ktime_get();
/* 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 (kbase_jd_done_nolock(katom, true))
+ if (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 = kbase_jd_done_nolock(katom, true);
+ resched = 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_raw();
+ ktime_t cur_time = ktime_get();
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 (kbase_jd_done_nolock(katom, true))
+ if (jd_done_nolock(katom, true))
kbase_js_sched_all(katom->kctx->kbdev);
}
@@ -812,7 +812,11 @@ 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, DMA_FROM_DEVICE);
+ 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);
if (ret)
goto out_unlock;
@@ -839,7 +843,11 @@ int kbase_mem_copy_from_extres(struct kbase_context *kctx,
break;
}
}
- dma_buf_end_cpu_access(dma_buf, DMA_FROM_DEVICE);
+ 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);
break;
}
default:
@@ -1349,7 +1357,7 @@ static void kbasep_jit_finish_worker(struct kthread_work *work)
rt_mutex_lock(&kctx->jctx.lock);
kbase_finish_soft_job(katom);
- resched = kbase_jd_done_nolock(katom, true);
+ resched = jd_done_nolock(katom, true);
rt_mutex_unlock(&kctx->jctx.lock);
if (resched)
@@ -1790,7 +1798,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 |= kbase_jd_done_nolock(katom_iter, true);
+ resched |= jd_done_nolock(katom_iter, true);
#ifdef CONFIG_MALI_ARBITER_SUPPORT
atomic_dec(&kbdev->pm.gpu_users_waiting);
#endif /* CONFIG_MALI_ARBITER_SUPPORT */