lib: genalloc: Change chunk allocation to vmalloc

Change the chunk allocation from kmalloc to vmalloc for
allocations greater than a page. This allows large
chunks to be allocated from physically non-contiguous
memory and increases the chance of the allocation
succeeding.

CRs-fixed: 387655
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
(cherry picked from commit 0614b96dc8e4c8a0dd0db41aec5a79daa3bdf091)

Conflicts:

	lib/genalloc.c

Change-Id: Ic0dedbad9d277d0842591b1f075ce3b80c8c05de
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Revert "cpufreq: ondemand: Add boost interface"

Switching to the CodeAurora version.

This reverts commit 981815e70915fc31f713c69d06aeedc2787ac80b.
cpufreq: Add a boostpulse interface to ondemand

For applications that require a one-shot increase in frequency,
the boostpulse interface would help to scale to max for the time
specified in boostime. This helps applications that currently
increases scaling_min_freq and resets later after a fixed duration.
Instead of changing scaling_min_freq applications can directly write
to boostpulse and governer resets during regular timer after the time
expires.

Change-Id: Ie5f490ff06b41364aa76dd468573433495da28a4
Signed-off-by: Narayanan Gopalakrishnan <nargop@codeaurora.org>
cpufreq: notify avg load for short sampling_rate

If the sampling rate is less than 50ms reporting
the actual load may lead to poor decision making
at user space. So, for sampling rates less than 50ms
report the average of load across two samples.

Change-Id: I0d1cf00801732bee8e4380158d7e892758226594
Signed-off-by: Narayanan Gopalakrishnan <nargop@codeaurora.org>
cpufreq: boost the sampling rate on touch event

For better Ux responsiveness ondemand sampling rate
needs to be 20ms. But, a 20ms sampling rate increases power
consumption. So, boost the sampling rate to 20ms on every
touch event for 2.5 ms and later reset to default rate.
Also, change sampling down factor proportional to the
sampling rate.

Change-Id: I111b1cf3b8ed133347149afc34d329d0384ecfcb
Signed-off-by: Narayanan Gopalakrishnan <nargop@codeaurora.org>
Revert "msm: pm-8x60: Check for SPM status in
 msm_pm_verify_cpu_pc"

This reverts commit 535c6d19e4f1b7ad1d3de6df999bc9bb1eb1ebe5.
Revert "msm: pm-8x60: Don't restore ACPU frequency for
 hotplug cases."

This reverts commit 215a1770a40880dbca186ea5c94c41e275034ac7.
d2: add xz compression support

fix compile on d2 kernel and enable in defconfig

From: "Imre Kaloz" <kaloz@openwrt.org>
Subject: Wire up support for the XZ decompressor

Wire up support for the XZ decompressor

Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

Change-Id: I86d7cfa26edc433291ba5e9372b20e65e95fc970
msm_fb: display: add dcs command list for dsi command mode

DSI dcs commands and mdp pixel stream share same dsi link.
Add dcs command list to serialize sending dcs command and mdp
pixel stream to avoid contention which may cause dsi controller
to stall.

Change-Id: Ie0e687f45be479d2137eb7b56b8d32040fba2044
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm_fb: display: add support of mdp clocks controlled by
 vsync

Mdp related clocks are controlled through vsync enable/disable
ioctl from userspace frame work.

Crs-fixed: 384482
Change-Id: I5999ad17955e0f862f64036a6390016ff3a6782f
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm: kgsl: Idle the GPU after recovery in recovery routine

Before returning from recovery routine, wait for the GPU to
become completely idle to ensure that recovery passed

CRs-Fixed: 351680
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
(cherry picked from commit 1088bdb727a0360e0acf38b4420a259877deb125)

Change-Id: I2c9cdf78f25aca2628313abcf88a7b9172d17aae
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
msm: kgsl: Increase REG_RBBM_CNTL value to 0xFFFF for A203

Increase number of clocks that RBBM will wait before de-asserting
the Register Clock Active signal. This fixes kernel panics during
stability tests on multiple devices.

CRs-fixed: 372793
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
(cherry picked from commit 7a5d18c7a1f6a04063a28a6c1d805ba5c2b44698)

Change-Id: I65ebebae63722b90e28a9272bb374fb5424ae778
Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
msm: kgsl: Hold pm_qos vote for active rendering

Differentiate between the screen off case where kgsl shouldn't
hold a pm_qos vote and the screen on case where power rails
may be turned off after a long idle.  restore_slumber now
corresponds to the screen on/off while strtstp_sleepwake covers
the power rail collapse.

CRs-Fixed: 386956
Change-Id: Id4318f1aa87d6ad0653fe5db18c5d33bda1cc8bb
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
(cherry picked from commit 4c889b7cef5f85a58d9f4422dc033d30615b594b)

Signed-off-by: Dhivya Subramanian <dthiru@codeaurora.org>
msm: kgsl: Start the sleep timer after recovery has
 completed

Start the sleep timer if recovery from hang is successful.
This prevents GPU from entering low power states during
recovery.

CRs-Fixed: 351680
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
(cherry picked from commit df609308d9cdd5ebc4605d09be4fdda420e1a434)

Change-Id: I832d7faf511f2bd12372c5d1cc3638283f1de505
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
msm: kgsl: During postmortem check for IOMMU table change

When performing postmortem, check for IOMMU pagetable change commands
which will allow us to find the IB from the correct pagetable.

CRs-Fixed: 351680
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
(cherry picked from commit 8f6e0a97b2e3090862f19e98d6aeed82eea93170)

Change-Id: I66dc418a034d25e66d9406dd5803e33f4ca8ef78
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
msm: kgsl: Remove the use of asid

Remove the use of asid(application space ID) from the kgsl driver
for IOMMU since it's known to cause to stability issues on the
2D core

Change-Id: I0c1cccd8fc4c1f8cfa769dbeb6ec9af2bd078997
CRs-fixed: 379439
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Revert "msm: kgsl: Remove the use of asid"

This reverts commit 26ced4c3cf3a5e6807a89cf632c681b8184b803f.

Change-Id: Ie05f3a6893c8da2cc39f09f3275cd22db64a6cbf
Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
msm: kgsl: After timeout check if timestamp has retired

When a thread times out while waiting for a timestamp, check once
whether the timestamp which it was waiting for has expired or not
before treating it as an error

CRs-Fixed: 351680
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
(cherry picked from commit 54396e5406b5fecdd1a0e347dab953967d0e9318)

Change-Id: Idd91d1dbdf4188ee29c14f2217cfbcc03fa9396e
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
Revert "msm: kgsl: For IOMMU only decide to flush when
 memory is unmapped"

This reverts commit efa4ca02e6e1d6daf3508d76ece6bdd8e302ff4f.

Change-Id: I3b58b2195dc587ea37139061d0205c5ebc1f45c8
Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
Revert "msm: kgsl: Add idle after writing SMMU ASID
 register"

This reverts commit 6d879378054bf7962358f487b227c670594348b3.

Change-Id: I27e6969a816d1ba61d7cbce8fc31e8f03569d87c
Signed-off-by: Subrahmanyam Uppala <csuppal@codeaurora.org>