diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-05-07 11:01:30 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-05-07 12:36:59 +0100 |
commit | c38512e12e879ae8932528a9cac5ffbf4ea138c0 (patch) | |
tree | 5ab7935533be7b8b7cfb0f55042a2c3e1a60b0da /src/sna/sna_driver.c | |
parent | 7aefd003bb65cc52a74dfcfd8af4b67a364343ff (diff) |
sna: Run output discovery before modes query
If we keep the separate discovery uevent, we need to run it first in the
cases where we get combined discovery+hotplug events.
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.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index 80ff33bc..d57902e6 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -705,6 +705,16 @@ sna_handle_uevents(int fd, void *closure) return; } + str = udev_device_get_property_value(dev, "DISCOVER"); + if (str && atoi(str) == 1) { + DBG(("%s: discover event (vtSema?=%d)\n", + __FUNCTION__, sna->scrn->vtSema)); + if (sna->scrn->vtSema) + sna_mode_discover(sna); + else + sna->flags |= SNA_REDISCOVER; + } + str = udev_device_get_property_value(dev, "HOTPLUG"); if (str && atoi(str) == 1) { DBG(("%s: hotplug event (vtSema?=%d)\n", @@ -716,16 +726,6 @@ sna_handle_uevents(int fd, void *closure) sna->flags |= SNA_REPROBE; } - str = udev_device_get_property_value(dev, "DISCOVER"); - if (str && atoi(str) == 1) { - DBG(("%s: discover event (vtSema?=%d)\n", - __FUNCTION__, sna->scrn->vtSema)); - if (sna->scrn->vtSema) - sna_mode_discover(sna); - else - sna->flags |= SNA_REDISCOVER; - } - udev_device_unref(dev); } |