From patchwork Thu Apr 2 08:45:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Fourdan X-Patchwork-Id: 6145501 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8F53B9F1BE for ; Thu, 2 Apr 2015 08:46:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D2E1E20306 for ; Thu, 2 Apr 2015 08:46:04 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4CC4B202E6 for ; Thu, 2 Apr 2015 08:46:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6D6B96E40F; Thu, 2 Apr 2015 01:45:59 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTP id C57C76E40F for ; Thu, 2 Apr 2015 01:45:58 -0700 (PDT) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 196352F02B1 for ; Thu, 2 Apr 2015 08:45:58 +0000 (UTC) Received: from t440s.redhat.com (vpn1-5-116.ams2.redhat.com [10.36.5.116]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t328juei004658; Thu, 2 Apr 2015 04:45:56 -0400 From: Olivier Fourdan To: intel-gfx@lists.freedesktop.org Date: Thu, 2 Apr 2015 10:45:39 +0200 Message-Id: <1427964339-8231-1-git-send-email-ofourdan@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 Cc: Dave Airlie Subject: [Intel-gfx] [PATCH] uxa: Do not use RandR in hotplug if not available X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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;