From patchwork Mon Jun 30 06:59:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 4445951 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8F423BEEAA for ; Mon, 30 Jun 2014 07:00:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A4ED2202C8 for ; Mon, 30 Jun 2014 07:00:27 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 7885D202F8 for ; Mon, 30 Jun 2014 07:00:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 642A46E37F; Mon, 30 Jun 2014 00:00:25 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fireflyinternet.com (mail.fireflyinternet.com [87.106.93.118]) by gabe.freedesktop.org (Postfix) with ESMTP id C38C46E375; Mon, 30 Jun 2014 00:00:22 -0700 (PDT) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from nuc-i3427.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 27020802-1500048 for multiple; Mon, 30 Jun 2014 08:00:43 +0100 Received: by nuc-i3427.alporthouse.com (sSMTP sendmail emulation); Mon, 30 Jun 2014 07:59:55 +0100 Date: Mon, 30 Jun 2014 07:59:55 +0100 From: Chris Wilson To: Ed Tomlinson Subject: Re: [PATCH 5/5] drm/i915: Kick out vga console Message-ID: <20140630065955.GD7687@nuc-i3427.alporthouse.com> Mail-Followup-To: Chris Wilson , Ed Tomlinson , Daniel Vetter , Intel Graphics Development , DRI Development , LKML , David Herrmann , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , linux-fbdev@vger.kernel.org, Jani Nikula , Dave Airlie References: <1401980308-5116-1-git-send-email-daniel.vetter@ffwll.ch> <1401980308-5116-5-git-send-email-daniel.vetter@ffwll.ch> <1602327.OGkKxHtt2b@grover> <3945293.Jtp4nyZMfX@grover> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <3945293.Jtp4nyZMfX@grover> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: linux-fbdev@vger.kernel.org, Daniel Vetter , Intel Graphics Development , LKML , DRI Development , Tomi Valkeinen , Jean-Christophe Plagniol-Villard X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 On Sat, Jun 28, 2014 at 11:55:19PM -0400, Ed Tomlinson wrote: > On Saturday 28 June 2014 15:28:22 Ed Tomlinson wrote: > > Resend without html krud which causes list to bounce the message. > > > Hi > > > > This commit ( a4de05268e674e8ed31df6348269e22d6c6a1803 ) hangs my boot with 3.16-git. Reverting it lets the boot proceed. > > > > I have an i7 with a built-in i915 and an pcie r7 260x. The R7 is the primary console. The i915 is initialized > > but does not have a physical display attached. > > > > With the patch applied the boot stops at the messages: > > > > [drm] Memory usable by graphics device = 2048M > > [drm] Replacing VGA console driver The issue looks like that we are ripping out the radeon fb_con whilst it is active and that upsets everyone. In which case, I think the compromise is: -Chris diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 5f44581..4915f1d 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -1439,18 +1439,20 @@ static int i915_kick_out_vgacon(struct drm_i915_private *dev_priv) #else static int i915_kick_out_vgacon(struct drm_i915_private *dev_priv) { - int ret; + int ret = 0; DRM_INFO("Replacing VGA console driver\n"); console_lock(); - ret = do_take_over_console(&dummy_con, 0, MAX_NR_CONSOLES - 1, 1); - if (ret == 0) { - ret = do_unregister_con_driver(&vga_con); - - /* Ignore "already unregistered". */ - if (ret == -ENODEV) - ret = 0; + if (con_is_bound(&vga_con)) { + ret = do_take_over_console(&dummy_con, 0, MAX_NR_CONSOLES - 1, 1); + if (ret == 0) { + ret = do_unregister_con_driver(&vga_con); + + /* Ignore "already unregistered". */ + if (ret == -ENODEV) + ret = 0; + } } console_unlock();