Created attachment 100635
drm/nv50: Fix backlight not working when PWM_DIV is uninitialised (v3)

Applying Roy's 0001-drm-nv50-Fix-backlight-not-working-when-PWM_DIV-
is-u.patch (v2) to linux-3.15-rc8 results in a compilation error.

...
  CC      drivers/gpu/drm/nouveau/nouveau_display.o
drivers/gpu/drm/nouveau/nouveau_display.c: In function ‘nouveau_display_init’:
drivers/gpu/drm/nouveau/nouveau_display.c:400:5: error: ‘drm’ undeclared (first 
use in this function)
  if(drm->backlight)
     ^
drivers/gpu/drm/nouveau/nouveau_display.c:400:5: note: each undeclared 
identifier is reported only once for each function it appears in
scripts/Makefile.build:318: recipe for target 
'drivers/gpu/drm/nouveau/nouveau_display.o' failed
make[4]: *** [drivers/gpu/drm/nouveau/nouveau_display.o] Error 1
scripts/Makefile.build:465: recipe for target 'drivers/gpu/drm/nouveau' failed
make[3]: *** [drivers/gpu/drm/nouveau] Error 2
scripts/Makefile.build:465: recipe for target 'drivers/gpu/drm' failed
make[2]: *** [drivers/gpu/drm] Error 2
scripts/Makefile.build:465: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:878: recipe for target 'drivers' failed
make: *** [drivers] Error 2

Resolved by adding the following line to the beginning of the
nouveau_display_init function in nouveau_display.c:

        struct nouveau_drm *drm = nouveau_drm(dev);

I tried to make a patch and attach it - not sure if I did it right.

This patch successfully resolved the "backlight brightness stuck at
minimum after waking up from suspend" issue on my HP Elitebook 8530w.

Thank you, Roy! Your code has improved my life significantly.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/921321

Title:
  nouveau: dark screen after suspend/resume

To manage notifications about this bug go to:
https://bugs.launchpad.net/nouveau/+bug/921321/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to