From patchwork Mon May 30 08:38:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9140451 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 C35F060759 for ; Mon, 30 May 2016 08:39:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9F6D27D17 for ; Mon, 30 May 2016 08:39:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AEE172821C; Mon, 30 May 2016 08:39:27 +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 7189727D17 for ; Mon, 30 May 2016 08:39:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 45B226E6CD; Mon, 30 May 2016 08:39:04 +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 385096E6C4 for ; Mon, 30 May 2016 08:38:58 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id e3so20242588wme.2 for ; Mon, 30 May 2016 01:38:58 -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=STH7Fj5eisXQQrD5kPJW9uSX/aPk3CEUCL6+CeDOkTXf/YUq0Hk7YLszP56iDuIo84 yzLBmd+wSxIsvEe4qrk1XJ52L6w+xdwERYzyS1XQTCAcXiStrDZjjrDN8+V88F2McKN0 eXAwx7u8ikdkjiDmzP95fIYz1EOjQiAoyAgJcTpWYx2MsbfVfveKhH1L/rYRxjz0lvYk L3mbV+8l2qAvMvEXkaF7MW+toMP5sX1DSH3r7brRXZcY+X0GTAIM2xkxeBjdtpzCdhrO h8Kk3ONMr4ORXHtKbmwHgE8jOttEEbpd86KaNZMZNcChROclz1wuMLL5zMw3JEX+C0/W oBnA== 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=fFIYtJBR9tT+qt0bVpRNabKGbZLU+DjKssXCOsd7Jw308Hmqb8mt2II4oANl9N+PzL xuXxPV0NYILGkibxtpd3eqLbWW/AT+YWmxJN8PquEQx/J7KrRnhojvMCoiMIuuRjy02E 9lx0DGGvCbiYgh+VGsfH1qj/csZGMQITN1+E5op6+fTvrv8GS8ml0F3ADIrueghiU8N6 jPdfQ+Q8Dt1PCtq37o5T9+DQTXNkmaUTnl4pPb0dBET3yDZm5wsx1jedPJpJep1pJ9GX nwra8ysHFyhqZwWw6+pom/oWFp38ug+ALhSZuLwjhIN8C+9ldOpFDb9lHKiyoACi6vf2 HADw== X-Gm-Message-State: ALyK8tKXpt4mOov+iTSYM0JLCnEBcvrkGf01txHxhFHb62cy9YfOCT0PrE4/pqai5oGAtg== X-Received: by 10.28.85.3 with SMTP id j3mr10523958wmb.0.1464597536212; Mon, 30 May 2016 01:38:56 -0700 (PDT) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id l9sm6945376wjm.0.2016.05.30.01.38.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 May 2016 01:38:55 -0700 (PDT) From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Mon, 30 May 2016 09:38:24 +0100 Message-Id: <1464597519-16659-7-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1464597519-16659-1-git-send-email-chris@chris-wilson.co.uk> References: <1464597519-16659-1-git-send-email-chris@chris-wilson.co.uk> Subject: [Intel-gfx] [PATCH v2 06/21] 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); } /**