summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_sema_service.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/gsp_sema_service.c')
-rw-r--r--kernel/gsp_sema_service.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index d476188..3c732e8 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -4870,6 +4870,15 @@ int gsp_sema_service_add_map(u64 gpu_va, u64 pa, u64 len, u32 ap)
svc_map_add_q[svc_map_add_head % SVC_MAP_ADD_MAX].ap = ap;
svc_map_add_head = next;
spin_unlock_irqrestore(&svc_map_add_lock, flags);
+
+ /*
+ * Drain now: the client's context-init deadline is a couple of
+ * seconds and the service loop may be in a long pump/discovery pass,
+ * so an injection that waits for the next loop iteration can land
+ * after the client already gave up.
+ */
+ if (svc.task)
+ wake_up_process(svc.task);
return 0;
}