[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)



Excellent! Thanks heaps to Ben, Paul and Rob.

Here are some notes from testing on my 12" iBook G4 1GHz. Some of it just 
confirms what others have already written.

DRI and backlight work fine. On-board ethernet is fine, and can be 
unplugged/plugged-in during sleep with no problems.

I confirm the XV corruption, mplayer plays fine before sleep, but the screen 
is green when playing movies after a resume. If I tell mplayer to not use Xv, 
the movies are okay.

I can confirm that if sleep is invoked by closing the lid, then opening the 
lid causes the machine to wake up and then immediately go back to sleep. But 
if sleep is invoked by using the power button, then you close the lid while 
the machine is asleep, opening the lid wakes it up correctly.

ALSA has some kind of issue where an app which is playing sound will freeze 
after resume. After restarting the application, sound is okay. Also ALSA will 
not recognise if the headphones are unplugged/plugged-in during sleep.

The linux-wlan-ng drivers for my USB DWL-122 don't work across a sleep, but 
they don't seem to interfere with resume. At one point when I was trying 
this, I started a sleep, then the keyboard stopped producing input, but the 
trackpad still worked. After unplugging the DWL-122, the iBook went to sleep. 
Then on resume, the keyboard input I had typed before came out. So maybe the 
linux-wlan or USB drivers were holding things up after the keyboard was 
shutdown but before the trackpad was?

Also, this patch will stop the "cpufreq: resume failed to assert current 
frequency is what timing core thinks it is" complaint on 7447A based 
machines.

cheers,

John

--- linux/arch/ppc/platforms/pmac_cpufreq.c.orig 2004-11-20 03:29:42.000000000 
+1030
+++ linux/arch/ppc/platforms/pmac_cpufreq.c 2004-11-20 03:38:57.000000000 
+1030
@@ -456,18 +456,25 @@
  return 0;
 }
 
+static unsigned int __pmac pmac_cpufreq_get_7447A(unsigned int cpu)
+{
+ if (mfspr(HID1) & HID1_DFS)
+  return low_freq;
+ else
+  return hi_freq;
+}
+
 static int __pmac pmac_cpufreq_init_7447A(struct device_node *cpunode)
 {
  struct device_node *volt_gpio_np;
  u32 *reg;
+ struct cpufreq_driver *driver = &pmac_cpufreq_driver;
 
  /* OF only reports the high frequency */
  hi_freq = cur_freq;
  low_freq = cur_freq/2;
- if (mfspr(HID1) & HID1_DFS)
-  cur_freq = low_freq;
- else
-  cur_freq = hi_freq;
+ driver->get = pmac_cpufreq_get_7447A;
+ cur_freq = driver->get(0);
 
  volt_gpio_np = of_find_node_by_name(NULL, "cpu-vcore-select");
  if (!volt_gpio_np){

Attachment: pgpYM6CJjO8wg.pgp
Description: PGP signature


Reply to: