* Brightness control for MacBook Pro - Nvidia 9400
@ 2010-02-11 20:38 Soeren Sonnenburg
2010-02-11 20:44 ` Matthew Garrett
2010-02-12 11:18 ` Julien BLACHE
0 siblings, 2 replies; 10+ messages in thread
From: Soeren Sonnenburg @ 2010-02-11 20:38 UTC (permalink / raw)
To: mjg; +Cc: nicolas, felipe_alfaro, Julien BLACHE, Linux Kernel
[-- Attachment #1: Type: text/plain, Size: 778 bytes --]
Dear all,
I am booting a MacBookPro5,3 using elilo and efifb. Now I'd like to use
pommed to control display brightness (which won't work). Digging around
in mbp_nvidia_bl.c I figured out that tries to control the geforce 9600M
instead of the currently active geforece 9400m
02:00.0 VGA compatible controller: nVidia Corporation G96 [GeForce 9600M GT] (rev a1)
03:00.0 VGA compatible controller: nVidia Corporation C79 [GeForce 9400M] (rev b1)
Does anyone have an idea which bytes to tweak to change brightness
levels for the 9400? Seems like 0x52f does not work - at least
setpci -s 03:00.0 0x52f.B=10 fails...
Thanks!
Soeren
--
For the one fact about the future of which we can be certain is that it
will be utterly fantastic. -- Arthur C. Clarke, 1962
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Brightness control for MacBook Pro - Nvidia 9400
2010-02-11 20:38 Brightness control for MacBook Pro - Nvidia 9400 Soeren Sonnenburg
@ 2010-02-11 20:44 ` Matthew Garrett
2010-02-11 23:13 ` Soeren Sonnenburg
2010-02-12 11:18 ` Julien BLACHE
1 sibling, 1 reply; 10+ messages in thread
From: Matthew Garrett @ 2010-02-11 20:44 UTC (permalink / raw)
To: Soeren Sonnenburg; +Cc: nicolas, felipe_alfaro, Julien BLACHE, Linux Kernel
On Thu, Feb 11, 2010 at 09:38:45PM +0100, Soeren Sonnenburg wrote:
> Dear all,
>
> I am booting a MacBookPro5,3 using elilo and efifb. Now I'd like to use
> pommed to control display brightness (which won't work). Digging around
> in mbp_nvidia_bl.c I figured out that tries to control the geforce 9600M
> instead of the currently active geforece 9400m
So, first of all, use nouveau instead. But moving on...
> 02:00.0 VGA compatible controller: nVidia Corporation G96 [GeForce 9600M GT] (rev a1)
> 03:00.0 VGA compatible controller: nVidia Corporation C79 [GeForce 9400M] (rev b1)
>
> Does anyone have an idea which bytes to tweak to change brightness
> levels for the 9400? Seems like 0x52f does not work - at least
> setpci -s 03:00.0 0x52f.B=10 fails...
Those are mmio registers, not PCI config ones. You won't be able to
change them with setpci.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Brightness control for MacBook Pro - Nvidia 9400
2010-02-11 20:44 ` Matthew Garrett
@ 2010-02-11 23:13 ` Soeren Sonnenburg
0 siblings, 0 replies; 10+ messages in thread
From: Soeren Sonnenburg @ 2010-02-11 23:13 UTC (permalink / raw)
To: Matthew Garrett; +Cc: nicolas, felipe_alfaro, Julien BLACHE, Linux Kernel
[-- Attachment #1: Type: text/plain, Size: 1280 bytes --]
On Thu, 2010-02-11 at 20:44 +0000, Matthew Garrett wrote:
> On Thu, Feb 11, 2010 at 09:38:45PM +0100, Soeren Sonnenburg wrote:
> > Dear all,
Hi Matthew,
thanks for the quick answer.
> > I am booting a MacBookPro5,3 using elilo and efifb. Now I'd like to use
> > pommed to control display brightness (which won't work). Digging around
> > in mbp_nvidia_bl.c I figured out that tries to control the geforce 9600M
> > instead of the currently active geforece 9400m
>
> So, first of all, use nouveau instead. But moving on...
Unfortunately nouveau (from kernel 2.6.33-rc7) just hangs after loading
firmware and initialising fifo 1...
> > 02:00.0 VGA compatible controller: nVidia Corporation G96 [GeForce 9600M GT] (rev a1)
> > 03:00.0 VGA compatible controller: nVidia Corporation C79 [GeForce 9400M] (rev b1)
> >
> > Does anyone have an idea which bytes to tweak to change brightness
> > levels for the 9400? Seems like 0x52f does not work - at least
> > setpci -s 03:00.0 0x52f.B=10 fails...
>
> Those are mmio registers, not PCI config ones. You won't be able to
> change them with setpci.
I see...
Soeren
--
For the one fact about the future of which we can be certain is that it
will be utterly fantastic. -- Arthur C. Clarke, 1962
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Brightness control for MacBook Pro - Nvidia 9400
2010-02-11 20:38 Brightness control for MacBook Pro - Nvidia 9400 Soeren Sonnenburg
2010-02-11 20:44 ` Matthew Garrett
@ 2010-02-12 11:18 ` Julien BLACHE
2010-02-12 14:14 ` Matthew Garrett
1 sibling, 1 reply; 10+ messages in thread
From: Julien BLACHE @ 2010-02-12 11:18 UTC (permalink / raw)
To: Soeren Sonnenburg; +Cc: mjg, nicolas, felipe_alfaro, Linux Kernel
Soeren Sonnenburg <sonne@debian.org> wrote:
Hi,
> I am booting a MacBookPro5,3 using elilo and efifb. Now I'd like to use
> pommed to control display brightness (which won't work). Digging around
> in mbp_nvidia_bl.c I figured out that tries to control the geforce 9600M
> instead of the currently active geforece 9400m
If you know how one can determine which GPU is active, let me know. I
don't have this information at the moment.
> Does anyone have an idea which bytes to tweak to change brightness
> levels for the 9400? Seems like 0x52f does not work - at least
> setpci -s 03:00.0 0x52f.B=10 fails...
I'm not sure this method actually works without the legacy BIOS. IIRC
that method was determined by reverse engineering the Windows drivers,
which means the legacy BIOS was in use.
JB.
--
Julien BLACHE <http://www.jblache.org>
<jb@jblache.org> GPG KeyID 0xF5D65169
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Brightness control for MacBook Pro - Nvidia 9400
2010-02-12 11:18 ` Julien BLACHE
@ 2010-02-12 14:14 ` Matthew Garrett
2010-02-12 16:25 ` Julien BLACHE
0 siblings, 1 reply; 10+ messages in thread
From: Matthew Garrett @ 2010-02-12 14:14 UTC (permalink / raw)
To: Julien BLACHE; +Cc: Soeren Sonnenburg, nicolas, felipe_alfaro, Linux Kernel
On Fri, Feb 12, 2010 at 12:18:28PM +0100, Julien BLACHE wrote:
> Soeren Sonnenburg <sonne@debian.org> wrote:
>
> Hi,
>
> > I am booting a MacBookPro5,3 using elilo and efifb. Now I'd like to use
> > pommed to control display brightness (which won't work). Digging around
> > in mbp_nvidia_bl.c I figured out that tries to control the geforce 9600M
> > instead of the currently active geforece 9400m
>
> If you know how one can determine which GPU is active, let me know. I
> don't have this information at the moment.
There's a _DSM method in the ACPI tables that you need to execute.
> I'm not sure this method actually works without the legacy BIOS. IIRC
> that method was determined by reverse engineering the Windows drivers,
> which means the legacy BIOS was in use.
Ah, yes - sorry, I'd forgotten that this used the smi horror. nouveau
should drive the chip brightness natively, so it's probably better to
figure out why it's breaking rather than worry about this...
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Brightness control for MacBook Pro - Nvidia 9400
2010-02-12 14:14 ` Matthew Garrett
@ 2010-02-12 16:25 ` Julien BLACHE
2010-02-12 16:28 ` Matthew Garrett
0 siblings, 1 reply; 10+ messages in thread
From: Julien BLACHE @ 2010-02-12 16:25 UTC (permalink / raw)
To: Matthew Garrett; +Cc: Soeren Sonnenburg, nicolas, felipe_alfaro, Linux Kernel
Matthew Garrett <mjg59@srcf.ucam.org> wrote:
Hi,
>> If you know how one can determine which GPU is active, let me know. I
>> don't have this information at the moment.
>
> There's a _DSM method in the ACPI tables that you need to execute.
Is it exposed to userspace in any way? Or, better yet, could we have an
MBP backlight driver which would hide all of this from userspace?
JB.
--
Julien BLACHE <http://www.jblache.org>
<jb@jblache.org> GPG KeyID 0xF5D65169
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Brightness control for MacBook Pro - Nvidia 9400
2010-02-12 16:25 ` Julien BLACHE
@ 2010-02-12 16:28 ` Matthew Garrett
2010-02-12 16:42 ` Soeren Sonnenburg
0 siblings, 1 reply; 10+ messages in thread
From: Matthew Garrett @ 2010-02-12 16:28 UTC (permalink / raw)
To: Julien BLACHE; +Cc: Soeren Sonnenburg, nicolas, felipe_alfaro, Linux Kernel
On Fri, Feb 12, 2010 at 05:25:22PM +0100, Julien BLACHE wrote:
> Is it exposed to userspace in any way? Or, better yet, could we have an
> MBP backlight driver which would hide all of this from userspace?
Sure, in nouveau.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Brightness control for MacBook Pro - Nvidia 9400
2010-02-12 16:28 ` Matthew Garrett
@ 2010-02-12 16:42 ` Soeren Sonnenburg
2010-02-12 16:44 ` Matthew Garrett
0 siblings, 1 reply; 10+ messages in thread
From: Soeren Sonnenburg @ 2010-02-12 16:42 UTC (permalink / raw)
To: Matthew Garrett; +Cc: Julien BLACHE, nicolas, felipe_alfaro, Linux Kernel
[-- Attachment #1: Type: text/plain, Size: 650 bytes --]
On Fri, 2010-02-12 at 16:28 +0000, Matthew Garrett wrote:
> On Fri, Feb 12, 2010 at 05:25:22PM +0100, Julien BLACHE wrote:
>
> > Is it exposed to userspace in any way? Or, better yet, could we have an
> > MBP backlight driver which would hide all of this from userspace?
>
> Sure, in nouveau.
OK, great convinced. Any suggestions on where to add printk's to figure
out the cause of the hang? The only thing I noticed was the fans turning
on so the machine is either stuck in a busy loop or ???
Soeren
--
For the one fact about the future of which we can be certain is that it
will be utterly fantastic. -- Arthur C. Clarke, 1962
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Brightness control for MacBook Pro - Nvidia 9400
2010-02-12 16:42 ` Soeren Sonnenburg
@ 2010-02-12 16:44 ` Matthew Garrett
2010-02-12 16:55 ` Soeren Sonnenburg
0 siblings, 1 reply; 10+ messages in thread
From: Matthew Garrett @ 2010-02-12 16:44 UTC (permalink / raw)
To: Soeren Sonnenburg; +Cc: Julien BLACHE, nicolas, felipe_alfaro, Linux Kernel
On Fri, Feb 12, 2010 at 05:42:17PM +0100, Soeren Sonnenburg wrote:
> On Fri, 2010-02-12 at 16:28 +0000, Matthew Garrett wrote:
> > On Fri, Feb 12, 2010 at 05:25:22PM +0100, Julien BLACHE wrote:
> >
> > > Is it exposed to userspace in any way? Or, better yet, could we have an
> > > MBP backlight driver which would hide all of this from userspace?
> >
> > Sure, in nouveau.
>
> OK, great convinced. Any suggestions on where to add printk's to figure
> out the cause of the hang? The only thing I noticed was the fans turning
> on so the machine is either stuck in a busy loop or ???
Best bet is probably to file a bug on bugs.freedesktop.org - I'm afraid
I'm not too hot on the GPU bringup side of the driver.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Brightness control for MacBook Pro - Nvidia 9400
2010-02-12 16:44 ` Matthew Garrett
@ 2010-02-12 16:55 ` Soeren Sonnenburg
0 siblings, 0 replies; 10+ messages in thread
From: Soeren Sonnenburg @ 2010-02-12 16:55 UTC (permalink / raw)
To: Matthew Garrett; +Cc: Julien BLACHE, nicolas, felipe_alfaro, Linux Kernel
[-- Attachment #1: Type: text/plain, Size: 1030 bytes --]
On Fri, 2010-02-12 at 16:44 +0000, Matthew Garrett wrote:
> On Fri, Feb 12, 2010 at 05:42:17PM +0100, Soeren Sonnenburg wrote:
> > On Fri, 2010-02-12 at 16:28 +0000, Matthew Garrett wrote:
> > > On Fri, Feb 12, 2010 at 05:25:22PM +0100, Julien BLACHE wrote:
> > >
> > > > Is it exposed to userspace in any way? Or, better yet, could we have an
> > > > MBP backlight driver which would hide all of this from userspace?
> > >
> > > Sure, in nouveau.
> >
> > OK, great convinced. Any suggestions on where to add printk's to figure
> > out the cause of the hang? The only thing I noticed was the fans turning
> > on so the machine is either stuck in a busy loop or ???
>
> Best bet is probably to file a bug on bugs.freedesktop.org - I'm afraid
> I'm not too hot on the GPU bringup side of the driver.
OK, it is here
http://bugs.freedesktop.org/show_bug.cgi?id=26546
Soeren
--
For the one fact about the future of which we can be certain is that it
will be utterly fantastic. -- Arthur C. Clarke, 1962
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-02-12 16:55 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-11 20:38 Brightness control for MacBook Pro - Nvidia 9400 Soeren Sonnenburg
2010-02-11 20:44 ` Matthew Garrett
2010-02-11 23:13 ` Soeren Sonnenburg
2010-02-12 11:18 ` Julien BLACHE
2010-02-12 14:14 ` Matthew Garrett
2010-02-12 16:25 ` Julien BLACHE
2010-02-12 16:28 ` Matthew Garrett
2010-02-12 16:42 ` Soeren Sonnenburg
2010-02-12 16:44 ` Matthew Garrett
2010-02-12 16:55 ` Soeren Sonnenburg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox