Simple GPU Algorithm: Initial coding for devfreq based Adreno Drivers

This is an open source user configurable simple GPU Control Algorithm used to
replace the closed sourced Qualcomm TrustZone GPU controller

Change-Id: I13154166c8c3d5d7ba11cb7a11dc35319308efc2
Signed-off-by: Paul Reioux <reioux@gmail.com>
Defconfig: Enable simple_gpu_algorith (gpu devfreq)

Change-Id: I60d78629669ce29b6eeee7acbf815113ba725285
Signed-off-by: Josue Rivera <prbassplayer@gmail.com>
Fix unitialized variable in simple_gpu_algorith

Change-Id: I84b77ab65beaf9cfd9fc0277dacb8f1a259e4457
Signed-off-by: Josue Rivera <prbassplayer@gmail.com>
PM: devfreq: Add sysfs nodes for devfreq governors

Change-Id: Ibd7a01ad3d1946776a1f7b196d7bda334627e8f3
Signed-off-by: Josue Rivera <prbassplayer@gmail.com>
PM: devfreq: Fix show available freqs

Change-Id: I7b7033e90074d0e11d955aaf65eed95d81cae1a8
PM: devfreq: Move governor node to gpufreq

Final path is: /sys/class/devfreq/fdb00000.qcom,kgsl-3d0/gpufreq

Change-Id: I86dc13c42df9f1cdbbc7b8cfa826627aeb44f38f
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: Ia63d601fae0e973cfa9276b80aafb53a986ff099
Signed-off-by: Josue Rivera <prbassplayer@gmail.com>
PM: devfreq: Add some conservativeness

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

Change-Id: Id34a956e3013be141e5e07ba6f4908ecdf32eb0f
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: Iadc98717cd0dacbcbce15749d498afafb9652738
PM: devfreq: Fixup device transition and usage statistics

Ignore bogus data during slumber in transition and usage stats that
rendered the output basically useless. Also fix the reported GPU
frequency.

Change-Id: I99de384aed21c9b957058ba3915524c1cf46a8f0
PM: devfreq: Use high priority workqueue

It does not make sense to run kgsl on high and devfreq on regular
priority.

Change-Id: I9e7b54ad4861646fac2f6d985c7bc8d7667a6c79
PM: devfreq: Adapt devfreq_get_freq_level to cpubw requirements

Change-Id: I0bfe011554999e8240d820ede502e86c90189c1e
msm: kgsl: Export device state to devfreq

Change-Id: I87a837417cbf3cfd83e7021bc397ddfa5d166282
PM / devfreq: Get priv data for msm-adreno-tz governor from dev_profile

The devfreq infrastructure has several bugs and general design flaws
with private governor data support. As a workaround the msm-adreno-tz
governor gets it's private data from the device driver by doing a
container_of on the dev_profile registered by the device driver.

[myfluxi: Adapt to 8974, add yet unused stuff for conservative governor]

Change-Id: Ib9dffd063fe3aa5cfd55727d41f7633e88b3f998
Signed-off-by: Vladimir Razgulin <vrazguli@codeaurora.org>
PM: devfreq: Define tunables with a static scope

Change-Id: If9850c6e772369ddde365f35d3bfa79c419c6b30
PM: devfreq: Fix derpage

Forgot to git add. Note to self: Don't push when you're
fucking pissed about fucking useless discussions.

Change-Id: I7ec8e94f642a0dd10113f4b3c38692942d0c2f82
msm: Use proper return values in store*() functions

Change-Id: Ief638b12d73944e832ecfa0e2548d6d6b5b68a51
Signed-off-by: Josue Rivera <prbassplayer@gmail.com>
Enable Devfreq Conservative

Change-Id: Ica9f78ed290143a4573e0ffabc85c4a79648ed62
Signed-off-by: Josue Rivera <prbassplayer@gmail.com>
Fix simpleondemand merge derp

  * Was missing a bit for simple clock scaling commit

Change-Id: Ia12f0662a21de7fcced7e587c5107d3dd167f4d6
Signed-off-by: Josue Rivera <prbassplayer@gmail.com>