sna: MST topologies may change on any hotplug event

As the kernel does not send out an explicit DISCOVER event, we have to
reinspect every connector after every hotplug event to detect topology
changes.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2014-06-06 12:00:35 +01:00
parent 782c920b01
commit ee7d2e0a8e
2 changed files with 2 additions and 18 deletions

View File

@ -253,7 +253,6 @@ struct sna {
#define SNA_REMOVE_OUTPUTS 0x400
#define SNA_HAS_FLIP 0x10000
#define SNA_HAS_ASYNC_FLIP 0x20000
#define SNA_REDISCOVER 0x40000000
#define SNA_REPROBE 0x80000000
unsigned cpu_features;

View File

@ -759,21 +759,12 @@ 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",
__FUNCTION__, sna->scrn->vtSema));
if (sna->scrn->vtSema) {
sna_mode_discover(sna);
sna_mode_check(sna);
RRGetInfo(xf86ScrnToScreen(scrn), TRUE);
} else
@ -1178,16 +1169,10 @@ static Bool sna_enter_vt(VT_FUNC_ARGS_DECL)
if (intel_get_master(scrn))
return FALSE;
if (sna->flags & SNA_REDISCOVER) {
DBG(("%s: reporting deferred discover event\n",
__FUNCTION__));
sna_mode_discover(sna);
sna->flags &= ~SNA_REDISCOVER;
}
if (sna->flags & SNA_REPROBE) {
DBG(("%s: reporting deferred hotplug event\n",
__FUNCTION__));
sna_mode_discover(sna);
RRGetInfo(xf86ScrnToScreen(scrn), TRUE);
sna->flags &= ~SNA_REPROBE;
}