2004-01-13 22:42:35

by Jens David

[permalink] [raw]
Subject: [PATCH] powernow-k7 settling time

Hi Dave, Jeff & all,

I do not know exactly where to send this patch to, so please
forward as appropriate.

This patch is needed to get powernow-k7 to work on my el-cheapo
notebook. It seems that the BIOS table that describes the voltage
regulator settling time and possible frequency/clock combinations
is buggy in some cases (such as mine). Specifically if the settling
time is not large enough we switch clock frequencies too soon,
resulting in system instability and possible hardware damage.
This patch analyzes the value suggested by the BIOS and if too
low (I do not believe any general-purpose high current CPU VR
design will settle in under 5ms) it uses a standard value (50ms).
As long as nobody is gonna try delta-sigma modulation of the main
CPU clock the performance loss is probably neglectible. ;-)
I wrote myself a little testbench and with this patch my system works
stable no matter how often I switch and what applications are running
(mplayer proved to be a good test case) provided that clock frequencies
are not adjusted below the 796 MHz (core) step (K7-2000+).

Patch against linux-2.4.24-0pre2.1mdk from current Mandrake Cooker.
Should apply cleanly to powernow-patched vanilla-2.4.x as well. Probably
relevant for Linux-2.6, too.

-- j



--
Jens David, DG1KJD
Email: [email protected]
http://www.afthd.tu-darmstadt.de/~dg1kjd
Work: +49 351 80800 527 --- Home/Mobile: +49 173 6394993





Attachments:
patch-2.4.24-0.pre2.1mdk-powernow_k7-settling_time (0.98 kB)
Increase settling time if value provided by BIOS is too low. Patch against Linux-2.4.24-0pre2.1mdk

2004-01-13 23:10:56

by Dave Jones

[permalink] [raw]
Subject: Re: [PATCH] powernow-k7 settling time

On Tue, Jan 13, 2004 at 11:39:39PM +0100, Jens David wrote:

> Patch against linux-2.4.24-0pre2.1mdk from current Mandrake Cooker.
> Should apply cleanly to powernow-patched vanilla-2.4.x as well. Probably
> relevant for Linux-2.6, too.

2.6 fixed this a few months back, in a different way.
(The code misinterpreted the spec back then, so we were doing
all sorts of sillyness).

If Mandrake are still running the old version of the driver in their
update kernel, you might want to bug them about it, as there have been
numerous updates since then fixing lots of bugs.

Dave

2004-01-20 18:50:45

by Bruno Ducrot

[permalink] [raw]
Subject: Re: [PATCH] powernow-k7 settling time

On Tue, Jan 13, 2004 at 11:09:04PM +0000, Dave Jones wrote:
> On Tue, Jan 13, 2004 at 11:39:39PM +0100, Jens David wrote:
>
> > Patch against linux-2.4.24-0pre2.1mdk from current Mandrake Cooker.
> > Should apply cleanly to powernow-patched vanilla-2.4.x as well. Probably
> > relevant for Linux-2.6, too.
>
> 2.6 fixed this a few months back, in a different way.
> (The code misinterpreted the spec back then, so we were doing
> all sorts of sillyness).
>
> If Mandrake are still running the old version of the driver in their
> update kernel, you might want to bug them about it, as there have been
> numerous updates since then fixing lots of bugs.
>

It's fixed in the CVS repo for linux-2.4 tree at the same time as for 2.6.

--
Ducrot Bruno

-- Which is worse: ignorance or apathy?
-- Don't know. Don't care.