All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 1/2] drm: move i915_kick_out_vgacon to drm_fb_helper
Date: Thu, 21 Feb 2019 15:19:37 +0100	[thread overview]
Message-ID: <20190221141937.GS2665@phenom.ffwll.local> (raw)
In-Reply-To: <20190221123933.2u2zklp42oyk4ond@sirius.home.kraxel.org>

On Thu, Feb 21, 2019 at 01:39:33PM +0100, Gerd Hoffmann wrote:
> > > +/**
> > > + * drm_fb_helper_kick_out_vgacon - deactivate vgacon driver.
> > > + *
> > > + * Deactivate vgacon driver so it stops accessing vga io ports.
> > > + * Should be called after
> > > + * drm_fb_helper_remove_conflicting_pci_framebuffers().
> > 
> > Why after? i915 calls this before kicking out the fbdev drivers ...
> 
> No, it doesn't:
> 
> <quote>
> 	/*
> 	 * WARNING: Apparently we must kick fbdev drivers before vgacon,
> 	 * otherwise the vga fbdev driver falls over.
> 	 */
> 	ret = i915_kick_out_firmware_fb(dev_priv);
> 	if (ret) {
> 		DRM_ERROR("failed to remove conflicting framebuffer drivers\n");
> 		goto err_ggtt;
> 	}
> 
> 	ret = i915_kick_out_vgacon(dev_priv);
> 	if (ret) {
> 		DRM_ERROR("failed to remove conflicting VGA console\n");
> 		goto err_ggtt;
> 	}
> </quote>

/me collects special prize for failing to remove blinders before replying

And indeed this has reasons:

commit 0485c9dc24ec0939b42ca5104c0373297506b555 (tag: drm-intel-fixes-2014-11-19)
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Fri Nov 14 10:09:49 2014 +0100

    drm/i915: Kick fbdev before vgacon
    
    It's magic, but it seems to work.
    
    This fixes a regression introduced in
    
    commit 1bb9e632a0aeee1121e652ee4dc80e5e6f14bcd2
    Author: Daniel Vetter <daniel.vetter@ffwll.ch>
    Date:   Tue Jul 8 10:02:43 2014 +0200
    
        drm/i915: Only unbind vgacon, not other console drivers
    
    My best guess is that the vga fbdev driver falls over if we rip out
    parts of vgacon. Hooray.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82439
    Cc: stable@vger.kernel.org (v3.16+)
    Reported-and-tested-by: Lv Zheng <lv.zheng@intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
    Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
    Signed-off-by: Jani Nikula <jani.nikula@intel.com>

I think given that even more reasons that the pci helper should
automatically kick out all the things, in the right order. And perhaps
cite the above commit in the commit message somewhere.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-02-21 14:19 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-21 11:35 [PATCH v2 0/2] drm/qxl: kick out vgacon Gerd Hoffmann
2019-02-21 11:35 ` [PATCH v2 1/2] drm: move i915_kick_out_vgacon to drm_fb_helper Gerd Hoffmann
2019-02-21 12:11   ` Daniel Vetter
2019-02-21 12:39     ` Gerd Hoffmann
2019-02-21 14:19       ` Daniel Vetter [this message]
2019-02-21 13:08   ` Jani Nikula
2019-02-21 13:08     ` Jani Nikula
2019-02-21 13:25     ` Gerd Hoffmann
2019-02-21 14:41       ` Jani Nikula
2019-02-21 14:41         ` Jani Nikula
2019-02-21 14:12   ` Noralf Trønnes
2019-02-21 14:12     ` Noralf Trønnes
2019-02-21 15:09     ` Gerd Hoffmann
2019-02-21 15:51       ` Daniel Vetter
2019-02-21 15:51         ` Daniel Vetter
2019-02-21 11:35 ` [PATCH v2 2/2] drm/qxl: kick out vgacon Gerd Hoffmann
2019-02-21 11:35   ` Gerd Hoffmann
2019-02-21 12:20   ` Daniel Vetter
2019-02-21 12:20   ` Daniel Vetter
2019-02-21 12:20     ` Daniel Vetter
2019-02-21 13:06     ` Gerd Hoffmann
2019-02-21 13:06       ` Gerd Hoffmann
2019-02-21 14:24       ` Daniel Vetter
2019-02-21 14:24       ` Daniel Vetter
2019-02-21 13:06     ` Gerd Hoffmann
2019-02-21 15:11     ` Gerd Hoffmann
2019-02-21 15:11     ` Gerd Hoffmann
2019-02-21 15:11       ` Gerd Hoffmann
2019-02-21 15:17       ` Daniel Vetter
2019-02-22  7:14         ` Gerd Hoffmann
2019-02-22  7:14         ` Gerd Hoffmann
2019-02-21 15:17       ` Daniel Vetter
2019-02-21 11:35 ` Gerd Hoffmann

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=20190221141937.GS2665@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kraxel@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.