summaryrefslogtreecommitdiff
path: root/mali_kbase/context/backend
diff options
context:
space:
mode:
authordiverj <diverj@google.com>2021-12-03 18:40:36 +0000
committerdiverj <diverj@google.com>2021-12-09 17:33:36 +0000
commit28a0e87fc3099b69feb2f62e690042a73df5cd39 (patch)
tree3584974dc16150b8f470a99f10e4616729c8bdf4 /mali_kbase/context/backend
parentd1a1d36dfe5e8965da1d520351d76b5df999a43c (diff)
downloadgpu-28a0e87fc3099b69feb2f62e690042a73df5cd39.tar.gz
mali_kbase: WA to avoid L2 power transitions during MMU commands
* Wait for L2/MMU power transitions to complete before issuing MMU commands * Add stack traces to AS_ACTIVE bit stuck errors Bug: 205279486 Change-Id: I38d07e3c67b37ec054e3a0580daffef89ab52c5d Signed-off-by: diverj <diverj@google.com>
Diffstat (limited to 'mali_kbase/context/backend')
-rw-r--r--mali_kbase/context/backend/mali_kbase_context_csf.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mali_kbase/context/backend/mali_kbase_context_csf.c b/mali_kbase/context/backend/mali_kbase_context_csf.c
index 33912e6..5a0caf3 100644
--- a/mali_kbase/context/backend/mali_kbase_context_csf.c
+++ b/mali_kbase/context/backend/mali_kbase_context_csf.c
@@ -31,6 +31,7 @@
#include <mali_kbase_mem_pool_group.h>
#include <mmu/mali_kbase_mmu.h>
#include <tl/mali_kbase_timeline.h>
+#include <backend/gpu/mali_kbase_pm_internal.h>
#if IS_ENABLED(CONFIG_DEBUG_FS)
#include <csf/mali_kbase_csf_csg_debugfs.h>
@@ -173,6 +174,7 @@ KBASE_EXPORT_SYMBOL(kbase_create_context);
void kbase_destroy_context(struct kbase_context *kctx)
{
struct kbase_device *kbdev;
+ int err;
if (WARN_ON(!kctx))
return;
@@ -194,6 +196,13 @@ void kbase_destroy_context(struct kbase_context *kctx)
!kbase_pm_is_suspending(kbdev));
}
+ /* Make sure L2 cache is powered up */
+ err = kbase_pm_wait_for_l2_powered(kbdev);
+ if (err) {
+ dev_err(kbdev->dev, "Wait for L2 power up failed on term of ctx %d_%d",
+ kctx->tgid, kctx->id);
+ }
+
kbase_mem_pool_group_mark_dying(&kctx->mem_pools);
kbase_context_term_partial(kctx, ARRAY_SIZE(context_init));