APM

'''  Content is no longer maintained and is being kept for reference only! '''


 *  What’s APM? 

APM stands for Active Power Management, this feature helps a device to lower or shutdown it’s resources (memory, clocks, etc) when certain inactivity time has passed.


 * Why is it important for the SGX?

When the SGX stop rendering frames (it’s idle) an inactivity timer will be triggered after some milliseconds have passed. If the timer is triggered the SGX must shutdown its clocks and remove the VDD2 constraint from the Power Management (PM) driver in the kernel. By doing this, the SGX stops using power resources when it is idle meaning less power consumption for the device and longer battery life.

When the SGX needs to render again (after it has been in the idle state) it must enable its clocks and set the VDD2 constraint to the highest (usually to Operating Point 3 or OPP 3) so it can perform at full speed.


 *  APM SGX Latency on Linux 

The amount of time when APM will shutdown the SGX is in the following file: GFX_Linux_DDK/src/eurasia_km/services4/system/omap3430/sysconfig.h

Look for the following line, the time is in milliseconds: #define SYS_SGX_ACTIVE_POWER_LATENCY_MS (1)

Note that on some systems a low time may result on enabling and disabling the clocks between frames which may cause visual artifacts and will impact the performance, some tested and reasonable times are between 50ms and 100ms.


 *  Turning APM off on Linux 

In case that the APM framework in the kernel is not ready (compilation issues) or is giving you problems you can disable it. Go to the file: GFX_DDK/src/eurasia_km/eurasiacon/build/linux/omap3430_linux/makefile.shared_conf

Look for the line: LDM_PLATFORM ?= 1

And change it to: LDM_PLATFORM = 0

You can identify APM could give you issues if you experience the following symptoms: - The SGX gets stuck when a 3D app ends - The SGX gets stuck when a 3D app begins - The SGX clock never shutdowns when its idle meaning more power consumption