New to power management topics though I am, I have taken on a task to redesign my existing OMXResourceManager (RM) for OMAP3430. In the interest of making a better design I thought I should start with explaining how it works currently. I hope to follow up with some analysis of the flaws and ideas for improving the design. In this series I will be working from this source on the zoom2.
So then - how it works:
First, an OMX component would request a predetermined DSP MHz requirement during its transition from OMX_StateIdle to OMX_StateExecuting.
Secondly, the RM would query the OMXPolicyManager (PM) to see if this is a valid use case. The PM will do a basic table look-up to see if the requesting component could co-exist with already running OMX components. Based on the priority and the currently executing combination of OMX components, the PM would either allow based on priority, preempt a lower priority component or update to a new combination to allow the request, OR deny the request if no combination in the look-up table exists to support the request.
Then, the RM receives the policy verdict. If the PM denied the request, the denial will short circuit any resource decisions. If the policy request is granted, the OMXResourceManager will begin to check the available DSP resources. The bridge QoS facilitates several queries for available memory and available MHz. If enough of both are available then the OMX component is successfully transitioned into OMX_StateExecuting.
In this last step where resources are checked, the RM reads the current vdd1 operating point. It will then check the current total MHz requested by OMX and scale the operating point to the lowest point that supports the current demand in hopes of having some power savings.
Now, this may be slightly simplified, but all the ideas are here.
I have some thoughts on how to improve this design. I am making an active effort to implement these changes quickly. After some analysis I can share what improvement if any I was able to make.
At the same time, I invite any ideas you may have of your own...