Re: New cpufreq framework and drivers

From: Nate Lawson <nate_at_root.org>
Date: Wed, 02 Feb 2005 13:29:40 -0800
Bruno Ducrot wrote:
> On Wed, Feb 02, 2005 at 12:03:47PM -0800, Nate Lawson wrote:
> 
>>Colin Percival wrote:
>>
>>>Nate Lawson wrote:
>>>
>>>
>>>>Hardware drivers are of two types, absolute
>>>>and relative.  SpeedStep, Powernow, etc. are absolute drivers in that 
>>>>they set the cpu's base frequency.  ACPI throttling, Longrun, etc. are 
>>>>relative drivers that reduce the processor's clock to a fraction of 
>>>>its current base (i.e., they have an additive effect.)
>>>
>>>
>>>If my first glance at the patch is correct, this would have my laptop (a 
>>>1.4GHz
>>>Pentium M) reporting the availability of the frequencies 600MHz, 800MHz, 
>>>etc.
>>
>>>from enhanced speedstep, along with the frequencies 300MHz, 400MHz, 
>>
>>>500MHz, and
>>>700MHz obtained via 50% clock throttling.
>>
>>That is correct.  The code to support relative drivers was removed 
>>before posting to give the basic framework more testing before I commit 
>>it shortly.  The relative support will go in soon after that code is 
>>committed.
>>
> 
> But longrun is relative though and can scale voltage.
> (And the point that longrun can control frequency itself is imho irrelevant).

If you look at struct cf_setting, the "freq" field is either the 
absolute freq in Mhz (i.e. 700 = 700 Mhz) or a relative percentage (i.e. 
50 = 50% clock reduction).  The way you tell the difference is that the 
CPUFREQ_DRV_SETTINGS() method returns a "type", which is either absolute 
or relative.

All the other fields are valid for both types so your driver would set 
the "volt" field of cf_setting to whatever Longrun says.)  If your 
driver somehow knew the power consumed for that setting, it could supply 
that info too.  Otherwise, set CPUFREQ_VAL_UNKNOWN for each value not 
known by the driver.

(BTW, I'm moving relative units to hundredths of a percent, i.e. 8055 = 
80.55%)

-- 
Nate
Received on Wed Feb 02 2005 - 20:29:45 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:27 UTC