* [PATCH] [POWERPC] (testers ?) Fix sleep on some powerbooks @ 2008-03-03 6:27 Benjamin Herrenschmidt 2008-03-04 16:15 ` Wolfgang Pfeiffer 0 siblings, 1 reply; 4+ messages in thread From: Benjamin Herrenschmidt @ 2008-03-03 6:27 UTC (permalink / raw) To: linuxppc-dev The PMU backlight code would kick in during sleep/resume even on machines that use a different backlight method. This appears to break sleep on my PowerBook, though I can't test that patch at the moment as the machine died while I was bisecting. So if anybody around has one of those latest revision PowerPC PowerBooks, the one just before they went to Intel, and have a problem with suspend/resume, please test this and let me know if it helps. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> --- drivers/macintosh/via-pmu-backlight.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- linux-work.orig/drivers/macintosh/via-pmu-backlight.c 2008-03-03 17:24:44.000000000 +1100 +++ linux-work/drivers/macintosh/via-pmu-backlight.c 2008-03-03 17:25:12.000000000 +1100 @@ -17,7 +17,7 @@ static struct backlight_ops pmu_backlight_data; static DEFINE_SPINLOCK(pmu_backlight_lock); -static int sleeping; +static int sleeping, uses_pmu_bl; static u8 bl_curve[FB_BACKLIGHT_LEVELS]; static void pmu_backlight_init_curve(u8 off, u8 min, u8 max) @@ -128,7 +128,7 @@ void pmu_backlight_set_sleep(int sleep) spin_lock_irqsave(&pmu_backlight_lock, flags); sleeping = sleep; - if (pmac_backlight) { + if (pmac_backlight && uses_pmu_bl) { if (sleep) { struct adb_request req; @@ -166,6 +166,7 @@ void __init pmu_backlight_init() printk(KERN_ERR "PMU Backlight registration failed\n"); return; } + uses_pmu_bl = 1; bd->props.max_brightness = FB_BACKLIGHT_LEVELS - 1; pmu_backlight_init_curve(0x7F, 0x46, 0x0E); ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [POWERPC] (testers ?) Fix sleep on some powerbooks 2008-03-03 6:27 [PATCH] [POWERPC] (testers ?) Fix sleep on some powerbooks Benjamin Herrenschmidt @ 2008-03-04 16:15 ` Wolfgang Pfeiffer 2008-03-04 20:21 ` Gaudenz Steinlin 2008-03-04 21:28 ` Wolfgang Pfeiffer 0 siblings, 2 replies; 4+ messages in thread From: Wolfgang Pfeiffer @ 2008-03-04 16:15 UTC (permalink / raw) To: Benjamin Herrenschmidt; +Cc: Gaudenz Steinlin, debian-powerpc, linuxppc-dev [-- Attachment #1.1: Type: text/plain, Size: 3260 bytes --] Hi Ben, Gaudenz - Hi All On Mon, Mar 03 2008, at 17:27 +1100, Benjamin Herrenschmidt wrote: > The PMU backlight code would kick in during sleep/resume even on > machines that use a different backlight method. This appears to > break sleep on my PowerBook, though I can't test that patch at > the moment as the machine died while I was bisecting. > > So if anybody around has one of those latest revision PowerPC > PowerBooks, the one just before they went to Intel, yes, I think so: $ cat /proc/cpuinfo processor : 0 cpu : 7447A, altivec supported clock : 1666.666000MHz revision : 0.5 (pvr 8003 0105) bogomips : 33.15 timebase : 8320000 platform : PowerMac machine : PowerBook5,8 motherboard : PowerBook5,8 MacRISC3 Power Macintosh detected as : 287 (PowerBook G4 15") pmac flags : 00000019 L2 cache : 512K unified pmac-generation : NewWorld > and have a > problem with suspend/resume, please test this and let me know > if it helps. It helps. Thanks a lot .. :) ... After installing the kernel with your patch, and booting to it, I successfully ran the machine into sleep mode, several times: On a console, after booting, and with no-one logged in. On a KDE-Login-screen, with root logged in on a console. And just a few minutes ago in a fully working KDE/KDM X environment. Pressing the power button on this machine put the system to sleep, and it resumed when pressing the same button again ... I uploaded this fresh kernel .deb, patched with your code, up to rapidshare: http://rapidshare.com/files/96992135/linux-image-2.6.25-rc3-g7704a8b-with-ben.s-pmu-patch_2008.02.29_powerpc.deb.html md5sum for the file above is 7a7613e0c52e179acf7caacaa3890901 Please note - my favorite part - this kernel does not have an initrd image included .. :) I attach my /etc/modules file, just in case ... For those not familiar to rapidshare procedures: Just choose something like "Free" on the page above, wait a few secs, then chose an appropriate server near you, and type in the code you see in the image. I don't have my own web space for binaries like this, so sorry if this is a little annoying ... For those not subscribed to linuxppc-dev@ozlabs.org: Here's Ben's original email, with the patch: http://patchwork.ozlabs.org/linuxppc/patch?order=state&id=17107 Thanks again for your work, Ben .... :) Last, but certainly not least: Thanks Gaudenz, for pointing me to "git bisect", for your response as a whole to the Debian powerpc list ... :) My public key can be found with the 'keyserver' URL in the signature .. Best Regards > > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> > --- > > drivers/macintosh/via-pmu-backlight.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > --- linux-work.orig/drivers/macintosh/via-pmu-backlight.c 2008-03-03 17:24:44.000000000 +1100 > +++ linux-work/drivers/macintosh/via-pmu-backlight.c 2008-03-03 17:25:12.000000000 +1100 > @@ -17,7 +17,7 @@ > > [ ... ] -- Wolfgang http://heelsbroke.blogspot.com/ http://keyserver.mine.nu/pks/lookup?search=0xE3037113&fingerprint=on [-- Attachment #1.2: /etc/modules --] [-- Type: text/plain, Size: 453 bytes --] # /etc/modules: kernel modules to load at boot time. # # This file contains the names of kernel modules that should be loaded # at boot time, one per line. Lines beginning with "#" are ignored. apm_emu ide-cd #ide-disk #ide-generic sbp2 i2c-powermac #snd-powermac #snd-aoa: #soundbus #i2sbus #snd-aoa #snd-aoa-fabric-layout #snd-aoa-codec-onyx # End snd-aoa cpufreq_performance cpufreq_powersave cpufreq_ondemand sr_mod therm_adt746x limit_adjust=-3 [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 481 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [POWERPC] (testers ?) Fix sleep on some powerbooks 2008-03-04 16:15 ` Wolfgang Pfeiffer @ 2008-03-04 20:21 ` Gaudenz Steinlin 2008-03-04 21:28 ` Wolfgang Pfeiffer 1 sibling, 0 replies; 4+ messages in thread From: Gaudenz Steinlin @ 2008-03-04 20:21 UTC (permalink / raw) To: Benjamin Herrenschmidt; +Cc: debian-powerpc, linuxppc-dev Hi Ben On Tue, Mar 04, 2008 at 05:15:18PM +0100, Wolfgang Pfeiffer wrote: > Hi Ben, Gaudenz - Hi All > > On Mon, Mar 03 2008, at 17:27 +1100, Benjamin Herrenschmidt wrote: > > The PMU backlight code would kick in during sleep/resume even on > > machines that use a different backlight method. This appears to > > break sleep on my PowerBook, though I can't test that patch at > > the moment as the machine died while I was bisecting. > > > > So if anybody around has one of those latest revision PowerPC > > PowerBooks, the one just before they went to Intel, > > yes, I think so: > > $ cat /proc/cpuinfo > processor : 0 > cpu : 7447A, altivec supported > clock : 1666.666000MHz > revision : 0.5 (pvr 8003 0105) > bogomips : 33.15 > timebase : 8320000 > platform : PowerMac > machine : PowerBook5,8 > motherboard : PowerBook5,8 MacRISC3 Power Macintosh > detected as : 287 (PowerBook G4 15") > pmac flags : 00000019 > L2 cache : 512K unified > pmac-generation : NewWorld > > > > and have a > > problem with suspend/resume, please test this and let me know > > if it helps. > > It helps. Thanks a lot .. :) ... For me it fixes the problem too. I have the same machine. Gaudenz -- Ever tried. Ever failed. No matter. Try again. Fail again. Fail better. ~ Samuel Beckett ~ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [POWERPC] (testers ?) Fix sleep on some powerbooks 2008-03-04 16:15 ` Wolfgang Pfeiffer 2008-03-04 20:21 ` Gaudenz Steinlin @ 2008-03-04 21:28 ` Wolfgang Pfeiffer 1 sibling, 0 replies; 4+ messages in thread From: Wolfgang Pfeiffer @ 2008-03-04 21:28 UTC (permalink / raw) To: debian-powerpc; +Cc: linuxppc-dev On Tue, Mar 04 2008, at 17:15 +0100, Wolfgang Pfeiffer wrote: > > > [ ... ] > I uploaded this fresh kernel .deb, patched with your code, up to > rapidshare: > http://rapidshare.com/files/96992135/linux-image-2.6.25-rc3-g7704a8b-with-ben.s-pmu-patch_2008.02.29_powerpc.deb.html > > md5sum for the file above is 7a7613e0c52e179acf7caacaa3890901 "the file" should say: linux-image-2.6.25-rc3-g7704a8b-with-ben.s-pmu-patch_2008.02.29_powerpc.deb Sorry for the overhead ... Regards -- Wolfgang http://heelsbroke.blogspot.com/ http://keyserver.mine.nu/pks/lookup?search=0xE3037113&fingerprint=on ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-03-04 21:28 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-03-03 6:27 [PATCH] [POWERPC] (testers ?) Fix sleep on some powerbooks Benjamin Herrenschmidt 2008-03-04 16:15 ` Wolfgang Pfeiffer 2008-03-04 20:21 ` Gaudenz Steinlin 2008-03-04 21:28 ` Wolfgang Pfeiffer
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).