From: "Bruno Prémont" <bonbons@linux-vserver.org>
To: Michael Marineau <michael.marineau@coreos.com>
Cc: Darren Hart <dvhart@infradead.org>,
Bjorn Helgaas <bhelgaas@google.com>,
platform-driver-x86@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Petri Hodju <petrihodju@yahoo.com>,
Matthew Garrett <matthew.garrett@nebula.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [Patch v3] apple-gmux: lock iGP IO to protect from vgaarb changes
Date: Wed, 27 May 2015 08:13:23 +0200 [thread overview]
Message-ID: <20150527081323.35a3cf88@pluto.restena.lu> (raw)
In-Reply-To: <CAGr1u3t1+ktKG_v74nQ2H6txGcWSwBBfsWS74k0Ao2pNTvgAng@mail.gmail.com>
On Tue, 26 May 2015 22:35:46 -0700 Michael Marineau wrote:
> On Tue, May 26, 2015 at 9:47 PM, Darren Hart <dvhart@infradead.org> wrote:
> > On Tue, May 26, 2015 at 12:10:48PM -0700, Michael Marineau wrote:
> >> FYI, this actually broke backlight controls on my MBP11,3 because the
> >> assumption the patch makes that gmux is always loaded before graphics
> >> drivers didn't hold true. At least for me dracut included the nouveau
> >> module in the initrd but not gmux, ensuring the ordering was wrong. No
> >> errors were reporting, and gmux still offered the backlight device, it
> >> just became inoperable. I worked around this for my kernel by building
> >> gmux into vmlinuz instead of as a module but that isn't going to in
> >> more general configs because there is an apple backlight driver which
> >> cannot be built at all in that configuration.
> >>
> >
> > Thank you for reporting this Michael,
> >
> > That is tough as nouveau doesn't have an explicit dependency on gmux, so we
> > could do something like a passive request_module(), but if it isn't in the
> > initrd image, it would still fail as you describe.
> >
> >> Is there a way to make the ordering between nouveau and gmux more
> >> explicit/reliable? Can gmux complain loudly if the ordering is ever
> >> wrong?
> >
> > It should print an error if the probe fails due to the IO already being in use
> > or if it can't be allocated. The disabled IO case is only info level though,
> > perhaps that should be higher priority. Printing something when failing to probe
> > seems like a reasonable thing to do.
> >
> > Michael, which message do you get if you boot with "debug" or "loglevel=6" when
> > apple-gmux is not built-in?
>
> No error, gmux claims it worked:
> [ 13.693379] apple_gmux: Found gmux version 4.0.8 [indexed]
> [ 13.693400] vgaarb: device changed decodes:
> PCI:0000:01:00.0,olddecodes=io+mem,decodes=io+mem:owns=none
> [ 13.693404] apple_gmux: locked IO for PCI:0000:01:00.0
>
> Full dmesg: https://gist.github.com/marineam/0e5a23548e8b3b2e1d50
What GPUs are there in your MBP11,3? From your dmesg it looks like all
you have is NVIDIA GPU 0000:01:00.0 (lspci?).
Is there a somehow hidden intel GPU around doing the backlight?
If so my locking does the wrong thing for your system as:
[ 0.393298] vgaarb: device added: PCI:0000:01:00.0,decodes=io+mem,owns=none,locks=none
[ 0.393299] vgaarb: loaded
[ 0.393300] vgaarb: setting as boot device: PCI:0000:01:00.0
[ 0.393301] vgaarb: bridge control possible 0000:01:00.0
...
[ 13.693379] apple_gmux: Found gmux version 4.0.8 [indexed]
[ 13.693400] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=io+mem,decodes=io+mem:owns=none
[ 13.693404] apple_gmux: locked IO for PCI:0000:01:00.0
Here it triggers "olddecodes=none -> io+mem".
Making sure to lock only the intel GPU when present and especially protecting
against nvidia driver will be hard if legacy-IO is being processed by a hidden
device!
Bruno
next prev parent reply other threads:[~2015-05-27 6:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20150223215155.18444386@neptune.home>
[not found] ` <20150303172753.GF83894@vmdeb7>
[not found] ` <20150305232038.1873d380@neptune.home>
[not found] ` <20150306174254.GB19001@vmdeb7>
[not found] ` <20150307011546.0050279d@neptune.home>
2015-03-09 21:52 ` [Patch v2 resend] apple-gmux: lock iGP IO to protect from vgaarb changes Bruno Prémont
2015-03-09 22:11 ` Bjorn Helgaas
2015-03-11 21:34 ` [Patch v3] " Bruno Prémont
2015-03-19 3:46 ` Darren Hart
2015-05-26 19:10 ` Michael Marineau
2015-05-27 4:47 ` Darren Hart
2015-05-27 5:35 ` Michael Marineau
2015-05-27 6:13 ` Bruno Prémont [this message]
2015-05-27 6:41 ` Michael Marineau
2015-05-29 16:36 ` Darren Hart
2015-06-01 6:22 ` Bruno Prémont
2015-06-01 17:31 ` Darren Hart
2015-05-27 5:53 ` Bruno Prémont
2015-05-27 6:28 ` Michael Marineau
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=20150527081323.35a3cf88@pluto.restena.lu \
--to=bonbons@linux-vserver.org \
--cc=bhelgaas@google.com \
--cc=dvhart@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=matthew.garrett@nebula.com \
--cc=michael.marineau@coreos.com \
--cc=petrihodju@yahoo.com \
--cc=platform-driver-x86@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).