From patchwork Fri Jun 3 14:36:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9153249 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E79BF60221 for ; Fri, 3 Jun 2016 14:38:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D87E126C9B for ; Fri, 3 Jun 2016 14:38:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCF9A282E8; Fri, 3 Jun 2016 14:38:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6031026C9B for ; Fri, 3 Jun 2016 14:38:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4EA656EDC5; Fri, 3 Jun 2016 14:37:36 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id AE37D6EDB9 for ; Fri, 3 Jun 2016 14:37:30 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id a136so24152928wme.0 for ; Fri, 03 Jun 2016 07:37:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=a6bvePDqFi6wm4X6fAjzYXA+3wJP3JME7z76oClS0CQ=; b=Jxo08sGbhj+FaxuN8RcyJg9HW2BB8R/GhxdOL2XikpVJOvA+vi+qoAJF+ho0eQiqMz 8hQqhfEEJ8Xr8tHKy5eF7Njb3HM/tiYFXExTyD4x+XTml85+5AbzBxwKkkf/fFzyKm7g 91Z720Vt92KCaWM8YmuPdMuyuBGUrAqukmBIPqjNHc5xlWwf5JPmwYcN9+r7qzO2A0tI mPUE2T8eazxZ/OYP5sBdRCP7cmVYOOdHUUiQVOlmqmyK3mPE+QWTiHEYCrBQRfzhh3b+ XJVBX5jotJKOJJZ3zH53bZqn62ON8m+3iVsjiPzKEWYiw4LdDMSxnqKYHUP+tlMPGHos mdyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=a6bvePDqFi6wm4X6fAjzYXA+3wJP3JME7z76oClS0CQ=; b=jHNKqLLLXKGGRyNSNmahKBbu1cYGqQff5ivEaehajQwA40MTTx+mcVaTddpcENddht Z/tPQUJYRxN+VcF+IptLLHnaLtgkGCa8B5ego5nl/zug7dNGK+8/+ypxaXMqCKfBTqZN quAJ7ixb0SGnkl6PV4kOn35DMhBIlTAAG7e81VvoocPA1TDNQ9rx2Psvybf1ai+HSOhf 4X8rILEIY2sMFRUdU8SlQS7EyLv3dw+mN/CWY7cHCYO0OUIbhuLwI2V9us1WY+Gap2wB JmOJV+fdGfwAEUx5QfAOhQpeve3imnJ1nQt9+JrnNFf3zZppVxKLVNld47E+Oy9Ancu5 ZqrA== X-Gm-Message-State: ALyK8tJsJLBn7/5tqH9NShEUZxzDvoQCayS+kuEilUT2p88JiGXeYVcde0mr/CQXh5JFow== X-Received: by 10.195.17.225 with SMTP id gh1mr3855541wjd.116.1464964648717; Fri, 03 Jun 2016 07:37:28 -0700 (PDT) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id e1sm6060275wjv.9.2016.06.03.07.37.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Jun 2016 07:37:28 -0700 (PDT) From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Fri, 3 Jun 2016 15:36:50 +0100 Message-Id: <1464964636-3877-8-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1464964636-3877-1-git-send-email-chris@chris-wilson.co.uk> References: <1464964636-3877-1-git-send-email-chris@chris-wilson.co.uk> Subject: [Intel-gfx] [PATCH v3 07/33] drm/i915: Perform async fbdev initialisation much later 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-Virus-Scanned: ClamAV using ClamSMTP Setting up fbdev requires everything ready and registered (in particular the connectors). In the next patch, we defer registration of the KMS objects and unless we defer setting off fbdev, it may run before they are registered and oops. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_dma.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 07edaed9d5a2..650b3f7e2a8e 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -525,18 +525,6 @@ static int i915_load_modeset_init(struct drm_device *dev) /* Only enable hotplug handling once the fbdev is fully set up. */ intel_hpd_init(dev_priv); - /* - * Some ports require correctly set-up hpd registers for detection to - * work properly (leading to ghost connected connector status), e.g. VGA - * on gm45. Hence we can only set up the initial fbdev config after hpd - * irqs are fully enabled. Now we should scan for the initial config - * only once hotplug handling is enabled, but due to screwed-up locking - * around kms/fbdev init we can't protect the fdbev initial config - * scanning against hotplug events. Hence do this first and ignore the - * tiny window where we will loose hotplug notifactions. - */ - intel_fbdev_initial_config_async(dev); - drm_kms_helper_poll_init(dev); return 0; @@ -1384,6 +1372,18 @@ static void i915_driver_register(struct drm_i915_private *dev_priv) intel_gpu_ips_init(dev_priv); i915_audio_component_init(dev_priv); + + /* + * Some ports require correctly set-up hpd registers for detection to + * work properly (leading to ghost connected connector status), e.g. VGA + * on gm45. Hence we can only set up the initial fbdev config after hpd + * irqs are fully enabled. Now we should scan for the initial config + * only once hotplug handling is enabled, but due to screwed-up locking + * around kms/fbdev init we can't protect the fdbev initial config + * scanning against hotplug events. Hence do this first and ignore the + * tiny window where we will loose hotplug notifactions. + */ + intel_fbdev_initial_config_async(dev); } /**