Merge branch 'linux-3.4.y' into jb-mr1

Change-Id: I0cf527be124015db6f99e01f698f1fc734946b54
gpu: ion: fix page offset in dma_buf_kmap()

Change-Id: I1c975f0ffde5c75d6166ae20d379991d3f770a26
Signed-off-by: Greg Hackmann <ghackmann@google.com>
acpuclock-8960: add 192mhz slot

Change-Id: I6680d1d4e98bbefee0d389950aa3598f94f88659
msm: kgsl: Calculate busy interval considering GPU freq as float

GPU freq could be non-integral value and treating it as an integer
to calculate GPU busy insterval leads to higher busy interval
and more often we see negative idle stats. This change caculates
busy interval by treating gpu freq to the correct precision.

Change-Id: Ic54130803d7a0436b4ba31b09915eb7165d16590
CRs-fixed: 454972
Signed-off-by: Vinay Roy <vroy@codeaurora.org>
cpufreq: interactive: Fix uninitialized spinlock

Change-Id: I9959669e0f643ccd2bd1072fae440d8c20f1c9cc
msm: Add support for debuglevel

Change-Id: I3c2c62012e4a463c10631c4ed6f267a744b56341
media: dvb: Add notification of overflow event for decoder filter

Applications should receive overflow indication for decoder
filters to get notification on data-loss if happens.

CRs-Fixed: 472160
Change-Id: I467af6cfbb23ccbe81694b039e7cd46c801fdcd2
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
msm: display: fix iommu page faults for devices with lcdc panel.

Fetch was happening from non-iommu buffer because of wrong mixer
configuration for lcdc panels.

Change-Id: Ie313ce71ff269108271437f758c0dc37884a240c
Signed-off-by: Sangani Suryanarayana Raju <csuryan@codeaurora.org>
mm: Retry original migrate type if CMA failed

Currently, __rmqueue_cma will disregard the original migrate type
and only try MIGRATE_CMA for allocations. If the MIGRATE_CMA
allocation fails, the fallback types of the original migrate type
are used. Note that in this current path we never try to actually
allocate from the original migrate type. If the only pages left
in the system are the original migrate type, we will fail the
allocation since we never actually try the original migrate type.
This may lead to infinite looping since the system still (correctly)
calculates there are pages available for allocation and will keep
trying to allocate pages. Fix this degenerate case by allocating
from the original migrate type if the MIGRATE_CMA allocation fails.

Change-Id: I62ab293dc694955eaf88e790131a8565395ba8cb
CRs-Fixed: 470615
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
ASoC: wcd9xxx: Fix MBHC irq handler deadlock scenario.

There is a chance to encounter deadlock when either electrical mbhc irq
or mechanical mbhc irq releases resource lock to let polling thread finish
its job.  This is due to the possibility of one irq handler can preempt
already running the other type of irq handler.
Introduce a new mutex to avoid this preemption.

CRs-fixed: 428653
Change-Id: Idf24c62224026c9c061de12c31e248c05b47de9d
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>

Conflicts:

	drivers/mfd/wcd9xxx-irq.c

Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
usb: gadget: u_data_hsic: Use GFP_KERNEL where ever possible

The USB requests are allocated using dma pool API.  The dma pool has
limited memory for non-sleeping use case.  The current code does not
free USB requests during subsystem restart.  The requests are freed
only after cable is disconnected.  If subsystem restart happens
multiple  times without disconnecting cable, system may run out of the
dma pool memory.  This is leading to URB submission failures.  Use
GFP_KERNEL where ever possible.

CRs-Fixed: 463423
Change-Id: I0fca533e460e7b4234fe771e048e0e50494cb1da
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
msm: kgsl: Add CP_WAIT_FOR_IDLE packet before updating timestamp

HW workaround to resolve MMU pagefault caused by memory
freeing early before GPU completes it.

This is race condition where timestamp is getting updated
and the event handler runs before the GPU actually got done
with the timestamp, hence freeing the buffer early while GPU
still not completed with it.

CRs-Fixed: 469194
Signed-off-by: Anshuman Dani <adani@codeaurora.org>

Conflicts:

	drivers/gpu/msm/adreno_ringbuffer.c

Change-Id: I6d338d7dca680f57f2c39ed5a14381b261bf8bce
Signed-off-by: Anshuman Dani <adani@codeaurora.org>
board-8064: Correct UART GPIO IRQ to use as wakeup IRQ

IRQ for UART RX GPIO is wakeup source to MSM. Currently UART TX
GPIO's IRQ is configured as wakeup IRQ. With that APQ UART is not
receiving any wakeup when connected external modem is sending wakeup
byte. Hence correct the same by configuring UART RX GPIOs' IRQ line
as wakeup IRQ.

CRs-Fixed: 473028
Change-Id: I3df56f9eb0dd2f4dcb4f17f6819338e46bd313dd
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
msm: camera: composite stats support for bayer hist

Add composite stats support for bayer hist

Change-Id: Ib6759fdbc791604f9d8b1cef0103cc3b72e24aa1
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
msm: thermal: Use signed int for temperature

Temperatures could be in negative and negative signed ints may be
incorrectly read as unsigned int.

Change-Id: I817db2756c54816296a700ffcd004a83161f2b95
CRs-Fixed: 441632, 473507
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
radio-tavarua: Handle I2C read/write errors during sleep mode.

Getting read/write errors when the I2C is not resumed from the sleep

Added re-try mechanism to handle during I2C read/write

Change-Id: I5a533b085ccfcda2181a2d5ea792bbb3d187c477
CRs-Fixed: 427937
Signed-off-by: Venkateshwarlu Domakonda <Venkateshwarlu@codeaurora.org>
radio: iris: Add synchronize mechanism to handle multiple command requests

Used mutex to synchronize the command requests.

Change-Id: Ie58b996bbc76b36095020556a2046b7aa5c351fa
CRs-Fixed: 448591
Signed-off-by: Venkateshwarlu Domakonda <Venkateshwarlu@codeaurora.org>
Linux 3.4.40: Merge branch 'linux-3.4.y' into jb-mr1

Change-Id: I128fddd597faf0a0c92623b0927ec61cbf6f6efb
Low CPU Clocks: Allow ultra low CPU frequencies for better battery performance

while screen is on or background operations like audio books and music
* Modified for Krait 8960 SoC.

Change-Id: Iafb60d7083e14065a71e1c80b194ef5a823db3fb
Signed-off-by: faux123 <reioux@gmail.com>
Signed-off-by: bmc08gt <bmc08gt.teamb00sted@gmail.com>
cpufreq: allow for low CPU clock policy when hotplugging new cores

* Also fix brace derp from previous

Change-Id: I628eac9b66d6af5fb1bd90477dc0e9ce490810e9
Signed-off-by: faux123 <reioux@gmail.com>