PM / devfreq: Add new flag to do simple clock scaling

Add new flag "simple_scaling" to on demand governor so that
the clocks can be scaled up only when the load is more than
up threshold and can be scaled down only when the load is less
than down differential data as provided within
struct devfreq_simple_ondemand_data.

Change-Id: Ibc6ab6297c1b64b6e6eaaa76d735d0b9ae0f6477
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
PM: devfreq: Add conservative governor

A GPU governor is not rocket science. This one gets the job done pretty
smoothly while complying with devfreq framework rules.

Change-Id: I3c9ad9403bdcf07dd492d446bca4aea1655c50a1
PM: devfreq: Add some conservativeness

Change-Id: Icfe9979c29051fd79749002202c2d152fbd51f25
PM: devfreq: Always reflect a change of polling interval

Change-Id: If27ee16bbe45c70bffada1997653d37283a3a046
PM: devfreq: conservative: Return 0 if GPU just started

Bailing out early is perfectly fine, so do not trigger an error in
update_devfreq.

Change-Id: If130fdcf297ae06d2fd2fa4ef8081c8f8ca65a83
PM / devfreq: Fix out of bounds access of transition table array

The previous_freq value for a device could be an invalid frequency that
results in a error value being returned from devfreq_get_freq_level().
Check for an error value before using that to index into the transition
table.

Not doing this check will result in memory corruption when previous_freq is
not a valid frequency.

Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
Change-Id: Ia9f9f3dabf14b26c4dff54fb2bac3e77f33458c0