From da5acbfda9498ca1e3e844e8e80ff31b336a86d8 Mon Sep 17 00:00:00 2001
From: Jeff Boody <jboody@codeaurora.org>
Date: Tue, 17 Sep 2013 17:21:44 -0600
Subject: [PATCH] msm: kgsl: schedule the event queue after the dispatcher work
 queue

A race condition exists where the last retired timestamp may change
while processing the dispatcher work queue. If the next command is
a sync event that has not yet signaled a deadlock may occur.

Change-Id: I1113f2e60b8adeade65d6d979777a0aa276a172b
Signed-off-by: Jeff Boody <jboody@codeaurora.org>
(cherry picked from commit 5acd3c7888679b639134e56fc3b7f65d5ee199e7)
---
 drivers/gpu/msm/adreno_dispatch.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/msm/adreno_dispatch.c b/drivers/gpu/msm/adreno_dispatch.c
index bb6a00a0a301..63bb78423c4a 100644
--- a/drivers/gpu/msm/adreno_dispatch.c
+++ b/drivers/gpu/msm/adreno_dispatch.c
@@ -1378,6 +1378,9 @@ done:
 	mutex_unlock(&device->mutex);
 
 	mutex_unlock(&dispatcher->mutex);
+
+	/* Schedule the event queue */
+	queue_work(device->work_queue, &device->ts_expired_ws);
 }
 
 void adreno_dispatcher_schedule(struct kgsl_device *device)
-- 
GitLab