From: Alex Williamson <alex.williamson@redhat.com>
To: "C Bergström" <cbergstrom@pathscale.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
David Airlie <airlied@linux.ie>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
DRI <dri-devel@lists.freedesktop.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Stupid NVIDIA 3D vgaarb.c patch
Date: Mon, 22 Sep 2014 15:54:52 -0600 [thread overview]
Message-ID: <1411422892.1199.173.camel@ul30vt.home> (raw)
In-Reply-To: <CAOnawYp4QLq+k9__BKcAapHQyShYa93B9S7rbt30Jv3z+Dm9XA@mail.gmail.com>
On Tue, 2014-09-23 at 04:20 +0700, C Bergström wrote:
> For clarity - My testing and the patch is required when the Intel driver
> isn't being used at all. After I finish some other testing I can see if
> bumblebee and intel driver + this patch will play nicely.
>
> How is a laptop with dual VGA controllers any different than if one
> identifies itself as a "3D controller"?
With dual VGA controllers, we can change VGA routing in the chipset so
that we can address one device or the other using the VGA address space.
This lets things like Xorg switch between cards to initialize a card via
the VGA BIOS or execute runtime VGA BIOS calls. If one of those devices
reports itself as a 3D controller, then we have no reason to believe
that the device actually responds to VGA accesses or that the PCI ROM
payload includes a VGA BIOS.
Maybe that's how the arbiter device registration should work, if the
class code is VGA add it, if it's 3D controller, switch VGA routing and
see if it responds to VGA. There are still a couple problems that I've
been beating my head against though. First, i915 lies when it opts-out
of VGA arbitration, so you might think you've found a VGA device
elsewhere, but you're actually still talking to IGD. Second is the Xorg
DRI problem where it's going to disable DRI support if suddenly a second
arbitration participant appears. This is what happened when I tried to
fix the i915 problem and suddenly anybody with IGD + plugin graphics
lost DRI and the fix was reverted. The whole thing is pretty broken.
In this case, if your laptop actually supports disabling and hiding the
IGD device, I'd expect the Nvidia device to switch to reporting itself
as VGA. It seems like often the Optimus graphics aren't even directly
connected to an output device, which makes me curious that you can
actually pick one or the other. Thanks,
Alex
> On Tue, Sep 23, 2014 at 4:15 AM, Alex Williamson <alex.williamson@redhat.com
> > wrote:
>
> > On Mon, 2014-09-22 at 13:43 -0700, Linus Torvalds wrote:
> > > Adding proper people and mailing lists..
> > >
> > > The PCI_CLASS_DISPLAY_VGA test goes back to the very beginning by
> > > BenH, and I have no idea if adding PCI_CLASS_DISPLAY_3D is
> > > appropriate, but hopefully somebody does. The fact that it makes
> > > things work certainly argues fairly convincingly for it, but I want
> > > some backup here.
> > >
> > > Dave, BenH?
> >
> > TBH, it seems pretty dubious to me. There's nothing in the spec that
> > would give us reason to believe that a device with a 3D controller class
> > code requires VGA arbitration. Also, if this controller starts
> > participating in arbitration then this same laptop will likely disable
> > DRI when Intel is the primary graphics due to Xorg wanting to mmap VGA
> > MMIO space. I'm not sure what the solution is, but unfortunately it's
> > likely to be much more complicated than this patch. Thanks,
> >
> > Alex
> >
> > > Christopher(?), can you please also specify which laptop etc. And the
> > > patch itself seems to have come from somebody else, unless you're
> > > Lekensteyn. So we'd want to get the provenance of that too.
> > >
> > > Linus
> > >
> > > On Mon, Sep 22, 2014 at 1:28 PM, C Bergström <cbergstrom@pathscale.com>
> > wrote:
> > > > Hi Linus,
> > > >
> > > > I don't know who the original author is and I can have one of the
> > distro
> > > > graphics friends review it, but I need this patch below to get NVIDIA
> > > > drivers to work (without using any Intel graphics) on my laptop
> > > > http://pastebin.com/wpmFi38k
> > > >
> > > > Sorry - I know this is not the proper way to submit a patch, but it's
> > > > trivial and I'm not a kernel dev.
> > > >
> > > > Thanks
> > > >
> > > > ./C
> >
> >
> >
> >
next prev parent reply other threads:[~2014-09-22 22:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAOnawYp7kv7Zjn4j-j4-TUOshE9G1uXWEqXB_=RHePNwNLmwWA@mail.gmail.com>
2014-09-22 20:43 ` Linus Torvalds
2014-09-22 21:15 ` Alex Williamson
[not found] ` <CAOnawYp4QLq+k9__BKcAapHQyShYa93B9S7rbt30Jv3z+Dm9XA@mail.gmail.com>
2014-09-22 21:54 ` Alex Williamson [this message]
2014-09-22 22:10 ` Alex Deucher
2014-09-27 11:01 ` Pasi Kärkkäinen
2014-09-24 1:55 ` Alex Deucher
[not found] ` <CAOnawYrxZA-O7xSges2LmDrmaZ__MnE7LyDfR2VLrdy+i_9VpQ@mail.gmail.com>
2014-09-23 14:22 ` Peter Wu
2014-09-23 16:25 ` Bruno Prémont
2014-09-23 20:29 ` Benjamin Herrenschmidt
2014-09-26 21:08 ` Aaron Plattner
2014-09-26 21:13 ` Ilia Mirkin
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=1411422892.1199.173.camel@ul30vt.home \
--to=alex.williamson@redhat.com \
--cc=airlied@linux.ie \
--cc=benh@kernel.crashing.org \
--cc=cbergstrom@pathscale.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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
all inboxes | Powered by JetHome®