devfreq: governor_cpubw_hwmon: Fix use of decay_rate

The decay rate tunable is used to compute the current averaged bandwidth
use, but the calculated value is never used. Fix this by using the
calculated averaged bandwidth instead of the instantaneous measured
bandwidth when computing the AB and IB votes.

Change-Id: Ic0ba3ce0d98f0ec185349fe6d86c4af26f222ff2
Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
msm: msm_bus: Don't divide RPM BW requests

When sending bandwidth requests to slave don't divide the request by
the number of ports as this is done at the RPM driver.

CRs-Fixed: 611965
Change-Id: Ie6870b66d1621677d94e4441136aed89bbdb6595
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
msm: kgsl: Pass the right timeout to adreno_drawctxt_wait()

adreno_drawctxt_wait() expects the passed in timeout to be in
milliseconds and converts it to jiffies.  Unfortunately, so does
the caller so the timeout is shorter than it should be.

Change-Id: Ic0dedbad85d50b32dba0fbf3ebb914335bf55166
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Fix the api type in adreno drawctxt flags

Adding the missed type field in adreno draw ctxt create
which was giving incorrect data type.

CRs-Fixed: 590103

Signed-off-by: Anoop Kumar Yerukala <ayeruk@codeaurora.org>
Signed-off-by: Prabhat Awasthi <pawasthi@codeaurora.org>
Change-Id: I6f464a3b6cc1fec3891d1189f85c7fe9ac65764e
msm: kgsl: Add arch_mmap_check() stub definition

Add a stub definition for arch_mmap_check() in kgsl.c for
situations where the function is not defined, similar to the
stub definition in mm/mmap.c

Change-Id: I2d0f7f8c76f35cbec1554893433199e256f76df4
Signed-off-by: Shrenuj Bansal <shrenujb@codeaurora.org>
msm: kgsl: protect syncpoint events with a reference count

Replace the event spinlock with krefs to avoid the possiblity
of calling a sleeping function while holding the spinlock and
to generally make the whole cmdbatch cancel loop a lot more
stable.

Change-Id: I08ba54fa4c5a11c05e3503dfc6a4ee040733e5a6
Signed-off-by: Jeff Boody <jboody@codeaurora.org>
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: fix race condition setting the event->handle

A race condition existed for setting the event->handle since the
async event can signal at any time after it has been registered.
When the event signals the reference count for the synclist and
the async callback are decremented causing the event to be freed.
The kgsl_cmdbatch_add_sync_fence function needs to take another
reference to ensure that the handle can be set before the event
is freed.

Change-Id: I0d8a02246e42dce014661d6f14c685415f1704cd
Signed-off-by: Jeff Boody <jboody@codeaurora.org>