msm: kgsl: Don't change the sglen of the memdesc if allocation fails

If the page_alloc loop fails, we changed the length of the scatterlist
for the memdesc to the last good page so we could have an efficient
loop through kgsl_sharedmem_free.  Unfortunately, we were also using
the sglen to decide between using kmem or vmalloc memory for the sg
list in the first place. There is a chance that one could start out
with a large sg list from vmalloc, but if it failed early, then we
could truncate the size and attempt to kfree it.

Zero the stlist at init time and use a length == 0 as an indicator
that the list might be truncated.
CRs-Fixed: 443441

Change-Id: Ib48a08c69a7bbfc69b92f09e83fc80f9bdedffe0
Signed-off-by: Dhivya Subramanian <dthiru@codeaurora.org>
msm:rq_stats: Fix hotplug attribute during the suspend failure

If the system suspend fails, the hotplug_disable attribute remains
set. This prevents any change to core status from mpdecision. Reset
the value of this attribute if the module receives PM_POST_RESTORE
notification.

Change-Id: I22fd639134adbeb8f8f96603e285151480f537ec
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
Merge "msm: kgsl: Don't change the sglen of the memdesc if allocation fails"
msm: camera: Check for valid pcam before using it

When event notify is called, check if pcam is valid or not
to avoid NULL pointer deferences.

CRs-Fixed: 462215
Change-Id: I78590c06ff5132dce0a629e8496d11360201aafc
Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org>
msm: display: increase fence timeout

Increase timeout value to 900ms to allow
gfx engine to render longer.
When sync_fence_wait fails, need not put fence as
it will be handled outside the loop.

Change-Id: Id4caff55c9f99c48e5f87a85d30fe4c8c0cd65e7
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
(cherry picked from commit bf0fb20b05c64422c1fb1d2278cb4189cf2edb99)
msm_fb: Update MDP fence wait behaviour

The current fence wait times out too early in cases where the GPU
is under a heavy workload. Change this behaviour to warn and wait
for a longer time for GPU to complete it's work.

Change-Id: I8b20c22733a77c1aaea4a1fd1e4daaa14b5ec2fd
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
(cherry picked from commit c03cdb744746297d370d6b5c42e8ce82b6eebc08)
msm_fb: Add support for multiple DCS commands in a single tx

This patch adds support to send multiple DCS commands in a
single transaction. This helps to reduce the latency caused by
separate tx for each DCS command. The turnaround time
caused by the wait for one DSI interrupt for each transaction
is reduced with this.

CRs-fixed: 453746
Change-Id: I5810b3819426f7df6ca9719a925a0e6906f7dace
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
(cherry picked from commit 640b909e7d241082e3e6c0299c7a7f81c3b25b95)
msm: timer: Use 32768Hz GPT and SCLK on 8064 family

On 8064 SOC family, a dedicated XO is derived to support
sleep clock at 32768Hz unlike 8960 SOC family where TCXO
divider was used with effective freq. of 32765Hz.

CRs-fixed: 462079
Change-Id: I79142703c4ffac209f4dedeefebc235eeb8b140d
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
(cherry picked from commit 7935fae42982841709214a9335ae11d71b2f60e8)
msm_fb: display: fix fence fd list be put twice

msm_fb_wait_for_fence() will put fence fd list if sync_fence_wait()
failed. After that same fd list wil be put one more time. This
cause a fd put twice and cause system crash at the time fd
was closed.

Change-Id: If6a358e051c98841e34c23d81098243003ef0836
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
(cherry picked from commit 798299147ba7eef47f0cb85ff0e9c61f61b2a1e8)

Conflicts:

	drivers/video/msm/msm_fb.c

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
Base chnage for Camera.

Change-Id: I536c5a7627223e931079b8c1515b2d1de5ac8387
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
porting fusion3 camera code to 2.5.1

Change-Id: I6d9da26a95aab95b312cb99aa84d7d1ea81dfe63
Signed-off-by: Bansidhar Gopalachari <bansid@codeaurora.org>
Merge "Base chnage for Camera."
Merge "porting fusion3 camera code to 2.5.1"
Revert "porting fusion3 camera code to 2.5.1"

This reverts commit 4e85500a70f6cac31cc5bf08197a5dcddf68b4e1.

Change-Id: I139b504f54997fd523e3779234d5a5b4062ac56e
Signed-off-by: Bansidhar Gopalachari <bansid@codeaurora.org>
Revert "Base chnage for Camera."

This reverts commit 4bfab7ba3a01a4ddbe078c389788bda7522e629d.

Change-Id: I6cf1cd0c315170da3d31a90421c50564f6184118
Signed-off-by: Bansidhar Gopalachari <bansid@codeaurora.org>
Merge "Revert "porting fusion3 camera code to 2.5.1""
Merge "Revert "Base chnage for Camera.""
Merge "msm: display: increase fence timeout"
Merge "msm_fb: Update MDP fence wait behaviour"
Merge "msm_fb: Add support for multiple DCS commands in a single tx"