summaryrefslogtreecommitdiff
path: root/mali_kbase/mali_kbase_softjobs.c
diff options
context:
space:
mode:
authorSidath Senanayake <sidaths@google.com>2020-09-22 19:26:46 +0100
committerSidath Senanayake <sidaths@google.com>2020-09-22 19:31:32 +0100
commitf27a9b87191d243a17350c528037bae6ce6e6da4 (patch)
tree2477b695cd33283cf31bdd9d357432d9a6290088 /mali_kbase/mali_kbase_softjobs.c
parentd5e0376a407d7729714f269101c6120f2589af69 (diff)
parentd4ca6eb7268ee2db9deabd1745b505c6e1c162f9 (diff)
downloadgpu-f27a9b87191d243a17350c528037bae6ce6e6da4.tar.gz
Merge r26p0 from upstream into android-gs-pixel-5.4
This commit updates the Mali KMD to version r26p0 from commit d4ca6eb7268ee2db9deabd1745b505c6e1c162f9 Bug: 168298113 Change-Id: Ie8caf2df2ec573a1b458651fa5eb0806efb993f1
Diffstat (limited to 'mali_kbase/mali_kbase_softjobs.c')
-rw-r--r--mali_kbase/mali_kbase_softjobs.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/mali_kbase/mali_kbase_softjobs.c b/mali_kbase/mali_kbase_softjobs.c
index a6314a1..8176d7f 100644
--- a/mali_kbase/mali_kbase_softjobs.c
+++ b/mali_kbase/mali_kbase_softjobs.c
@@ -32,6 +32,7 @@
#include <linux/dma-mapping.h>
#include <mali_base_kernel.h>
#include <mali_kbase_hwaccess_time.h>
+#include <mali_kbase_kinstr_jm.h>
#include <mali_kbase_mem_linux.h>
#include <tl/mali_kbase_tracepoints.h>
#include <mali_linux_trace.h>
@@ -899,7 +900,7 @@ int kbasep_jit_alloc_validate(struct kbase_context *kctx,
if (info->flags & ~(BASE_JIT_ALLOC_VALID_FLAGS))
return -EINVAL;
-#if !MALI_JIT_PRESSURE_LIMIT
+#if !MALI_JIT_PRESSURE_LIMIT_BASE
/* If just-in-time memory allocation pressure limit feature is disabled,
* heap_info_gpu_addr must be zeroed-out
*/
@@ -1091,14 +1092,19 @@ static int kbase_jit_allocate_process(struct kbase_jd_atom *katom)
}
}
-#if MALI_JIT_PRESSURE_LIMIT
+#if MALI_JIT_PRESSURE_LIMIT_BASE
/**
- * If this is the only JIT_ALLOC atom in-flight then allow it to exceed
- * the defined pressure limit.
+ * If this is the only JIT_ALLOC atom in-flight or if JIT pressure limit
+ * is disabled at the context scope, then bypass JIT pressure limit
+ * logic in kbase_jit_allocate().
*/
- if (kctx->jit_current_allocations == 0)
+ if (!kbase_ctx_flag(kctx, KCTX_JPL_ENABLED)
+ || (kctx->jit_current_allocations == 0)) {
ignore_pressure_limit = true;
-#endif /* MALI_JIT_PRESSURE_LIMIT */
+ }
+#else
+ ignore_pressure_limit = true;
+#endif /* MALI_JIT_PRESSURE_LIMIT_BASE */
for (i = 0, info = katom->softjob_data; i < count; i++, info++) {
if (kctx->jit_alloc[info->id]) {
@@ -1358,12 +1364,16 @@ void kbase_jit_retry_pending_alloc(struct kbase_context *kctx)
list_for_each_safe(i, tmp, &jit_pending_alloc_list) {
struct kbase_jd_atom *pending_atom = list_entry(i,
struct kbase_jd_atom, queue);
+ KBASE_TLSTREAM_TL_EVENT_ATOM_SOFTJOB_START(kctx->kbdev, pending_atom);
+ kbase_kinstr_jm_atom_sw_start(pending_atom);
if (kbase_jit_allocate_process(pending_atom) == 0) {
/* Atom has completed */
kthread_init_work(&pending_atom->work,
kbasep_jit_finish_worker);
kthread_queue_work(&kctx->kbdev->job_done_worker, &pending_atom->work);
}
+ KBASE_TLSTREAM_TL_EVENT_ATOM_SOFTJOB_END(kctx->kbdev, pending_atom);
+ kbase_kinstr_jm_atom_sw_stop(pending_atom);
}
}
@@ -1538,6 +1548,7 @@ int kbase_process_soft_job(struct kbase_jd_atom *katom)
struct kbase_device *kbdev = kctx->kbdev;
KBASE_TLSTREAM_TL_EVENT_ATOM_SOFTJOB_START(kbdev, katom);
+ kbase_kinstr_jm_atom_sw_start(katom);
trace_sysgraph(SGR_SUBMIT, kctx->id,
kbase_jd_atom_id(kctx, katom));
@@ -1600,6 +1611,7 @@ int kbase_process_soft_job(struct kbase_jd_atom *katom)
/* Atom is complete */
KBASE_TLSTREAM_TL_EVENT_ATOM_SOFTJOB_END(kbdev, katom);
+ kbase_kinstr_jm_atom_sw_stop(katom);
return ret;
}