summaryrefslogtreecommitdiff
path: root/src/sna/sna_driver.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-10-13 09:26:12 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-10-13 09:26:12 +0100
commit2c227f391a1727f7bcfd0f03c2c75e01bf893383 (patch)
tree5724d12fd929d8c63b4d8307e56667e0448a7944 /src/sna/sna_driver.c
parent49376ba3bddd15e62df55928198160d9970dc1c6 (diff)
sna: Drain all udev events before checking output status
As libudev only pulls off events one by one and we may need to process several for a MST topology change, keep polling until complete. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_driver.c')
-rw-r--r--src/sna/sna_driver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index 03db7606..ddb462b5 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -879,7 +879,7 @@ static bool sna_uevent_poll(struct sna *sna)
pfd.fd = udev_monitor_get_fd(sna->uevent_monitor);
pfd.events = POLLIN;
- if (poll(&pfd, 1, 0) > 0)
+ while (poll(&pfd, 1, 0) > 0)
sna_handle_uevents(pfd.fd, sna);
return true;