From patchwork Mon Jul 7 12:26:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 4494621 Return-Path: X-Original-To: patchwork-linux-fbdev@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 E19E2BEEAA for ; Mon, 7 Jul 2014 12:26:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2690F2022A for ; Mon, 7 Jul 2014 12:26:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3A84720225 for ; Mon, 7 Jul 2014 12:26:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752928AbaGGM0p (ORCPT ); Mon, 7 Jul 2014 08:26:45 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:38620 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752857AbaGGM0p (ORCPT ); Mon, 7 Jul 2014 08:26:45 -0400 Received: by mail-wi0-f172.google.com with SMTP id hi2so15853635wib.5 for ; Mon, 07 Jul 2014 05:26:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=8zhIVFNUingAzDhOeoNXUZOoS+9wbwUKvZ1FI9+Tu10=; b=jzvRrx7bVTAxZ2Pz6hUL6NrBN38JxXphzPRWlEoT4SPhFr5o5KqF4RWI2Qir3QKaaY ZXc4eGmnQcULoHyAv8YSrhHMKfYvbRDjlyTL4jrfV0o5GorMZAYwYiJ9eX401J0oyEKp Rbul7VOP5i+0oPaHWi6sxFMvpuQXd1bTxB5Og= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=8zhIVFNUingAzDhOeoNXUZOoS+9wbwUKvZ1FI9+Tu10=; b=OobqYI9InqBHb1ipzKS/+aVRxioOTnbfYDNdqqLaNnxU5zJr2nlTaEDOTugZ5xNqZ0 ZRQnZ9i/vzyQLBgL3FUqN8WLVk8lWT/oLEV2HSLhHGx7LTwcvhDpYDssHSBQV6FBZjpw /d+qe6CBxsRaN68iLQFqtZz+/War6s1TMbJ1XflaVXVPBbBPFLgt5qDY3mZxCi9KiegG wxa/7fLsF1/j/1M+DQ8RzHA2tebZlBcCZ10HaPfar/2b3uevd0srnwLOsTLpGtNg4X0G EoVWnKWAiTFge8/uzgR5QN6u1EGdIUngAl2/hVxdjoPPIxPHa6iaOrzhtHwHJ3+ruFLs hEIg== X-Gm-Message-State: ALoCoQmk8hVRhGJLReTBOtALkEdrRme6NMIHqWfu1Gs22AejKU4FK3uCeVBMQbybp3z6QEjzn4if X-Received: by 10.180.13.230 with SMTP id k6mr76057228wic.1.1404736003948; Mon, 07 Jul 2014 05:26:43 -0700 (PDT) Received: from phenom.ffwll.local (84-73-67-144.dclient.hispeed.ch. [84.73.67.144]) by mx.google.com with ESMTPSA id wp6sm89151689wjb.9.2014.07.07.05.26.41 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 07 Jul 2014 05:26:42 -0700 (PDT) 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-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-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 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);