Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753012AbaGGM0w (ORCPT ); Mon, 7 Jul 2014 08:26:52 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:45799 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752933AbaGGM0v (ORCPT ); Mon, 7 Jul 2014 08:26:51 -0400 Date: Mon, 7 Jul 2014 14:26:54 +0200 From: Daniel Vetter To: Ed Tomlinson Cc: Chris Wilson , Intel Graphics Development , DRI Development , LKML , David Herrmann , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , linux-fbdev@vger.kernel.org, Jani Nikula , Dave Airlie Subject: Re: [Intel-gfx] [PATCH 5/5] drm/i915: Kick out vga console Message-ID: <20140707122654.GQ5821@phenom.ffwll.local> Mail-Followup-To: Ed Tomlinson , Chris Wilson , 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> <20140630065955.GD7687@nuc-i3427.alporthouse.com> <20140707084826.GH5821@phenom.ffwll.local> <1974170.pJAPFfvtjC@grover> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1974170.pJAPFfvtjC@grover> X-Operating-System: Linux phenom 3.15.0-rc3+ User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 07, 2014 at 06:45:49AM -0400, Ed Tomlinson wrote: > Daniel, > > I am not quite sure I understand what you want me to test? > Do you want me to try it without: > > > > + if (ret == 0) { > > > + ret = do_unregister_con_driver(&vga_con); Below the diff of what I mean. -Daniel diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 5e583a1838f8..bd8517151479 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -1466,12 +1466,13 @@ 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 (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); -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/