Re: Problem with backlight control and question about kernel information and patches
Hi,
Bumping this quite old thread, but with a solution.
Le lundi 29 août 2011 à 09:45 +0200, Michel Dänzer a écrit :
> On Mon, 2011-08-29 at 01:52 +0100, Clea F. Rees wrote:
> > uname info: 3.0.0-1-powerpc #1 Sun Jul 24 13:59:10 UTC 2011 ppc GNU/Linux
> >
> > Machine is a 12" G4 Aluminium PowerBook with a 1.5 GHz processor and a
> > nvidia graphics card so I'm using the nouveau drivers.
>
> Then it sounds like nouveau doesn't support backlight control on your
> PowerBook yet. Or maybe the kernel is just missing some build
> configuration. You should probably talk to the nouveau kernel
> developers.
I just remembered getting the backlight to work some time ago with
nouveau on my powerbook. I looked around and found this message from
Andy Wingo: http://lkml.org/lkml/2008/1/12/170
This is his code that I used at the time, available here:
http://wingolog.org/pub/nvbacklight-0.1.tar.bz2
To get it to work on a recent kernel, I had to use this patch:
diff --git a/nvbacklight.c b/nvbacklight.c
index 927d36b..1af10e0 100644
--- a/nvbacklight.c
+++ b/nvbacklight.c
@@ -178,7 +178,7 @@ static struct fb_info *nvbacklight_attach(struct pci_dev *pd)
par->fpSyncs = NV_RD32(par->PRAMDAC, 0x0848) & 0x30000033;
bd = backlight_device_register("nvbacklight", &pd->dev, par,
- &nvidia_bl_ops);
+ &nvidia_bl_ops, NULL);
if (IS_ERR(bd)) {
printk(KERN_WARNING "nvbacklight: registration failed\n");
goto bl_device_register_failed;
You'll have to install linux-headers-powerpc, but then a simple make and
insmod and it works nicely here.
Regards,
benjamin
Reply to: