All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olivier Fourdan <ofourdan@redhat.com>
To: intel-gfx@lists.freedesktop.org
Cc: Dave Airlie <airlied@redhat.com>
Subject: [PATCH] uxa: Do not use RandR in hotplug if not available
Date: Thu,  2 Apr 2015 10:45:39 +0200	[thread overview]
Message-ID: <1427964339-8231-1-git-send-email-ofourdan@redhat.com> (raw)

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@redhat.com>
---
 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@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2015-04-02  8:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-02  8:45 Olivier Fourdan [this message]
2015-04-02  8:49 ` [PATCH] uxa: Do not use RandR in hotplug if not available Chris Wilson
2015-04-08 11:57   ` [PATCH v2] uxa: Do not register hotplug without RandR Olivier Fourdan
2015-04-09 10:48     ` Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1427964339-8231-1-git-send-email-ofourdan@redhat.com \
    --to=ofourdan@redhat.com \
    --cc=airlied@redhat.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.