summaryrefslogtreecommitdiff
path: root/mali_kbase/mali_kbase_gwt.c
diff options
context:
space:
mode:
authorKevin Park <Youngeun.Park@arm.com>2023-12-08 17:01:50 +0000
committerRenato Grottesi <otaner@google.com>2023-12-11 12:57:25 +0000
commit2226bae46b7a606e97a9ced0e91d7209cd04758c (patch)
treec5d287e0fd9699c37b4c42a40ece494c848f5b5a /mali_kbase/mali_kbase_gwt.c
parentcab5dbbee97ee9e3baa41d00372363a2f53196e0 (diff)
downloadgpu-2226bae46b7a606e97a9ced0e91d7209cd04758c.tar.gz
Fix deadlock BTW user thread and page fault worker
MIDCET-4882,GPUCORE-40989 Break deadlock BTW user thread and page fault worker This commit adds a RW semaphore 1> to prevent MMU operations during P.Mode entrance and 2> to break the deadlock on 'kctx reg_lock' between user thread and page-fault worker thread. Bug: 301064831 Signed-off-by: Renato Grottesi <otaner@google.com> Test: manual run of the use case from the ticket Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/6221 Change-Id: I692f8fafc558a6a45b5ca4210aa3f66c2617553f
Diffstat (limited to 'mali_kbase/mali_kbase_gwt.c')
-rw-r--r--mali_kbase/mali_kbase_gwt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mali_kbase/mali_kbase_gwt.c b/mali_kbase/mali_kbase_gwt.c
index 32c9241..4914e24 100644
--- a/mali_kbase/mali_kbase_gwt.c
+++ b/mali_kbase/mali_kbase_gwt.c
@@ -61,9 +61,9 @@ static void kbase_gpu_gwt_setup_pages(struct kbase_context *kctx,
int kbase_gpu_gwt_start(struct kbase_context *kctx)
{
- kbase_gpu_vm_lock(kctx);
+ kbase_gpu_vm_lock_with_pmode_sync(kctx);
if (kctx->gwt_enabled) {
- kbase_gpu_vm_unlock(kctx);
+ kbase_gpu_vm_unlock_with_pmode_sync(kctx);
return -EBUSY;
}
@@ -90,7 +90,7 @@ int kbase_gpu_gwt_start(struct kbase_context *kctx)
kbase_gpu_gwt_setup_pages(kctx, ~KBASE_REG_GPU_WR);
- kbase_gpu_vm_unlock(kctx);
+ kbase_gpu_vm_unlock_with_pmode_sync(kctx);
return 0;
}