dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: make fbdev/fbcon switchable per driver?
Date: Tue, 31 Jan 2017 09:00:19 +0100	[thread overview]
Message-ID: <20170131080019.7g6duliyfjgihti6@phenom.ffwll.local> (raw)
In-Reply-To: <20170130104522.3a814aea@t450s.home>

On Mon, Jan 30, 2017 at 10:45:22AM -0700, Alex Williamson wrote:
> On Mon, 30 Jan 2017 09:15:50 +0100
> Gerd Hoffmann <kraxel@redhat.com> wrote:
> 
> >   Hi,
> > 
> > > The vgaarb code has a concept of a vga_default_device(), it's rather
> > > PCI-centric, but maybe better than nothing.  This is typically the
> > > first VGA class code device found with I/O and MMIO enabled.  If fbcon
> > > defaulted to running on the vga_default_device(), a user could select
> > > which to use by re-ordering the VM hardware.  
> > 
> > The qemu drivers don't register as vgaarb clients though.  Which easily
> > explains why igd always wins the primary selection, no matter how you
> > order your hardware.
> > 
> > So, should they register?  The drivers don't need access to the vga
> > registers[1][2].
> 
> The VGA arbiter sets up a notifier on the PCI bus and will add any VGA
> class code devices it finds.  So even if the driver doesn't
> participate, it'll still be tracked and might be marked as primary.  If
> a graphics driver claims a VGA device that does not depend on VGA
> region access then the driver should configure the device not to claim
> VGA accesses (maybe only relevant for integrated graphics - i915 gets
> this wrong), and register with the arbiter to opt-out of VGA
> arbitration.  Picking a "primary" can be done w/o any of that latter if
> we agree on the arbiter algorithm of picking the first device with VGA
> routing to it (or it can be overridden by arch/platform code).  Thanks,

Fyi we don't get this wrong, we indeed need vga access in some cases.
Broken hw :( The other issue is that the X server asks for vga access (or
at least did in the past) for every render op, even if it's a kms driver.
Which makes X crawl if you have multi-gpu system. Those two things
combined means vgaarb is essentially dead on any system with intel gfx.
-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:[~2017-01-31  8:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27 10:00 make fbdev/fbcon switchable per driver? Gerd Hoffmann
2017-01-27 14:02 ` Daniel Vetter
2017-01-27 14:41   ` Liviu Dudau
2017-01-27 18:30 ` Alex Williamson
2017-01-30  8:15   ` Gerd Hoffmann
2017-01-30 17:45     ` Alex Williamson
2017-01-31  8:00       ` Daniel Vetter [this message]
2017-01-31 10:06         ` 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=20170131080019.7g6duliyfjgihti6@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=alex.williamson@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).