[PATCH] uxa: Do not use RandR in hotplug if not available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Signed-off-by: Olivier Fourdan <ofourdan@xxxxxxxxxx>
---
 src/uxa/intel_display.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/uxa/intel_display.c b/src/uxa/intel_display.c
index a95b3de..e42a59d 100644
--- a/src/uxa/intel_display.c
+++ b/src/uxa/intel_display.c
@@ -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;
-- 
2.1.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux