>From c3e83b86bdd22403215bdd03cf7f70657bfaea37 Mon Sep 17 00:00:00 2001
From: Damien Leone <dle...@nvidia.com>
Date: Mon, 18 Jun 2018 16:24:28 -0700
Subject: [PATCH] os: Recompute whether any clients are ready after
 check_timers()

If a driver calls AttendClient() from within a timer callback we
need to re-compute the local 'are_ready' to prevent the attended
client from waiting until WaitForSomething() times out.

This is a fix similar to commit 9ed5b263.

Signed-off-by: Damien Leone <dle...@nvidia.com>
---
 os/WaitFor.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/os/WaitFor.c b/os/WaitFor.c
index ae317dc11..ff1d376e9 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -190,10 +190,11 @@ WaitForSomething(Bool are_ready)
         /* deal with any blocked jobs */
         if (workQueue) {
             ProcessWorkQueue();
-            are_ready = clients_are_ready();
         }
 
         timeout = check_timers();
+        are_ready = clients_are_ready();
+
         if (are_ready)
             timeout = 0;
 
-- 
2.17.1

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to