linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
@ 2004-11-19  6:56 Benjamin Herrenschmidt
  2004-11-19  8:50 ` David Woodhouse
                   ` (3 more replies)
  0 siblings, 4 replies; 44+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-19  6:56 UTC (permalink / raw)
  To: debian-powerpc@lists.debian.org, linuxppc-dev, gentoo-ppc-user

(Message cross-posted to several lists, please do _NOT_ reply to all of
them).

NOTE: Owners of _OTHER_ Apple laptops that could already sleep, like
earlier iBooks, or Titanium PowerBooks, please test this patch as well
for regression. More specifically, test if sleep still works, X/DRI, and
backlight control as I have made significant changes to radeonfb in ways
that could affect those areas.

NOTE2: This is still quite experimental, be careful if something goes
wrong (like lots of oopses or crashes on wakeup), you'd rather
hard-restart the machine right away than let corrupted memory buffers be
written back to your disk ;)
 
First, let's give credit where it's due, as a lot of the work on the
original Aluminium PowerBook sleep code was done by Paul Mackerras,
happy owner of one of these beasts, and thanks to Rob Weir too who gave
me his iBook G4 for a few days, just long enough to get the stuff
working...

So here's the new patch, it replaces the previous one for Aluminium
PowerBooks, and is still against 2.6.9. I'll do something against 2.6.10
when that one is out (it's a bit late to get that merged with Linus,
2.6.10 is in freeze mode now) and I hope to get all of that in 2.6.11.

The support for sleep on desktop G4s & dual CPU machines, including
support for "hotplug CPU" (allowing to put a CPU to sleep dynamically)
for dual machines isn't in this patch neither, it will be coming
spearately. It will only support one desktop video card at first anyway,
though it will be possible to extend that over time.

Get it at:

http://gate.crashing.org/~benh/albook-ibookg4-sleep.diff

Enjoy !

Ben.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-19  6:56 TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based) Benjamin Herrenschmidt
@ 2004-11-19  8:50 ` David Woodhouse
  2004-11-19 10:33   ` Benjamin Herrenschmidt
  2004-11-19 11:06 ` Gabriel Paubert
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 44+ messages in thread
From: David Woodhouse @ 2004-11-19  8:50 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev

On Fri, 2004-11-19 at 17:56 +1100, Benjamin Herrenschmidt wrote:
> (Message cross-posted to several lists, please do _NOT_ reply to all of
> them).

I forwarded it to fedora-ppc@lists.infradead.org too.

Since I started using the previous patch and actually suspending, I've
been seeing the GNOME panel and window list die frequently, and
occasionally other X apps. When X apps have died which were started from
the command line it seemed to be a spurious SIGPIPE, strangely.

I don't _think_ I've ever seen it immediately after booting; only after
suspend/resume. But that could be just a coincidence. Likewise the way
it started when I added the sleep patch _could_ just be a coincidence --
I was still running Fedora rawhide and updating other packages (and
there were other kernel changes) at that time, so a lot of other things
changed too... but has anyone else seen similar behaviour?

-- 
dwmw2

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-19  8:50 ` David Woodhouse
@ 2004-11-19 10:33   ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 44+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-19 10:33 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linuxppc-dev list

On Fri, 2004-11-19 at 08:50 +0000, David Woodhouse wrote:
> On Fri, 2004-11-19 at 17:56 +1100, Benjamin Herrenschmidt wrote:
> > (Message cross-posted to several lists, please do _NOT_ reply to all of
> > them).
> 
> I forwarded it to fedora-ppc@lists.infradead.org too.
> 
> Since I started using the previous patch and actually suspending, I've
> been seeing the GNOME panel and window list die frequently, and
> occasionally other X apps. When X apps have died which were started from
> the command line it seemed to be a spurious SIGPIPE, strangely.
> 
> I don't _think_ I've ever seen it immediately after booting; only after
> suspend/resume. But that could be just a coincidence. Likewise the way
> it started when I added the sleep patch _could_ just be a coincidence --
> I was still running Fedora rawhide and updating other packages (and
> there were other kernel changes) at that time, so a lot of other things
> changed too... but has anyone else seen similar behaviour?

Try the new patch. Note that I posted a second one today, right after
the first one, that fixes a engine lockup bug (see my second mail).

The original patch had a bug where some of the CPU "HID" registers
weren't properly restored for 7447A type CPUs. If you had one of these,
it could explain the issue.

Ben.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-19  6:56 TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based) Benjamin Herrenschmidt
  2004-11-19  8:50 ` David Woodhouse
@ 2004-11-19 11:06 ` Gabriel Paubert
  2004-11-19 22:14   ` Benjamin Herrenschmidt
  2004-11-19 19:02 ` Olof Johansson
       [not found] ` <1100852423.3855.2.camel@gaston>
  3 siblings, 1 reply; 44+ messages in thread
From: Gabriel Paubert @ 2004-11-19 11:06 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev

On Fri, Nov 19, 2004 at 05:56:50PM +1100, Benjamin Herrenschmidt wrote:
> NOTE: Owners of _OTHER_ Apple laptops that could already sleep, like
> earlier iBooks, or Titanium PowerBooks, please test this patch as well
> for regression. More specifically, test if sleep still works, X/DRI, and
> backlight control as I have made significant changes to radeonfb in ways
> that could affect those areas.

Everytime my Pismo wakes up I have the following:

Badness in enable_irq at kernel/irq/manage.c:106
Call trace:
 [c0006db4] dump_stack+0x18/0x28
 [c0004dfc] check_bug_trap+0x84/0xac
 [c0004f84] ProgramCheckException+0x160/0x1a0
 [c00044e0] ret_from_except_full+0x0/0x4c
 [c002f8dc] enable_irq+0xa0/0xa8
 [c0205570] ohci_pci_resume+0xe4/0xfc
 [c01fc018] usb_hcd_pci_resume+0xb0/0x114
 [c013a9f0] pci_device_resume+0x4c/0x50
 [c0181474] resume_device+0x44/0x4c
 [c01815ac] dpm_resume+0x130/0x148
 [c01815fc] device_resume+0x38/0x78
 [c0424ac8] 0xc0424ac8
 [c0424fb0] 0xc0424fb0
 [c042581c] 0xc042581c
 [c0064680] sys_ioctl+0xdc/0x2f4
Badness in enable_irq at kernel/irq/manage.c:106
Call trace:
 [c0006db4] dump_stack+0x18/0x28
 [c0004dfc] check_bug_trap+0x84/0xac
 [c0004f84] ProgramCheckException+0x160/0x1a0
 [c00044e0] ret_from_except_full+0x0/0x4c
 [c002f8dc] enable_irq+0xa0/0xa8
 [c0205570] ohci_pci_resume+0xe4/0xfc
 [c01fc018] usb_hcd_pci_resume+0xb0/0x114
 [c013a9f0] pci_device_resume+0x4c/0x50
 [c0181474] resume_device+0x44/0x4c
 [c01815ac] dpm_resume+0x130/0x148
 [c01815fc] device_resume+0x38/0x78
 [c0424ac8] 0xc0424ac8
 [c0424fb0] 0xc0424fb0
 [c042581c] 0xc042581c
 [c0064680] sys_ioctl+0xdc/0x2f4

It happens when reenabling USB interrupts (before the recent 
irq consolidation it was a one line message about unbalanced
irq_enable IIRC). The appended patch fixes the problem for my 
machine, the explanation being that some higher level code now
does an explicit free_irq() before suspending and request_irq()
on resume (in drivers/usb/core/hcd-pci.c).

	Gabriel

===== drivers/usb/host/ohci-pci.c 1.33 vs edited =====
--- 1.33/drivers/usb/host/ohci-pci.c	2004-11-07 23:31:07 +01:00
+++ edited/drivers/usb/host/ohci-pci.c	2004-11-19 11:55:10 +01:00
@@ -119,14 +119,11 @@
 
 	/* let things settle down a bit */
 	msleep (100);
-	
-#ifdef CONFIG_PMAC_PBOOK
-	if (_machine == _MACH_Pmac)
-		disable_irq ((to_pci_dev(hcd->self.controller))->irq);
 
+#ifdef CONFIG_PMAC_PBOOK
 	{
-	   	struct device_node	*of_node;
- 
+		struct device_node	*of_node;
+
 		/* Disable USB PAD & cell clock */
 		of_node = pci_device_to_OF_node (to_pci_dev(hcd->self.controller));
 		if (of_node)
@@ -164,13 +161,6 @@
 	retval = ohci_hub_resume (hcd);
 	usb_unlock_device (hcd->self.root_hub);
 #endif
-
-	if (retval == 0) {
-#ifdef CONFIG_PMAC_PBOOK
-		if (_machine == _MACH_Pmac)
-			enable_irq (to_pci_dev(hcd->self.controller)->irq);
-#endif
-	}
 	return retval;
 }
 

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-19  6:56 TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based) Benjamin Herrenschmidt
  2004-11-19  8:50 ` David Woodhouse
  2004-11-19 11:06 ` Gabriel Paubert
@ 2004-11-19 19:02 ` Olof Johansson
       [not found] ` <1100852423.3855.2.camel@gaston>
  3 siblings, 0 replies; 44+ messages in thread
From: Olof Johansson @ 2004-11-19 19:02 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev

On Fri, Nov 19, 2004 at 05:56:50PM +1100, Benjamin Herrenschmidt wrote:

> So here's the new patch, it replaces the previous one for Aluminium
> PowerBooks, and is still against 2.6.9. I'll do something against 2.6.10
> when that one is out (it's a bit late to get that merged with Linus,
> 2.6.10 is in freeze mode now) and I hope to get all of that in 2.6.11.

Seems to work well on my 1.2GHz 12" iBook. First attempt caused a
failure while I had the WUSB12 adapter plugged in (after reboot when the
device was reinitialized the keyboard stopped working and the mouse went
crazy). If I unplug the adapter before sleep, it seems to wakeup without
problem.

No observed problems with backlight or anything else either, but I
haven't been stress testing anything.

Good work, Ben!  I owe you a beer next time you're in Austin! :)

-Olof

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
@ 2004-11-19 22:10 Benjamin Herrenschmidt
  0 siblings, 0 replies; 44+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-19 22:10 UTC (permalink / raw)
  To: linuxppc-dev list


> So here's the new patch, it replaces the previous one for Aluminium
> PowerBooks, and is still against 2.6.9. I'll do something against 2.6.10
> when that one is out (it's a bit late to get that merged with Linus,
> 2.6.10 is in freeze mode now) and I hope to get all of that in 2.6.11.
>
> .../...

Ok, I already found a bug, occasional lockups on boot and when setting
the backlight. I uploaded a new version at:

http://gate.crashing.org/~benh/albook-ibookg4-sleep-2.diff

Ben.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-19 11:06 ` Gabriel Paubert
@ 2004-11-19 22:14   ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 44+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-19 22:14 UTC (permalink / raw)
  To: Gabriel Paubert; +Cc: linuxppc-dev list

On Fri, 2004-11-19 at 12:06 +0100, Gabriel Paubert wrote:
> On Fri, Nov 19, 2004 at 05:56:50PM +1100, Benjamin Herrenschmidt wrote:
> > NOTE: Owners of _OTHER_ Apple laptops that could already sleep, like
> > earlier iBooks, or Titanium PowerBooks, please test this patch as well
> > for regression. More specifically, test if sleep still works, X/DRI, and
> > backlight control as I have made significant changes to radeonfb in ways
> > that could affect those areas.
> 
> Everytime my Pismo wakes up I have the following:
> 
> Badness in enable_irq at kernel/irq/manage.c:106

 .../...

Yah, it's known, and harmless, just didn't find the time to fix it yet,
thanks for the patch. It's due to a change in the main OHCI code which
nowadaws frees and re-requests the interrupt on sleep.

Ben.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
@ 2004-11-20 21:47 Sean Neakums
  2004-11-20 22:08 ` Armando Di Cianno
                   ` (2 more replies)
  0 siblings, 3 replies; 44+ messages in thread
From: Sean Neakums @ 2004-11-20 21:47 UTC (permalink / raw)
  To: benh; +Cc: linuxppc-dev

> http://gate.crashing.org/~benh/albook-ibookg4-sleep-2.diff

I tried this on my 15" AlBook (one of the new 1.5GHz ones), applied to
Debian's 2.6.9.  It suspended and resumed fine (and quickly!), but
after resume I noticed that images (in Mozilla and the root window)
would become corrupted if obscured and made visible again, e.g. by
switching tabs, or by moving between a full and an empty workspace.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-20 21:47 Sean Neakums
@ 2004-11-20 22:08 ` Armando Di Cianno
  2004-11-20 22:20   ` Michel Dänzer
  2004-11-20 22:22 ` Benjamin Herrenschmidt
  2004-11-21 19:34 ` David Woodhouse
  2 siblings, 1 reply; 44+ messages in thread
From: Armando Di Cianno @ 2004-11-20 22:08 UTC (permalink / raw)
  To: linuxppc-dev


[-- Attachment #1.1: Type: text/plain, Size: 811 bytes --]

On 2004-11-20 16:47:34 -0500 Sean Neakums <sneakums@zork.net> wrote:
> I tried this on my 15" AlBook (one of the new 1.5GHz ones), applied to
> Debian's 2.6.9.  It suspended and resumed fine (and quickly!), but
> after resume I noticed that images (in Mozilla and the root window)
> would become corrupted if obscured and made visible again, e.g. by
> switching tabs, or by moving between a full and an empty workspace.

Just a note that I tried this with gentoo's 
gentoo-dev-sources-2.6.9-r3 and discovered the exact some symptoms.  
It mainly only seems to have corrupted the X root window, although 
some, but not all, images in a web page in firefox show similar 
distortions.  Currently my system is running XOrg 6.7.0.  I did not 
notice this problem with the first patch for sleep.

__Armando Di Cianno

[-- Attachment #1.2: RFC3156.txt --]
[-- Type: text/plain, Size: 65 bytes --]

RFC3156 defines security multipart formats for MIME with OpenPGP.

[-- Attachment #2: Type: application/pgp-signature, Size: 230 bytes --]

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-20 22:08 ` Armando Di Cianno
@ 2004-11-20 22:20   ` Michel Dänzer
  0 siblings, 0 replies; 44+ messages in thread
From: Michel Dänzer @ 2004-11-20 22:20 UTC (permalink / raw)
  To: Armando Di Cianno; +Cc: linuxppc-dev

On Sat, 2004-11-20 at 17:08 -0500, Armando Di Cianno wrote:
> On 2004-11-20 16:47:34 -0500 Sean Neakums <sneakums@zork.net> wrote:
> > I tried this on my 15" AlBook (one of the new 1.5GHz ones), applied to
> > Debian's 2.6.9.  It suspended and resumed fine (and quickly!), but
> > after resume I noticed that images (in Mozilla and the root window)
> > would become corrupted if obscured and made visible again, e.g. by
> > switching tabs, or by moving between a full and an empty workspace.
>=20
> Just a note that I tried this with gentoo's=20
> gentoo-dev-sources-2.6.9-r3 and discovered the exact some symptoms. =20
> It mainly only seems to have corrupted the X root window, although=20
> some, but not all, images in a web page in firefox show similar=20
> distortions.  Currently my system is running XOrg 6.7.0.  I did not=20
> notice this problem with the first patch for sleep.

Sounds like the offscreen pixmap cache gets corrupted. The usual
question for this kind of problem: Does

grep APM /var/log/X{Free86,org}.0.log

show

(II) Open APM successful

?


--=20
Earthling Michel D=C3=A4nzer      |     Debian (powerpc), X and DRI develop=
er
Libre software enthusiast    |   http://svcs.affero.net/rm.php?r=3Ddaenzer

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-20 21:47 Sean Neakums
  2004-11-20 22:08 ` Armando Di Cianno
@ 2004-11-20 22:22 ` Benjamin Herrenschmidt
  2004-11-20 22:31   ` Armando Di Cianno
  2004-11-20 22:41   ` Sean Neakums
  2004-11-21 19:34 ` David Woodhouse
  2 siblings, 2 replies; 44+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-20 22:22 UTC (permalink / raw)
  To: Sean Neakums; +Cc: linuxppc-dev list

On Sat, 2004-11-20 at 21:47 +0000, Sean Neakums wrote:
> > http://gate.crashing.org/~benh/albook-ibookg4-sleep-2.diff
> 
> I tried this on my 15" AlBook (one of the new 1.5GHz ones), applied to
> Debian's 2.6.9.  It suspended and resumed fine (and quickly!), but
> after resume I noticed that images (in Mozilla and the root window)
> would become corrupted if obscured and made visible again, e.g. by
> switching tabs, or by moving between a full and an empty workspace.

Do you have APM emulation enabled in the kenrel config and do you
have /dev/apm_bios ? (check in X log that it properly opens the APM
device and gets notified of suspend and resume events).

Ben.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-20 22:22 ` Benjamin Herrenschmidt
@ 2004-11-20 22:31   ` Armando Di Cianno
  2004-11-20 22:41   ` Sean Neakums
  1 sibling, 0 replies; 44+ messages in thread
From: Armando Di Cianno @ 2004-11-20 22:31 UTC (permalink / raw)
  To: linuxppc-dev


[-- Attachment #1.1: Type: text/plain, Size: 1072 bytes --]

On 2004-11-20 17:22:19 -0500 Benjamin Herrenschmidt 
<benh@kernel.crashing.org> wrote:
> Do you have APM emulation enabled in the kenrel config and do you
> have /dev/apm_bios ? (check in X log that it properly opens the APM
> device and gets notified of suspend and resume events).

Michel Daenzer wrote:
> Sounds like the offscreen pixmap cache gets corrupted. The usual
> question for this kind of problem: Does
> grep APM /var/log/X{Free86,org}.0.log
> show
> (II) Open APM successful

nephiliah root # grep -i apm /usr/src/linux/.config
CONFIG_PMAC_APM_EMU=y

nephiliah root # grep APM /var/log/Xorg.0.log
(II) Open APM successful
(II) Open APM successful

Eyeballing the Xorg.0.log doesn't show any apm irregularities.  (I 
suspect the second "Open APM..." comes from when I just resumed.)

nephiliah root # ls -l /dev/apm_bios
lr-xr-xr-x  1 root root 13 Nov 19 19:57 /dev/apm_bios -> misc/apm_bios
nephiliah root # ls -l /dev/misc/apm_bios
crw-------  1 armando root 10, 134 Dec 31  1969 /dev/misc/apm_bios

Any other info I can offer to help?

__Armando Di Cianno

[-- Attachment #1.2: RFC3156.txt --]
[-- Type: text/plain, Size: 65 bytes --]

RFC3156 defines security multipart formats for MIME with OpenPGP.

[-- Attachment #2: Type: application/pgp-signature, Size: 230 bytes --]

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-20 22:22 ` Benjamin Herrenschmidt
  2004-11-20 22:31   ` Armando Di Cianno
@ 2004-11-20 22:41   ` Sean Neakums
  2004-11-20 22:44     ` Sean Neakums
  2004-11-20 22:52     ` Benjamin Herrenschmidt
  1 sibling, 2 replies; 44+ messages in thread
From: Sean Neakums @ 2004-11-20 22:41 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list

Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:

> On Sat, 2004-11-20 at 21:47 +0000, Sean Neakums wrote:
>> > http://gate.crashing.org/~benh/albook-ibookg4-sleep-2.diff
>> 
>> I tried this on my 15" AlBook (one of the new 1.5GHz ones), applied to
>> Debian's 2.6.9.  It suspended and resumed fine (and quickly!), but
>> after resume I noticed that images (in Mozilla and the root window)
>> would become corrupted if obscured and made visible again, e.g. by
>> switching tabs, or by moving between a full and an empty workspace.
>
> Do you have APM emulation enabled in the kenrel config and do you
> have /dev/apm_bios ? (check in X log that it properly opens the APM
> device and gets notified of suspend and resume events).

It was built modular but not loaded, and /dev/apm_bios was present.
Having exited X, loaded the module and restarted X, I tried
suspend/resume again.  It worked well as before, but the corruption is
still present.  In XFree86.0.log, I now see a "(II) Open APM
successful" instead of "(WW) Open APM failed (/dev/apm_bios) (No such
device) ", but nothing that seems to relate to suspend/resume events.

The corruption doesn't appear immediately; it starts as a light
specking of the image and progressively getting worse with subsequent
redisplayings.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-20 22:41   ` Sean Neakums
@ 2004-11-20 22:44     ` Sean Neakums
  2004-11-20 22:52     ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 44+ messages in thread
From: Sean Neakums @ 2004-11-20 22:44 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list

Sean Neakums <sneakums@zork.net> writes:

> The corruption doesn't appear immediately; it starts as a light
> specking of the image and progressively getting worse with subsequent
> redisplayings.

Also, restarting X does not get rid of the corruption.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-20 22:41   ` Sean Neakums
  2004-11-20 22:44     ` Sean Neakums
@ 2004-11-20 22:52     ` Benjamin Herrenschmidt
  2004-11-20 23:01       ` Sean Neakums
  1 sibling, 1 reply; 44+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-20 22:52 UTC (permalink / raw)
  To: Sean Neakums; +Cc: linuxppc-dev list

On Sat, 2004-11-20 at 22:41 +0000, Sean Neakums wrote:

> It was built modular but not loaded, and /dev/apm_bios was present.
> Having exited X, loaded the module and restarted X, I tried
> suspend/resume again.  It worked well as before, but the corruption is
> still present.  In XFree86.0.log, I now see a "(II) Open APM
> successful" instead of "(WW) Open APM failed (/dev/apm_bios) (No such
> device) ", but nothing that seems to relate to suspend/resume events.
> 
> The corruption doesn't appear immediately; it starts as a light
> specking of the image and progressively getting worse with subsequent
> redisplayings.

No idea at this point. It doesn't happen on the albooks I could test
with here... Can you send me a snapshot of a corrupted screen ? Does
it still happen if you disable dynamic clocks ?
(radeonfb.default_dynclk=-1 on the kernel cmdline and Option
"DynamicClocks" "false" in X if you are using X.org). And if you disable
accel in X ? (Option "NoAccel" "true")

Ben.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-20 22:52     ` Benjamin Herrenschmidt
@ 2004-11-20 23:01       ` Sean Neakums
  2004-11-20 23:25         ` Sean Neakums
  0 siblings, 1 reply; 44+ messages in thread
From: Sean Neakums @ 2004-11-20 23:01 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list

Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:

> On Sat, 2004-11-20 at 22:41 +0000, Sean Neakums wrote:
>
>> It was built modular but not loaded, and /dev/apm_bios was present.
>> Having exited X, loaded the module and restarted X, I tried
>> suspend/resume again.  It worked well as before, but the corruption is
>> still present.  In XFree86.0.log, I now see a "(II) Open APM
>> successful" instead of "(WW) Open APM failed (/dev/apm_bios) (No such
>> device) ", but nothing that seems to relate to suspend/resume events.
>> 
>> The corruption doesn't appear immediately; it starts as a light
>> specking of the image and progressively getting worse with subsequent
>> redisplayings.
>
> No idea at this point. It doesn't happen on the albooks I could test
> with here... Can you send me a snapshot of a corrupted screen ?

Here is a (rather large) screen shot I took, showing the corrupted
root window image.

http://dasbistro.com/~sneakums/corruption.png

> Does it still happen if you disable dynamic clocks ?
> (radeonfb.default_dynclk=-1 on the kernel cmdline and Option
> "DynamicClocks" "false" in X if you are using X.org). And if you
> disable accel in X ? (Option "NoAccel" "true")

I'll try these out.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-20 23:01       ` Sean Neakums
@ 2004-11-20 23:25         ` Sean Neakums
  0 siblings, 0 replies; 44+ messages in thread
From: Sean Neakums @ 2004-11-20 23:25 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list

Sean Neakums <sneakums@zork.net> writes:

> Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
>> Does it still happen if you disable dynamic clocks ?
>> (radeonfb.default_dynclk=-1 on the kernel cmdline and Option
>> "DynamicClocks" "false" in X if you are using X.org). And if you
>> disable accel in X ? (Option "NoAccel" "true")
>
> I'll try these out.

With radeonfb.default_dynclk=-1 alone (using Debian's XFree86 4.3.0,
so no Option "DynamicClocks" "false"), the corruption is slower to
progress, but seems to be the same as the corruption seen with dynamic
clocks enabled.

With NoAccel alone, I do not yet see any corruption; I would expect to
have seen it by now, going by the previous tests.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
       [not found] ` <1100852423.3855.2.camel@gaston>
@ 2004-11-21  0:01   ` Benjamin Herrenschmidt
  2004-11-21  3:00     ` Armando Di Cianno
  2004-11-21 17:37     ` Olof Johansson
  2004-11-22  0:32   ` TEST: Sleep patch #4 Benjamin Herrenschmidt
  1 sibling, 2 replies; 44+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-21  0:01 UTC (permalink / raw)
  To: debian-powerpc@lists.debian.org, linuxppc-dev list; +Cc: gentoo-ppc-user

On Fri, 2004-11-19 at 19:20 +1100, Benjamin Herrenschmidt wrote:
> On Fri, 2004-11-19 at 17:56 +1100, Benjamin Herrenschmidt wrote:
> > So here's the new patch, it replaces the previous one for Aluminium
> > PowerBooks, and is still against 2.6.9. I'll do something against 2.6.10
> > when that one is out (it's a bit late to get that merged with Linus,
> > 2.6.10 is in freeze mode now) and I hope to get all of that in 2.6.11.
> >
> > .../...
> 
> Ok, I already found a bug, occasional lockups on boot and when setting
> the backlight. I uploaded a new version at:

Here's a 3rd version. It may or may not help, as I didn't have a chance
to test this one on either albook or ibook g4 yet. I added saving and
restoring of a few more registers that may fix the Xv problem (or not...
depends what X does at this point) and eventually some corruption
problem (the bandwidth related registers weren't restored).

It also adds an unrelated fix to the cpufreq code for powerbooks using
PMU-based frequency switching which would occasionally cause hangs at
boot.

http://gate.crashing.org/~benh/albook-ibookg4-sleep-3.diff

Ben.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-21  0:01   ` Benjamin Herrenschmidt
@ 2004-11-21  3:00     ` Armando Di Cianno
  2004-11-21  7:11       ` Benjamin Herrenschmidt
  2004-11-21 17:37     ` Olof Johansson
  1 sibling, 1 reply; 44+ messages in thread
From: Armando Di Cianno @ 2004-11-21  3:00 UTC (permalink / raw)
  To: linuxppc-dev

On 2004-11-20 19:01:08 -0500 Benjamin Herrenschmidt 
<benh@kernel.crashing.org> wrote:
> Here's a 3rd version. It may or may not help, as I didn't have a 
> chance
> to test this one on either albook or ibook g4 yet. I added saving and
> restoring of a few more registers that may fix the Xv problem (or 
> not...
> depends what X does at this point) and eventually some corruption
> problem (the bandwidth related registers weren't restored).
> 
> It also adds an unrelated fix to the cpufreq code for powerbooks using
> PMU-based frequency switching which would occasionally cause hangs at
> boot.

Using 'NoAccel' in xorg.conf seems to hide the symptoms of the bug, or 
remove the bug.

However, without that option, with this patch, the problem seems "less 
bad", if that's even possible.  It takes longer for the root window to 
get "ridiculously speckled."  Not sure if that info helps at all. :-)

Not sure if I mentioned that, the first patch (the one sent a couple 
weeks ago) did not seem to have this problem.

Thanks,
__Armando Di Cianno

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-21  3:00     ` Armando Di Cianno
@ 2004-11-21  7:11       ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 44+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-21  7:11 UTC (permalink / raw)
  To: Armando Di Cianno; +Cc: linuxppc-dev list

On Sat, 2004-11-20 at 22:00 -0500, Armando Di Cianno wrote:

> Using 'NoAccel' in xorg.conf seems to hide the symptoms of the bug, or 
> remove the bug.
> 
> However, without that option, with this patch, the problem seems "less 
> bad", if that's even possible.  It takes longer for the root window to 
> get "ridiculously speckled."  Not sure if that info helps at all. :-)
> 
> Not sure if I mentioned that, the first patch (the one sent a couple 
> weeks ago) did not seem to have this problem.

Yes, you did mention it, which is weird. I'll have to spend some time
comparing the 2 versions and see if I can spot something.

Ben

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-21  0:01   ` Benjamin Herrenschmidt
  2004-11-21  3:00     ` Armando Di Cianno
@ 2004-11-21 17:37     ` Olof Johansson
  2004-11-21 21:36       ` Benjamin Herrenschmidt
  2004-11-22  8:25       ` David Woodhouse
  1 sibling, 2 replies; 44+ messages in thread
From: Olof Johansson @ 2004-11-21 17:37 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev

On Sun, Nov 21, 2004 at 11:01:08AM +1100, Benjamin Herrenschmidt wrote:
> > Ok, I already found a bug, occasional lockups on boot and when setting
> > the backlight. I uploaded a new version at:
> 
> Here's a 3rd version. It may or may not help, as I didn't have a chance
> to test this one on either albook or ibook g4 yet. I added saving and
> restoring of a few more registers that may fix the Xv problem (or not...
> depends what X does at this point) and eventually some corruption
> problem (the bandwidth related registers weren't restored).

This one caused problems for me. Looks like the backlight got turned off
at boot, I had to sleep it and wake it up to get it back.


-Olof

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-20 21:47 Sean Neakums
  2004-11-20 22:08 ` Armando Di Cianno
  2004-11-20 22:22 ` Benjamin Herrenschmidt
@ 2004-11-21 19:34 ` David Woodhouse
  2 siblings, 0 replies; 44+ messages in thread
From: David Woodhouse @ 2004-11-21 19:34 UTC (permalink / raw)
  To: Sean Neakums; +Cc: linuxppc-dev

On Sat, 2004-11-20 at 21:47 +0000, Sean Neakums wrote:
> > http://gate.crashing.org/~benh/albook-ibookg4-sleep-2.diff
> 
> I tried this on my 15" AlBook (one of the new 1.5GHz ones), applied to
> Debian's 2.6.9.  It suspended and resumed fine (and quickly!), but
> after resume I noticed that images (in Mozilla and the root window)
> would become corrupted if obscured and made visible again, e.g. by
> switching tabs, or by moving between a full and an empty workspace.

I've seen similar behaviour in firefox on a 17" AlBook with Fedora Core
3. I can't remember if it was with Ben's first or second patch. Neither
can I reproduce it now with the second version.

-- 
dwmw2

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-21 17:37     ` Olof Johansson
@ 2004-11-21 21:36       ` Benjamin Herrenschmidt
  2004-11-22  8:25       ` David Woodhouse
  1 sibling, 0 replies; 44+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-21 21:36 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linuxppc-dev list

On Sun, 2004-11-21 at 11:37 -0600, Olof Johansson wrote:
> On Sun, Nov 21, 2004 at 11:01:08AM +1100, Benjamin Herrenschmidt wrote:
> > > Ok, I already found a bug, occasional lockups on boot and when setting
> > > the backlight. I uploaded a new version at:
> > 
> > Here's a 3rd version. It may or may not help, as I didn't have a chance
> > to test this one on either albook or ibook g4 yet. I added saving and
> > restoring of a few more registers that may fix the Xv problem (or not...
> > depends what X does at this point) and eventually some corruption
> > problem (the bandwidth related registers weren't restored).
> 
> This one caused problems for me. Looks like the backlight got turned off
> at boot, I had to sleep it and wake it up to get it back.

There have been no change regarding backlight at boot, could just be
some latent problem... Next time it happens, test what happens if turn
the backlight all the way down to 0 (with the backlight keys), wait a
bit, then back up.

Ben.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* TEST: Sleep patch #4
       [not found] ` <1100852423.3855.2.camel@gaston>
  2004-11-21  0:01   ` Benjamin Herrenschmidt
@ 2004-11-22  0:32   ` Benjamin Herrenschmidt
  2004-11-22  3:12     ` Armando Di Cianno
                       ` (3 more replies)
  1 sibling, 4 replies; 44+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-22  0:32 UTC (permalink / raw)
  To: debian-powerpc@lists.debian.org, linuxppc-dev list; +Cc: gentoo-ppc-user

Ok, here's the 4th iteration of the patch. It includes John Steele Scott fixes for
cpufreq and the sound driver and fixes a problem where memory refresh wouldn't properly
be re-enabled on the video chip upon wakeup. I also cleaned a bit more the MDLL reset
code for r300, plus a couple of other things.

http://gate.crashing.org/~benh/albook-ibookg4-sleep-4.diff

Ben.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep patch #4
  2004-11-22  0:32   ` TEST: Sleep patch #4 Benjamin Herrenschmidt
@ 2004-11-22  3:12     ` Armando Di Cianno
  2004-11-22 13:29     ` Sean Neakums
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 44+ messages in thread
From: Armando Di Cianno @ 2004-11-22  3:12 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, gentoo-ppc-user

On 2004-11-21 19:32:58 -0500 Benjamin Herrenschmidt 
<benh@kernel.crashing.org> wrote:
> Ok, here's the 4th iteration of the patch. It includes John Steele 
> Scott 
> fixes for
> cpufreq and the sound driver and fixes a problem where memory refresh 
> wouldn't properly
> be re-enabled on the video chip upon wakeup. I also cleaned a bit 
> more the 
> MDLL reset
> code for r300, plus a couple of other things.

Tested the 4th version of this patch, and things do seem to be working 
as expected on the AluBook I have (1.5Ghz, 15'').

Once again, Ben: you rock! :-)

__Armando Di Cianno

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-21 17:37     ` Olof Johansson
  2004-11-21 21:36       ` Benjamin Herrenschmidt
@ 2004-11-22  8:25       ` David Woodhouse
  1 sibling, 0 replies; 44+ messages in thread
From: David Woodhouse @ 2004-11-22  8:25 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linuxppc-dev

On Sun, 2004-11-21 at 11:37 -0600, Olof Johansson wrote: 
> On Sun, Nov 21, 2004 at 11:01:08AM +1100, Benjamin Herrenschmidt wrote:
> > > Ok, I already found a bug, occasional lockups on boot and when setting
> > > the backlight. I uploaded a new version at:
> > 
> > Here's a 3rd version. It may or may not help, as I didn't have a chance
> > to test this one on either albook or ibook g4 yet. I added saving and
> > restoring of a few more registers that may fix the Xv problem (or not...
> > depends what X does at this point) and eventually some corruption
> > problem (the bandwidth related registers weren't restored).
> 
> This one caused problems for me. Looks like the backlight got turned off
> at boot, I had to sleep it and wake it up to get it back.

I've seen that since the first version. I also have to restart
pbbuttonsd to make it work again after sleep. I keep logging in on tty1
to run 'fblevel 15'.

Actually the backlight tends to turn off some time later, too. It's not
just that it's off after sleep.

-- 
dwmw2

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep patch #4
  2004-11-22  0:32   ` TEST: Sleep patch #4 Benjamin Herrenschmidt
  2004-11-22  3:12     ` Armando Di Cianno
@ 2004-11-22 13:29     ` Sean Neakums
  2004-11-22 16:38       ` Keith Conger
  2004-11-22 17:04     ` Michael Schmitz
  2004-11-23  1:40     ` Chris Anderson
  3 siblings, 1 reply; 44+ messages in thread
From: Sean Neakums @ 2004-11-22 13:29 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: linuxppc-dev list, gentoo-ppc-user,
	debian-powerpc@lists.debian.org

Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:

> Ok, here's the 4th iteration of the patch. It includes John Steele
> Scott fixes for cpufreq and the sound driver and fixes a problem
> where memory refresh wouldn't properly be re-enabled on the video
> chip upon wakeup. I also cleaned a bit more the MDLL reset code for
> r300, plus a couple of other things.
>
> http://gate.crashing.org/~benh/albook-ibookg4-sleep-4.diff

Works great now (15" 1.5GHz PB).

Many thanks!

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep patch #4
  2004-11-22 13:29     ` Sean Neakums
@ 2004-11-22 16:38       ` Keith Conger
  2004-11-22 16:58         ` Keith Conger
                           ` (3 more replies)
  0 siblings, 4 replies; 44+ messages in thread
From: Keith Conger @ 2004-11-22 16:38 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, debian-powerpc@lists.debian.org,
	linuxppc-dev list, gentoo-ppc-user

Hi,

Works great here also (15" 1GHz PB). One issue which may be unrelated
I have some sound issues. For instance one a sound is played it sounds
fine but if a sound is played right after its volume is extremely low.
But with headphones this doesn't occur.

Thanks again for your hard work.

Keith


On Mon, 22 Nov 2004 13:29:44 +0000, Sean Neakums <sneakums@zork.net> wrote:
> Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> 
> > Ok, here's the 4th iteration of the patch. It includes John Steele
> > Scott fixes for cpufreq and the sound driver and fixes a problem
> > where memory refresh wouldn't properly be re-enabled on the video
> > chip upon wakeup. I also cleaned a bit more the MDLL reset code for
> > r300, plus a couple of other things.
> >
> > http://gate.crashing.org/~benh/albook-ibookg4-sleep-4.diff
> 
> Works great now (15" 1.5GHz PB).
> 
> Many thanks!
> 
> 
> 
> 
> --
> To UNSUBSCRIBE, email to debian-powerpc-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 
> 


-- 
Keith Conger
keith DOT conger AT gmail DOT com
http://pimpstation.org

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep patch #4
  2004-11-22 16:38       ` Keith Conger
@ 2004-11-22 16:58         ` Keith Conger
  2004-11-22 21:48           ` Benjamin Herrenschmidt
  2004-11-22 18:36         ` Sean Neakums
                           ` (2 subsequent siblings)
  3 siblings, 1 reply; 44+ messages in thread
From: Keith Conger @ 2004-11-22 16:58 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, debian-powerpc@lists.debian.org,
	linuxppc-dev list

Hi,

Two things I forgot to include, the sound problem happens with or
without going to sleep. Also here is something that apears in my
dmesg:
Oops: kernel access of bad area, sig: 11 [#3]
PREEMPT
NIP: D22FB074 LR: D22FB8C0 SP: C548FDB0 REGS: c548fd00 TRAP: 0300   
Not taintedMSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DAR: D23032A4, DSISR: 40000000
TASK = cfe60c90[10505] 'gst-launch-0.8' THREAD: c548e000Last syscall: 4
GPR00: 000007FC C548FDB0 CFE60C90 CDE724A0 C0BA6AA0 C0BA6580 00000200 00000B03
GPR08: C0BA6AE8 D2302AA8 000007FC D2302AE8 CDE72244 1001C6C4 00000014 10021340
GPR16: 00000003 100213F8 00000000 10021340 3007502C 00001000 1002D028 00000000
GPR24: 00000000 00000000 C07579A0 00000000 C0BA6AA0 CDE72510 CDE724A0 00000200
NIP [d22fb074] resample_expand+0x44/0x35c [snd_pcm_oss]
LR [d22fb8c0] rate_transfer+0x80/0x88 [snd_pcm_oss]
Call trace:
 [d22fb8c0] rate_transfer+0x80/0x88 [snd_pcm_oss]
 [d22f8798] snd_pcm_plug_write_transfer+0xd4/0x14c [snd_pcm_oss]
 [d22f3520] snd_pcm_oss_write2+0xb0/0x128 [snd_pcm_oss]
 [d22f3774] snd_pcm_oss_write1+0x1dc/0x20c [snd_pcm_oss]
 [d22f6180] snd_pcm_oss_write+0x64/0xb4 [snd_pcm_oss]
 [c0069c44] vfs_write+0xdc/0x158
 [c0069da4] sys_write+0x50/0x94
 [c0007e30] ret_from_syscall+0x0/0x4c
adt746x: Setting speed to: 128 for CPU fan.
adt746x: Stopping CPU fan.
adt746x: Setting speed to: 0 for CPU fan.
adt746x: Setting speed to: 128 for CPU fan.
Oops: kernel access of bad area, sig: 11 [#4]
PREEMPT
NIP: D22FB074 LR: D22FB8C0 SP: C5C33DB0 REGS: c5c33d00 TRAP: 0300   
Not taintedMSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DAR: D23032A4, DSISR: 40000000
TASK = c78cac90[10759] 'gst-launch-0.8' THREAD: c5c32000Last syscall: 4
GPR00: 000007FC C5C33DB0 C78CAC90 CDE724A0 CF2D97C0 CFFD7BA0 00000200 00000B03
GPR08: C0BA6A88 D2302AA8 000007FC D2302AE8 CDE72844 1001C6C4 00000014 10021340
GPR16: 00000003 100213F8 00000000 10021340 3007502C 00001000 1002D028 00000000
GPR24: 00000000 00000000 C07579A0 00000000 CF2D97C0 CDE72510 CDE724A0 00000200
NIP [d22fb074] resample_expand+0x44/0x35c [snd_pcm_oss]
LR [d22fb8c0] rate_transfer+0x80/0x88 [snd_pcm_oss]
Call trace:
 [d22fb8c0] rate_transfer+0x80/0x88 [snd_pcm_oss]
 [d22f8798] snd_pcm_plug_write_transfer+0xd4/0x14c [snd_pcm_oss]
 [d22f3520] snd_pcm_oss_write2+0xb0/0x128 [snd_pcm_oss]
 [d22f3774] snd_pcm_oss_write1+0x1dc/0x20c [snd_pcm_oss]
 [d22f6180] snd_pcm_oss_write+0x64/0xb4 [snd_pcm_oss]
 [c0069c44] vfs_write+0xdc/0x158
 [c0069da4] sys_write+0x50/0x94
 [c0007e30] ret_from_syscall+0x0/0x4c



On Mon, 22 Nov 2004 11:38:09 -0500, Keith Conger <keith.conger@gmail.com> wrote:
> Hi,
> 
> Works great here also (15" 1GHz PB). One issue which may be unrelated
> I have some sound issues. For instance one a sound is played it sounds
> fine but if a sound is played right after its volume is extremely low.
> But with headphones this doesn't occur.
> 
> Thanks again for your hard work.
> 
> Keith
> 
> 
> 
> 
> On Mon, 22 Nov 2004 13:29:44 +0000, Sean Neakums <sneakums@zork.net> wrote:
> > Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> >
> > > Ok, here's the 4th iteration of the patch. It includes John Steele
> > > Scott fixes for cpufreq and the sound driver and fixes a problem
> > > where memory refresh wouldn't properly be re-enabled on the video
> > > chip upon wakeup. I also cleaned a bit more the MDLL reset code for
> > > r300, plus a couple of other things.
> > >
> > > http://gate.crashing.org/~benh/albook-ibookg4-sleep-4.diff
> >
> > Works great now (15" 1.5GHz PB).
> >
> > Many thanks!
> >
> >
> >
> >
> > --
> > To UNSUBSCRIBE, email to debian-powerpc-REQUEST@lists.debian.org
> > with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> >
> >
> 
> 
> --
> Keith Conger
> keith DOT conger AT gmail DOT com
> http://pimpstation.org
> 


-- 
Keith Conger
keith DOT conger AT gmail DOT com
http://pimpstation.org

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep patch #4
  2004-11-22  0:32   ` TEST: Sleep patch #4 Benjamin Herrenschmidt
  2004-11-22  3:12     ` Armando Di Cianno
  2004-11-22 13:29     ` Sean Neakums
@ 2004-11-22 17:04     ` Michael Schmitz
  2004-11-22 21:50       ` Benjamin Herrenschmidt
  2004-11-23  1:40     ` Chris Anderson
  3 siblings, 1 reply; 44+ messages in thread
From: Michael Schmitz @ 2004-11-22 17:04 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: linuxppc-dev list, gentoo-ppc-user,
	debian-powerpc@lists.debian.org

> Ok, here's the 4th iteration of the patch. It includes John Steele Scott fixes for
> cpufreq and the sound driver and fixes a problem where memory refresh wouldn't properly
> be re-enabled on the video chip upon wakeup. I also cleaned a bit more the MDLL reset
> code for r300, plus a couple of other things.
>
> http://gate.crashing.org/~benh/albook-ibookg4-sleep-4.diff

Sorry for coming late to the party ... the current code works nicely on
the 17" PB. On the first boot with that code, I had the PLL freak out (or
so it looked like) but I couldn't reproduce that. Needless to say, the
new PLL fixup code produces the same dividers as the hardcoded fixup
before, so it should work :-)

	Michael

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep patch #4
  2004-11-22 16:38       ` Keith Conger
  2004-11-22 16:58         ` Keith Conger
@ 2004-11-22 18:36         ` Sean Neakums
  2004-11-22 21:52           ` Benjamin Herrenschmidt
  2004-11-23  7:58           ` Guido Guenther
  2004-11-22 21:13         ` Michel Dänzer
  2004-11-22 21:48         ` Benjamin Herrenschmidt
  3 siblings, 2 replies; 44+ messages in thread
From: Sean Neakums @ 2004-11-22 18:36 UTC (permalink / raw)
  To: Keith Conger
  Cc: gentoo-ppc-user, debian-powerpc@lists.debian.org,
	linuxppc-dev list

Keith Conger <keith.conger@gmail.com> writes:

> Works great here also (15" 1GHz PB). One issue which may be unrelated
> I have some sound issues. For instance one a sound is played it sounds
> fine but if a sound is played right after its volume is extremely low.
> But with headphones this doesn't occur.

I have a similar problem post-resume -- sound from the speakers is
very quiet (although it seems to be louder at the very beginning) and
I had to plug and re-plug the headphones to get sound from them.  I
tried unloading and reloading snd_powermac, to no avail.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep patch #4
  2004-11-22 16:38       ` Keith Conger
  2004-11-22 16:58         ` Keith Conger
  2004-11-22 18:36         ` Sean Neakums
@ 2004-11-22 21:13         ` Michel Dänzer
  2004-11-22 21:48         ` Benjamin Herrenschmidt
  3 siblings, 0 replies; 44+ messages in thread
From: Michel Dänzer @ 2004-11-22 21:13 UTC (permalink / raw)
  To: Keith Conger
  Cc: gentoo-ppc-user, debian-powerpc@lists.debian.org,
	linuxppc-dev list

On Mon, 2004-11-22 at 11:38 -0500, Keith Conger wrote:
>=20
> Works great here also (15" 1GHz PB). One issue which may be unrelated
> I have some sound issues. For instance one a sound is played it sounds
> fine but if a sound is played right after its volume is extremely low.
> But with headphones this doesn't occur.

Make sure that DRC is disabled or that it's set up to operate on a
reasonable (i.e. non-empty :) range.


--=20
Earthling Michel D=C3=A4nzer      |     Debian (powerpc), X and DRI develop=
er
Libre software enthusiast    |   http://svcs.affero.net/rm.php?r=3Ddaenzer

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep patch #4
  2004-11-22 16:38       ` Keith Conger
                           ` (2 preceding siblings ...)
  2004-11-22 21:13         ` Michel Dänzer
@ 2004-11-22 21:48         ` Benjamin Herrenschmidt
  3 siblings, 0 replies; 44+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-22 21:48 UTC (permalink / raw)
  To: Keith Conger
  Cc: linuxppc-dev list, gentoo-ppc-user,
	debian-powerpc@lists.debian.org

On Mon, 2004-11-22 at 11:38 -0500, Keith Conger wrote:
> Hi,
> 
> Works great here also (15" 1GHz PB). One issue which may be unrelated
> I have some sound issues. For instance one a sound is played it sounds
> fine but if a sound is played right after its volume is extremely low.
> But with headphones this doesn't occur.

That's problems with the sound drivers...

Ben.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep patch #4
  2004-11-22 16:58         ` Keith Conger
@ 2004-11-22 21:48           ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 44+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-22 21:48 UTC (permalink / raw)
  To: Keith Conger; +Cc: linuxppc-dev list, debian-powerpc@lists.debian.org

On Mon, 2004-11-22 at 11:58 -0500, Keith Conger wrote:
> Hi,
> 
> Two things I forgot to include, the sound problem happens with or
> without going to sleep. Also here is something that apears in my
> dmesg:
> Oops: kernel access of bad area, sig: 11 [#3]
> PREEMPT
>
> .../...

Alsa bugs (as well). You should probably report this to the proper
driver author/maintainer.

Ben.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep patch #4
  2004-11-22 17:04     ` Michael Schmitz
@ 2004-11-22 21:50       ` Benjamin Herrenschmidt
  2004-11-23  8:05         ` Michael Schmitz
  2004-11-23 12:28         ` Michael Schmitz
  0 siblings, 2 replies; 44+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-22 21:50 UTC (permalink / raw)
  To: Michael Schmitz
  Cc: linuxppc-dev list, gentoo-ppc-user,
	debian-powerpc@lists.debian.org

On Mon, 2004-11-22 at 18:04 +0100, Michael Schmitz wrote:
> > Ok, here's the 4th iteration of the patch. It includes John Steele Scott fixes for
> > cpufreq and the sound driver and fixes a problem where memory refresh wouldn't properly
> > be re-enabled on the video chip upon wakeup. I also cleaned a bit more the MDLL reset
> > code for r300, plus a couple of other things.
> >
> > http://gate.crashing.org/~benh/albook-ibookg4-sleep-4.diff
> 
> Sorry for coming late to the party ... the current code works nicely on
> the 17" PB. On the first boot with that code, I had the PLL freak out (or
> so it looked like) but I couldn't reproduce that. Needless to say, the
> new PLL fixup code produces the same dividers as the hardcoded fixup
> before, so it should work :-)

It reads them from OF at boot. What do you mean by "freak out" ? the
usual problem with those models where the display gets all fuzzy ? I'm
not completely sure what's up, I tend to blame the panel power sequence
nowadays ...

Ben.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep patch #4
  2004-11-22 18:36         ` Sean Neakums
@ 2004-11-22 21:52           ` Benjamin Herrenschmidt
  2004-11-23  8:27             ` Sean Neakums
  2004-11-23  7:58           ` Guido Guenther
  1 sibling, 1 reply; 44+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-22 21:52 UTC (permalink / raw)
  To: Sean Neakums
  Cc: linuxppc-dev list, Keith Conger, debian-powerpc@lists.debian.org,
	gentoo-ppc-user

On Mon, 2004-11-22 at 18:36 +0000, Sean Neakums wrote:
> Keith Conger <keith.conger@gmail.com> writes:
> 
> > Works great here also (15" 1GHz PB). One issue which may be unrelated
> > I have some sound issues. For instance one a sound is played it sounds
> > fine but if a sound is played right after its volume is extremely low.
> > But with headphones this doesn't occur.
> 
> I have a similar problem post-resume -- sound from the speakers is
> very quiet (although it seems to be louder at the very beginning) and
> I had to plug and re-plug the headphones to get sound from them.  I
> tried unloading and reloading snd_powermac, to no avail.

Tried playing with the DRC setting in Alsa mixer ?

Ben.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep patch #4
  2004-11-22  0:32   ` TEST: Sleep patch #4 Benjamin Herrenschmidt
                       ` (2 preceding siblings ...)
  2004-11-22 17:04     ` Michael Schmitz
@ 2004-11-23  1:40     ` Chris Anderson
  3 siblings, 0 replies; 44+ messages in thread
From: Chris Anderson @ 2004-11-23  1:40 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: linuxppc-dev list, gentoo-ppc-user,
	debian-powerpc@lists.debian.org

On Mon, Nov 22, 2004 at 11:32:58AM +1100, Benjamin Herrenschmidt wrote:
> Ok, here's the 4th iteration of the patch. It includes John Steele Scott fixes for
> cpufreq and the sound driver and fixes a problem where memory refresh wouldn't properly
> be re-enabled on the video chip upon wakeup. I also cleaned a bit more the MDLL reset
> code for r300, plus a couple of other things.
> 
> http://gate.crashing.org/~benh/albook-ibookg4-sleep-4.diff
> 
> Ben.

Works like a charm here.

> 
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-powerpc-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 

-- 
Chris Anderson <chris@nullcode.org>
ICQ: 72021847  Jabber: chrisja@jabber.org
20B2 CB34 8AA5 05BC A90C  2CDD 2768 D4B4 2B93 424B

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep patch #4
  2004-11-22 18:36         ` Sean Neakums
  2004-11-22 21:52           ` Benjamin Herrenschmidt
@ 2004-11-23  7:58           ` Guido Guenther
  2004-11-23  8:40             ` Sean Neakums
  1 sibling, 1 reply; 44+ messages in thread
From: Guido Guenther @ 2004-11-23  7:58 UTC (permalink / raw)
  To: Keith Conger, Benjamin Herrenschmidt,
	debian-powerpc@lists.debian.org, linuxppc-dev list,
	gentoo-ppc-user

On Mon, Nov 22, 2004 at 06:36:02PM +0000, Sean Neakums wrote:
> Keith Conger <keith.conger@gmail.com> writes:
> 
> > Works great here also (15" 1GHz PB). One issue which may be unrelated
> > I have some sound issues. For instance one a sound is played it sounds
> > fine but if a sound is played right after its volume is extremely low.
> > But with headphones this doesn't occur.
> 
> I have a similar problem post-resume -- sound from the speakers is
> very quiet (although it seems to be louder at the very beginning) and
> I had to plug and re-plug the headphones to get sound from them.  I
> tried unloading and reloading snd_powermac, to no avail.
Could you check if:
 http://honk.physik.uni-konstanz.de/~agx/linux-ppc/kernel/alsa-2.6.9-rc2-revert.diff
helps?
 -- Guido

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep patch #4
  2004-11-22 21:50       ` Benjamin Herrenschmidt
@ 2004-11-23  8:05         ` Michael Schmitz
  2004-11-23 12:28         ` Michael Schmitz
  1 sibling, 0 replies; 44+ messages in thread
From: Michael Schmitz @ 2004-11-23  8:05 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, debian-powerpc@lists.debian.org

> > > http://gate.crashing.org/~benh/albook-ibookg4-sleep-4.diff
> >
> > Sorry for coming late to the party ... the current code works nicely on
> > the 17" PB. On the first boot with that code, I had the PLL freak out (or
> > so it looked like) but I couldn't reproduce that. Needless to say, the
> > new PLL fixup code produces the same dividers as the hardcoded fixup
> > before, so it should work :-)
>
> It reads them from OF at boot. What do you mean by "freak out" ? the
> usual problem with those models where the display gets all fuzzy ? I'm

Yep - the display get totally unreadable, worse than before when the PLL
wouldn't lock properly. When I turned down the backlight (using the
f-keys), it would switch off and not come back up until X had fully
started. Though that might be a bug in pbbuttonsd as well, to be honest (I
turned the backlight off before pbbuttonsd started, perhaps).

> not completely sure what's up, I tend to blame the panel power sequence
> nowadays ...

Anything I can do to test that?

	Michael

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep patch #4
  2004-11-22 21:52           ` Benjamin Herrenschmidt
@ 2004-11-23  8:27             ` Sean Neakums
  2004-11-23 23:25               ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 44+ messages in thread
From: Sean Neakums @ 2004-11-23  8:27 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: linuxppc-dev list, Keith Conger, debian-powerpc@lists.debian.org,
	gentoo-ppc-user

Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:

> On Mon, 2004-11-22 at 18:36 +0000, Sean Neakums wrote:
>> Keith Conger <keith.conger@gmail.com> writes:
>> 
>> > Works great here also (15" 1GHz PB). One issue which may be unrelated
>> > I have some sound issues. For instance one a sound is played it sounds
>> > fine but if a sound is played right after its volume is extremely low.
>> > But with headphones this doesn't occur.
>> 
>> I have a similar problem post-resume -- sound from the speakers is
>> very quiet (although it seems to be louder at the very beginning) and
>> I had to plug and re-plug the headphones to get sound from them.  I
>> tried unloading and reloading snd_powermac, to no avail.
>
> Tried playing with the DRC setting in Alsa mixer ?

I hadn't noticed that this was happening pre-suspend, too, and
cranking DRC up fixed it.  Thanks!

On resume this morning, though, the display was behaving oddly, both
in X and on the console: it was sort of shimmering, split and repeated
about 1/5 of the screen's width to the right in what looked like
8-pixel horizontal stripes.  Rebooting seemed to sort it.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep patch #4
  2004-11-23  7:58           ` Guido Guenther
@ 2004-11-23  8:40             ` Sean Neakums
  0 siblings, 0 replies; 44+ messages in thread
From: Sean Neakums @ 2004-11-23  8:40 UTC (permalink / raw)
  To: Guido Guenther
  Cc: Keith Conger, debian-powerpc@lists.debian.org, gentoo-ppc-user,
	linuxppc-dev list

Guido Guenther <agx@debian.org> writes:

> On Mon, Nov 22, 2004 at 06:36:02PM +0000, Sean Neakums wrote:
>> Keith Conger <keith.conger@gmail.com> writes:
>> 
>> > Works great here also (15" 1GHz PB). One issue which may be unrelated
>> > I have some sound issues. For instance one a sound is played it sounds
>> > fine but if a sound is played right after its volume is extremely low.
>> > But with headphones this doesn't occur.
>> 
>> I have a similar problem post-resume -- sound from the speakers is
>> very quiet (although it seems to be louder at the very beginning) and
>> I had to plug and re-plug the headphones to get sound from them.  I
>> tried unloading and reloading snd_powermac, to no avail.
> Could you check if:
>  http://honk.physik.uni-konstanz.de/~agx/linux-ppc/kernel/alsa-2.6.9-rc2-revert.diff
> helps?

Increasing DRC Range as suggested by Ben seems to fix my problem.

I note that this patch seems to have a few hunks relating to 48KHz --
does this do anything to help applications that do not resample audio
to 44.1KHz?  The asoundrcs using dmix to adjust the rate that I have
seen posted produce rather poor sound.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep patch #4
  2004-11-22 21:50       ` Benjamin Herrenschmidt
  2004-11-23  8:05         ` Michael Schmitz
@ 2004-11-23 12:28         ` Michael Schmitz
  2004-11-23 23:27           ` Benjamin Herrenschmidt
  1 sibling, 1 reply; 44+ messages in thread
From: Michael Schmitz @ 2004-11-23 12:28 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, debian-powerpc@lists.debian.org

> It reads them from OF at boot. What do you mean by "freak out" ? the
> usual problem with those models where the display gets all fuzzy ? I'm
> not completely sure what's up, I tend to blame the panel power sequence
> nowadays ...

Just got a garbled display when waking up from sleep. That seems to
support your panel powerup idea. A second sleep/wake cycle fixed it.

Looking at radeon_base.c:radeon_screen_blank() (line 1045) we have:

                        val &= ~(LVDS_BL_MOD_EN);
                        udelay(100);
                        val &= ~(LVDS_ON | LVDS_EN);
                        OUTREG(LVDS_GEN_CNTL, val);


Is there an OUTREG(LVDS_GEN_CNTL, val); missing before the udelay(100) ??

That's in the panel blank code, not the unblank code though. Doesn't seem
to hurt to put the OUTREG in.

	Michael

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep patch #4
  2004-11-23  8:27             ` Sean Neakums
@ 2004-11-23 23:25               ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 44+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-23 23:25 UTC (permalink / raw)
  To: Sean Neakums
  Cc: linuxppc-dev list, Keith Conger, debian-powerpc@lists.debian.org,
	gentoo-ppc-user

On Tue, 2004-11-23 at 08:27 +0000, Sean Neakums wrote:

> On resume this morning, though, the display was behaving oddly, both
> in X and on the console: it was sort of shimmering, split and repeated
> about 1/5 of the screen's width to the right in what looked like
> 8-pixel horizontal stripes.  Rebooting seemed to sort it.

Next time, please try to take a picture of the screen. Also, try
sleeping & waking up again and tell me if that helps.

Ben.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: TEST: Sleep patch #4
  2004-11-23 12:28         ` Michael Schmitz
@ 2004-11-23 23:27           ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 44+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-23 23:27 UTC (permalink / raw)
  To: Michael Schmitz; +Cc: linuxppc-dev list, debian-powerpc@lists.debian.org


> Looking at radeon_base.c:radeon_screen_blank() (line 1045) we have:
> 
>                         val &= ~(LVDS_BL_MOD_EN);
>                         udelay(100);
>                         val &= ~(LVDS_ON | LVDS_EN);
>                         OUTREG(LVDS_GEN_CNTL, val);
> 
> 
> Is there an OUTREG(LVDS_GEN_CNTL, val); missing before the udelay(100) ??
> 
> That's in the panel blank code, not the unblank code though. Doesn't seem
> to hurt to put the OUTREG in.

won't hurt, dunno if it will help tho... could also be a different
issue, like the spread spectrum PLL not locking properly or something
like that ... I don't really know.

Ben.

^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2004-11-23 23:27 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-19  6:56 TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based) Benjamin Herrenschmidt
2004-11-19  8:50 ` David Woodhouse
2004-11-19 10:33   ` Benjamin Herrenschmidt
2004-11-19 11:06 ` Gabriel Paubert
2004-11-19 22:14   ` Benjamin Herrenschmidt
2004-11-19 19:02 ` Olof Johansson
     [not found] ` <1100852423.3855.2.camel@gaston>
2004-11-21  0:01   ` Benjamin Herrenschmidt
2004-11-21  3:00     ` Armando Di Cianno
2004-11-21  7:11       ` Benjamin Herrenschmidt
2004-11-21 17:37     ` Olof Johansson
2004-11-21 21:36       ` Benjamin Herrenschmidt
2004-11-22  8:25       ` David Woodhouse
2004-11-22  0:32   ` TEST: Sleep patch #4 Benjamin Herrenschmidt
2004-11-22  3:12     ` Armando Di Cianno
2004-11-22 13:29     ` Sean Neakums
2004-11-22 16:38       ` Keith Conger
2004-11-22 16:58         ` Keith Conger
2004-11-22 21:48           ` Benjamin Herrenschmidt
2004-11-22 18:36         ` Sean Neakums
2004-11-22 21:52           ` Benjamin Herrenschmidt
2004-11-23  8:27             ` Sean Neakums
2004-11-23 23:25               ` Benjamin Herrenschmidt
2004-11-23  7:58           ` Guido Guenther
2004-11-23  8:40             ` Sean Neakums
2004-11-22 21:13         ` Michel Dänzer
2004-11-22 21:48         ` Benjamin Herrenschmidt
2004-11-22 17:04     ` Michael Schmitz
2004-11-22 21:50       ` Benjamin Herrenschmidt
2004-11-23  8:05         ` Michael Schmitz
2004-11-23 12:28         ` Michael Schmitz
2004-11-23 23:27           ` Benjamin Herrenschmidt
2004-11-23  1:40     ` Chris Anderson
  -- strict thread matches above, loose matches on Subject: below --
2004-11-19 22:10 TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based) Benjamin Herrenschmidt
2004-11-20 21:47 Sean Neakums
2004-11-20 22:08 ` Armando Di Cianno
2004-11-20 22:20   ` Michel Dänzer
2004-11-20 22:22 ` Benjamin Herrenschmidt
2004-11-20 22:31   ` Armando Di Cianno
2004-11-20 22:41   ` Sean Neakums
2004-11-20 22:44     ` Sean Neakums
2004-11-20 22:52     ` Benjamin Herrenschmidt
2004-11-20 23:01       ` Sean Neakums
2004-11-20 23:25         ` Sean Neakums
2004-11-21 19:34 ` David Woodhouse

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).