uxa: Do not use RandR in hotplug if not available
PATCH 1/1 uxa: Do not use RandR in hotplug if not available
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 it's safer to just return if RandR is not available.
--- src/uxa/intel_display.c | 7 +++++++ 1 file changed, 7 insertions(+)
src/uxa/intel_display.c +7 -0
@@ -2516,6 +2516,13 @@ intel_mode_hotplug(struct intel_screen_private *intel)Bool found;Bool changed = FALSE;struct intel_mode *mode = intel->modes; + +#ifdef HAS_DIXREGISTERPRIVATEKEY +/* Without RR, nothing we can do here */ +if (!dixPrivateKeyRegistered (rrPrivKey)) +return ; +#endif + mode_res =drmModeGetResources (intel->drmSubFD);if (!mode_res) goto out;
Signature · 6 lines
2.1.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 6 lines · Olivier Fourdan
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 it's safer to just return if RandR is not available.
In fact it makes little sense to install a udev monitor without RandR, see 1a489142c8e6a4828348cc9afbd0f430d3b1e2d8
-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 1/1 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.
---
v2: Do not register udev monitor without RandR as done in sna.
src/uxa/intel_driver.c | 6 ++++++ 1 file changed, 6 insertions(+)
src/uxa/intel_driver.c +6 -0
@@ -775,6 +775,12 @@ I830UeventInit(ScrnInfoPtr scrn)Bool hotplug;MessageType from =X_CONFIG ; +#ifdef HAS_DIXREGISTERPRIVATEKEY +/* Without RR, nothing we can do here */ +if (!dixPrivateKeyRegistered (rrPrivKey)) +return ; +#endif +if (!xf86GetOptValBool (intel->Options,OPTION_HOTPLUG , &hotplug)) { from =X_DEFAULT ; hotplug = TRUE;
Signature · 6 lines
2.3.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v2] uxa: Do not register hotplug without RandR
Quoted 10 lines · Olivier Fourdan
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.
Signed-off-by Olivier Fourdan <[email protected]>---
v2: Do not register udev monitor without RandR as done in sna.
I tweaked it so that we had an alternative check before HAS_DIXREGISTERPRIVATEKEY and pushed. Thanks, -Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx