mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Ed Tomlinson <edt@aei.ca>, Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	LKML <linux-kernel@vger.kernel.org>,
	David Herrmann <dh.herrmann@gmail.com>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	linux-fbdev@vger.kernel.org,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Dave Airlie <airlied@linux.ie>
Subject: Re: [Intel-gfx] [PATCH 5/5] drm/i915: Kick out vga console
Date: Mon, 7 Jul 2014 10:48:26 +0200	[thread overview]
Message-ID: <20140707084826.GH5821@phenom.ffwll.local> (raw)
In-Reply-To: <20140630065955.GD7687@nuc-i3427.alporthouse.com>

On Mon, Jun 30, 2014 at 07:59:55AM +0100, Chris Wilson wrote:
> 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:
> 
> 
> 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);

Hm, we should only conditionalize the take_over_console - unregistering
vga_con is kinda the point to make sure it's gone for real. Ed, can you
please retest with the if (con_is_bound) check just for the
do_take_over_console call?

Still puzzled wtf is going on here since as David says this should be a
no-op.

Thanks, Daniel
> +
> +                       /* Ignore "already unregistered". */
> +                       if (ret == -ENODEV)
> +                               ret = 0;
> +               }
>         }
>         console_unlock();
> 
> -Chris
> 
> -- 
> Chris Wilson, Intel Open Source Technology Centre
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  parent reply	other threads:[~2014-07-07  8:48 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-05 14:58 [PATCH 1/5] vt: Fix replacement console check when unbinding Daniel Vetter
2014-06-05 14:58 ` [PATCH 2/5] vt: Fix up unregistration of vt drivers Daniel Vetter
2014-06-06  7:24   ` David Herrmann
2014-06-06  7:56     ` Daniel Vetter
2014-06-06  8:47       ` David Herrmann
2014-06-06  9:40         ` Daniel Vetter
2014-06-06 15:51           ` Greg Kroah-Hartman
2014-06-06 20:21             ` [Intel-gfx] " Daniel Vetter
2014-06-05 14:58 ` [PATCH 3/5] vt: Don't ignore unbind errors in vt_unbind Daniel Vetter
2014-06-06  7:13   ` David Herrmann
2014-06-05 14:58 ` [PATCH 4/5] drm/i915: Fixup global gtt cleanup Daniel Vetter
2014-06-06 13:22   ` Imre Deak
2014-06-05 14:58 ` [PATCH 5/5] drm/i915: Kick out vga console Daniel Vetter
2014-06-06  7:28   ` David Herrmann
2014-06-06  7:47     ` Daniel Vetter
2014-06-06 15:20   ` Daniel Vetter
2014-06-09 13:22     ` Tomi Valkeinen
     [not found]   ` <1602327.OGkKxHtt2b@grover>
2014-06-29  3:55     ` Ed Tomlinson
2014-06-30  6:59       ` Chris Wilson
2014-06-30  8:19         ` David Herrmann
2014-07-01 13:51         ` Ed Tomlinson
2014-07-07  8:48         ` Daniel Vetter [this message]
2014-07-07 10:45           ` [Intel-gfx] " Ed Tomlinson
2014-07-07 12:26             ` Daniel Vetter
2014-07-08  2:53               ` Ed Tomlinson
2014-07-08  8:10                 ` Daniel Vetter
2014-07-07 10:59           ` Ed Tomlinson
2014-06-06  7:16 ` [PATCH 1/5] vt: Fix replacement console check when unbinding David Herrmann
2014-06-06  7:49   ` Daniel Vetter
2014-06-06  9:43 ` [PATCH] " Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140707084826.GH5821@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dh.herrmann@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=edt@aei.ca \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=plagnioj@jcrosoft.com \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome