Cpu Speed Not Resetting After Powersave Mode


urjaman

"I Know. We're going for a ride."
Joined
Jan 6, 2009
Messages
1,111
Age
30
Location
Finland
Website
urjaman.dy.fi
MonkeyChops said:
does anyone know what script or program actually changes the mhz? the script for the mhz slider just changes the [cpu_mhz_max] file that I was referencing to change the mhz in my script. cpu_mhz_max is just a text file with the number for the current clock speed in it and nothing else. Some other process must reference and check it to actually change the speed of the cpu but I couldn't find it.
http://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blob;f=drivers/misc/pandora.c;h=421785291111c2d3000f68aa1ab33e3b26297303;hb=HEAD

What is this i dont even

EDIT: Ok I'll expand on this. Just needed a moment to calm myself down after drinking to the wrong throat reading that (translated from finnish, I dont know how well it works in english).

That file is a virtual file in the virtual proc filesystem (== files under /proc dont actually exist on disk, but will call code in the kernel to generate their content on-demand), writing or reading to/from it causes our little kernel driver to be called (that I linked to above). So the file doesnt store what you write to it verbatim, but instead actually sets the DPLL to some speed, that is returned (interpreted from the HW register) when reading the file.

EDIT2: cleaned up the post and added some info..
 
Last edited by a moderator:

MonkeyChops

NO! I don't play basketball
Joined
Jul 16, 2008
Messages
1,000
Age
41
Location
OHIO
like I said, I'm a beginner and trying to learn

thanks for the link anyways though
 

MonkeyChops

NO! I don't play basketball
Joined
Jul 16, 2008
Messages
1,000
Age
41
Location
OHIO
:D yea probably, but I still wanted to see it. TBH I didn't know I was asking for driver source code but it is very interesting. I was just curious how the mhz actually changed. Now I know, with a driver.
 
Top