update defconfig
use UltraKSM
lazy.c: fix distinct pointer types lacks a cast
ehci-hub.c: fix defined but not used
dir.c: prevent error on some compilers
Update defconfig
input: evdev: Add missing wake_lock_destroy

Change-Id: Ief1ef44d98a197e5b457f5e8617c413e76e3c6d2
Signed-off-by: Benoit Goby <benoit@android.com>
vision: increase PMEM_ADSP_SIZE a bit
msm: kgsl: Make sure that gpu clock goes to turbo after wake

Change-Id: I11348ac36a81ca2bdaf708d2340f2589b88a7d45
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm: kgsl: Store process mem entries in a rbtree

The list of memory objects attached to a process gets searched quite
a lot during normal operation of the driver.  For processes with a
lot of memory allocations, the linear search through the list is O(N)
and uses a lot more CPU during critical loops than it should. Change
the mem entry list to a rbtree for faster search speeds.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>

(cherry picked from commit c9559e461e3df1b828218421430a38c9d7a38ca4)

(cherry picked from commit 33bceb148eaadf18ea91378dd9b9ac5861b36a09)

Change-Id: Ic769e0d2bb52cb4d14955942ce6bd8744d8a5995
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
msm: kgsl: rework ib checking

Separate ib parse checking from cffdump as it is useful
in other situations. This is controlled by a new debugfs
file, ib_check. All ib checking is off (0) by default,
because parsing and mem_entry lookup can have a performance
impact on some benchmarks. Level 1 checking verifies the
IB1's. Level 2 checking also verifies the IB2.

Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>

CRs-Fixed: 351811
(cherry-picked from commit d0ab6adeeae7dd039069fd93e6649777aff23668)

(cherry picked from commit f6924037a5d56f2934ef7d2b2cafb5ab3e49c94e)

Change-Id: Iebf462c29021cf0b7a830a8ff2d4cebcc3a39d43
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
msm: kgsl: Use kzalloc to allocate scatterlists of 1 page or less

The majority of the scatterlist allocations used in KGSL are under 1
page (1 page of struct scatterlist is approximately 1024 entries
equalling 4MB of allocated buffer).  In these cases using vmalloc
for the sglist is undesirable and slow.  Add functions to check the
size of the allocation and favor kzalloc for 1 page allocations and
vmalloc for larger lists.

CRs-Fixed: 351811
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
(cherry-picked from commit a652a07b0d719c4925ca45c018432888dd2388a4)

(cherry picked from commit 157ce2805727972f48881b37ba1ffe192b1801c6)

Change-Id: I54ff7011cfcbe8128e93063d2b43bc0688902a8f
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
msm: kgsl: fix 2d IB processing

The 2d hardware handles ringbuffer and IB commands as
a series of gotos. At the end of each IB, there must
be a goto command back to the ringbuffer, which must
be "monkey patched" into the IB by the driver.
Fix this code to use a proper kernel mapping.

CRs-Fixed: 351811
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
(cherry-picked from commit d27b09f388bab25f7e15ed9c5ca5eb1203c85492)

(cherry picked from commit 7c284e2286cc70d5be0403c09074b381844d3057)

Change-Id: I3c04dcff27ecf326b40aad0dc74f46fc0f4b8c95
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
msm: kgsl: Stop the device during sleep

For 7x27, 7x27A and 7x25A, stop the kgsl device during sleep.This
improved PDT stability results and 72hrs stability on customer devices.

Change-Id: I7953947e8b9c8b5109e52b8af49857b7c9e941c0
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
msm: audio: qdsp5v2: Fix LPA no audio heard issue

-In LPA Playback, insert headset just before end
of the clip, then no audio is heard and music
is not stopping.
-When the DSP side buffer consumption crosses the
threshold value of current buffer and requests
the next buffer and receives it from driver. At
this point of time, if device switch happens,
then driver gets sync info and flushes the DSP
data and DSP requests for needs data. Driver pops
the latest buffer that is not yet played by DSP
and remove from out_queue. Also, increments the
headcount to next buffer. This will miss the audio
play of few secs and result in failure of music stop
too as WRITE_DONE event to LPAPlayer is not sent
for one buffer.
-Apply the change to handle device switch case
to avoid removing the current buffer from out_queue
incase of device switch. Play the buffer and
then post the WRITE_DONE event of this buffer
to LPAPlayer. With this change music stop
happens correctly now as WRITE_DONE is issued
for all the buffers to LPAPlayer.

CRs-Fixed: 342560
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
(cherry picked from commit d9db3426e2067c13f2c33041d0842b0fe893dd6c)

Change-Id: Ibd8c2eb8dfb01952ff23026aaa409b73c9b13c0d
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm: audio: qdsp5v2: Apply the change to handle device switch case
msm: qdsp5v2_1x: LPA driver to support Query of buffer requirements.

Change-Id: Ie5ba433859e6e9508b04bdb7ea3313f664b22956
Update defconfig