X86 platform drivers
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Gaele Strootman <gaele@guruburu.com>
Cc: "Bruno Prémont" <bonbons@linux-vserver.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Matthew Garrett" <mjg59@srcf.ucam.org>,
	"Darren Hart" <dvhart@infradead.org>,
	platform-driver-x86@vger.kernel.org,
	"Bruno Bierbaumer" <bruno@bierbaumer.net>,
	"Michael Marineau" <mike@marineau.org>
Subject: Re: Backlight control does not work on an Apple dual-GPU (intel/nvidia) system using nouveau
Date: Sun, 14 Feb 2016 00:39:12 +0100	[thread overview]
Message-ID: <20160213233912.GA16687@wunner.de> (raw)
In-Reply-To: <56BF996F.3030503@guruburu.com>

Hi,

On Sat, Feb 13, 2016 at 10:00:31PM +0100, Gaele Strootman wrote:
> [1.]
> Backlight control does not work on an Apple dual-GPU (intel/nvidia)
> system using nouveau.
> 
> [2.]
> This is a regression that first appeared in v4.1:
> The backlight control (keys F1 and F2) does not work on an Apple
> dual-GPU (MacBookPro11,3) system using nouveau.
> It does work while using the proprietary Nvidia driver.
> 
> 4eebd5a4e72697aac25a8a57d3f888a9d5f80370 is the first bad commit

This is a known issue, see https://bugzilla.kernel.org/show_bug.cgi?id=105051

Executive summary:

On dual GPU MacBook Pros, brightness is controlled by gmux.
It is changed by writing to gmux' I/O port range, 0x700 - 0x7FF.
gmux is located on the LPC bus, i.e. behind the southbridge.

For communication with gmux to work, the above-mentioned I/O port
range needs to be routed to bus 00, where the LPC bus bridge is
located. Incidentally the integrated GPU is also located on that
same bus, whereas the discrete GPU is on a different bus. (It is
directly connected to the PCI Root Complex in the CPU.)

IIUC the proprietary Nvidia driver locks gmux' I/O range to the
discrete GPU, causing it to be routed to the wrong bus. Bruno Prémont
sought to fix this with 86fd887b7fe3 ("vgaarb: Don't default
exclusively to first video device with mem+io") and 4eebd5a4e726
("apple-gmux: lock iGP IO to protect from vgaarb changes").

On MacBookPro11,3 and newer, the integrated GPU is invisible unless
a patch is used which causes Linux to masquerade as OS X to EFI
(see https://github.com/0xbb/gpu-switch#macbook-pro-113-notes).

Thus Bruno Prémont's patch doesn't work, it cannot lock I/O to the
integrated GPU as it's invisible.

@Bjorn Helgaas: Do you think this masquerade patch would be eligible
for inclusion in the kernel or is this not in your department?
https://www.marc.info/?l=grub-deavel&m=141586614924917&w=2

Thanks,

Lukas

  reply	other threads:[~2016-02-13 23:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-13 21:00 Backlight control does not work on an Apple dual-GPU (intel/nvidia) system using nouveau Gaele Strootman
2016-02-13 23:39 ` Lukas Wunner [this message]
2016-02-14  5:38   ` Matthew Garrett
     [not found]     ` <CAHW-aUd7j+iQSTw551g0oucHS6kFmWjyLURuJX0zK_S_UBMV2g@mail.gmail.com>
2016-02-14 13:40       ` Lukas Wunner
2016-02-14 13:24   ` Lukas Wunner
2016-02-20 23:06     ` Gaele Strootman

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=20160213233912.GA16687@wunner.de \
    --to=lukas@wunner.de \
    --cc=bhelgaas@google.com \
    --cc=bonbons@linux-vserver.org \
    --cc=bruno@bierbaumer.net \
    --cc=dvhart@infradead.org \
    --cc=gaele@guruburu.com \
    --cc=mike@marineau.org \
    --cc=mjg59@srcf.ucam.org \
    --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