From patchwork Wed Jun 15 12:17:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9178373 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 1EDEB60831 for ; Wed, 15 Jun 2016 12:19:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 100DB27BFC for ; Wed, 15 Jun 2016 12:19:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 04FB127CEA; Wed, 15 Jun 2016 12:19:10 +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 B117527C26 for ; Wed, 15 Jun 2016 12:19:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 66F996E924; Wed, 15 Jun 2016 12:18:59 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id D2FF56E928 for ; Wed, 15 Jun 2016 12:18:56 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id k184so5531639wme.2 for ; Wed, 15 Jun 2016 05:18:56 -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=kAOuWr0BfKgYnGHNSoqR702smZVRvHpBkhzCMgBQlCE=; b=WKm8FDZlu44CTYdoHaYO219C6hgW+jCwxId0/JuJSsQOYb/s1fbOsp2o/XC+cg1hms wAJTFbhPHYCQX6JP05E+y4KIP95LI7F4LG2u7sOrCcSxZhXIfpNNa1Qc7Ud5VB41Kr22 D3Kix2n2FUvZa2Ddeb4l/2hnVwRY538lSCin19am/qdMNilsh8zoVGIzY8NCp+sw4Btm 5RWz9LWnFjlBhs/T1EH33cA5ATRUhC9ZU/mWvpk+cstKRkyFWNcEwOkWQv1VdRmjQ4nB 08p1fq66JcFx4i4HoqtjwdLK7CNpXUPg+sRLMIXLlz+ZEqvjJO8bhvDf/ZT2zibbwLBm G1mA== 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=kAOuWr0BfKgYnGHNSoqR702smZVRvHpBkhzCMgBQlCE=; b=lTIhQhSIAvNkLzzdhVk+VmlOcZTM6jri1eMtIrRpZWAChY4xXycU98R6nFc3wEnVNP 072TRlscvvNE9nY+ignactSIjJcILaon/Ad95WMh+kke6GWMZ90O/jScHZoZKMe+CzZ4 zpXz98GzD1fD9TNNs5XBN+GOF7Jx1XunKXMGgSJwOATunpk9hJGCN/nw4/WfdT+31/+p VIZb2daD/Rp1z6KPsQUIPK8j9jC3zPiTkE3U8mbVXXF+MrPOyIsiLuDJ3q5QRvtQIR8B XgKC4G00X4iYgTNYqcDUtyEqhWrcKlAWG6julCG7FitNy2D6WanCJm8VMpBRI2uUa/OZ YG6g== X-Gm-Message-State: ALyK8tJpWDJIIdAZQCiVmLZVLFE0trpIWJpekQxpsErXBkpEg6G8Walk66FYeCWVXKlU5Q== X-Received: by 10.195.11.103 with SMTP id eh7mr11120156wjd.56.1465993134997; Wed, 15 Jun 2016 05:18:54 -0700 (PDT) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id jf3sm7450242wjb.41.2016.06.15.05.18.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Jun 2016 05:18:54 -0700 (PDT) From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Wed, 15 Jun 2016 13:17:59 +0100 Message-Id: <1465993109-19523-15-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1465993109-19523-1-git-send-email-chris@chris-wilson.co.uk> References: <1465993109-19523-1-git-send-email-chris@chris-wilson.co.uk> Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 14/44] 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 24b670f72ed4..0127e969a912 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; @@ -1413,6 +1401,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); } /**