uxa: Do not register hotplug without RandR
When using Xinerama, RandR is automatically disabled, and calling RR routines will trigger an assert() because the RR keys/resources are not set, leading to an Xserver abort. Hotplug makes little sense without RandR, so no need to install a udev monitor if RandR is not available, as done in sna. v3: Rebase onto backwards compatible rrPrivKey detection [ickle] Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
148777f028
commit
fbefc8f2bd
|
|
@ -766,6 +766,15 @@ I830HandleUEvents(int fd, void *closure)
|
|||
udev_device_unref(dev);
|
||||
}
|
||||
|
||||
static bool has_randr(void)
|
||||
{
|
||||
#if HAS_DIXREGISTERPRIVATEKEY
|
||||
return dixPrivateKeyRegistered(rrPrivKey);
|
||||
#else
|
||||
return *rrPrivKey;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
I830UeventInit(ScrnInfoPtr scrn)
|
||||
{
|
||||
|
|
@ -775,6 +784,10 @@ I830UeventInit(ScrnInfoPtr scrn)
|
|||
Bool hotplug;
|
||||
MessageType from = X_CONFIG;
|
||||
|
||||
/* Without RR, nothing we can do here */
|
||||
if (!has_randr())
|
||||
return;
|
||||
|
||||
if (!xf86GetOptValBool(intel->Options, OPTION_HOTPLUG, &hotplug)) {
|
||||
from = X_DEFAULT;
|
||||
hotplug = TRUE;
|
||||
|
|
|
|||
Loading…
Reference in New Issue