msm8660: Enable Memory Compaction.

Use memory compaction for reducing external memory fragmentation.

Signed-off-by: Prachee Ramsinghani <pracheer@codeaurora.org>
(cherry picked from commit 0e5c35342ea52f8622d6d16848772acac87678d5)

Change-Id: I18852eb553838a78be4bd80f8550f894413cd38f
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm8x55 initial bringup on JB_Choc

Change-Id: Ia396e40135ae3e557c87016cf43c06ff894540b1
Signed-off-by: Srikrishna Mc <skmc@codeaurora.org>
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
radio-tavarua: Send disable event

Send disable event when FM turn off is completed
so that file descriptor can be released safely

(cherry picked from commit 0fa19849354c41e3ac89ec0b6b3bb411cb69b908)

CRs-Fixed: 339470
Signed-off-by: Ayaz Ahmad <aahmad@codeaurora.org>
(cherry picked from commit d1aead93cddbb53f24f6468185f7c26290b4ffc6)

Change-Id: Ib95580f8cac3cc4c752248932e47c44d82c0e2c5
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
radio: iris: Send proper event to FM frameworks

Send enable, disable event to fm frameworks
when FM TX is turend on/off respectively

(cherry picked from commit 3dad6519412c1de30c8905683047f51a89fd377b)

CRs-fixed: 339470
Signed-off-by: Ayaz Ahmad <aahmad@codeaurora.org>
(cherry picked from commit a9d52055cb0c44b0ffade2d6c8e09c9270960d66)

Change-Id: Icb67cf5455a181c3a0d5f55ebbb33e0ce3df3df5
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
radio: iris: Add calibration mode

Do not queue the FM enabled/disabled events
while calibration is in progress

CRs-fixed: 358229
Signed-off-by: Ayaz Ahmad <aahmad@codeaurora.org>
(cherry picked from commit c1e6a95c31cc474f809bb7ab3c036e8890be7709)

Conflicts:

	drivers/media/radio/radio-iris.c

Change-Id: I1c6c6e6546dae4ad415473e50dc902e1c732a12f
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
board-msm7x30: correct the voltage range request for ldo20

At boot up, mddi interface is initialized first and if the mddi
panel client is not detected, LCDC panel will be initialized.
While mddi panel is initialized, ldo20 has request for 1.8v in
both min and max and lcdc panel requires 1.5v only. Hence the
target is not booting up as the currently (LCDC) requested range
is not in the previously requsted voltage levels.

Correcting the voltage range for mddi panel will fix the issue
for LCDC

Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
(cherry picked from commit 9624b74fa451ad2c3cc814da8e2c3eda7391e9f3)

Change-Id: Ie46e985fad1e64db5756a13745f48ba8b5600eb5
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm_fb : Avoid trying to acquire an already acquired mutex

MDP driver for LCDC is trying to acquire the same mutex after
acquiring it already. This is causing boot up issues on devices
using LCDC interface. This change avoids the problem.

Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
(cherry picked from commit 06abe49ea4b91ea64c8f1e738756e43e0e6a8662)

Change-Id: I0ce0e6d9414d3eb5e3e5c0e4883a39da655922d3
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm: board-7630: Add ION board support

Add ION support to 7630 and deprecate PMEM by overriding

Change-Id: Ia616427b9eb84e38f44217352795b4a1012b1b88
Signed-off-by: Srikrishna Mc <skmc@codeaurora.org>
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm: 7630_defconfig: Enable ION

Enable ION on 7630 target

Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
(cherry picked from commit 2e6de3f78362c7b728de643bde5c202e6018d5e1)

Change-Id: Id9003e78caef38bfcc22b41825b4761b209225ed
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
input: msm_ts: Set input property bit to indicate direct input device

Prop bit is checked in userspace and must be set in driver in order
to be recognized as a direct input device (touchscreen).

Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
(cherry picked from commit 3aaf03e26ac0c5422783e296c7ab05dd5d75f8a4)

Change-Id: Id7f0c28c6ab9ee40c83736a96515462819347d9c
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm_fb: display: add spinlock to protect dma status.

During dma transfer to interface host the status of the dma
needs to be protected in the smp environment.

Change-Id: I02b4f046de7f693bb098343b7345c4aa6ca395bd
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
video: msm: PCC/GC config register protection

PCC/GC configuration registers are shared with other features. This patch
makes sure that the other features implementations don't overwrite the
existing settings for PCC/GC.

CRs-Fixed: 345395
Change-Id: I5467a4c50eae214181d67a7976eee92c0ae26fe5
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
gpu: ion: Ensure ioctl return correct error codes

Under certain error conditions the following ION ioctl's would return
success even when the operation failed:

-ION_IOC_CLEAN_CACHES
-ION_IOC_INV_CACHES
-ION_IOC_CLEAN_INV_CACHES

Add return of correct error codes when an error occurs.

Change-Id: Ie8824bfecbb423c23d32c6a3d7058f06d8322906
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
gpu: ion: IOCTL return success when error occurs

ION_IOC_MAP, ION_IOC_SHARE, and ION_IOC_IMPORT may return
success when an error occurs.

Add correct error handling to ION_IOC_MAP, ION_IOC_SHARE, and
ION_IOC_IMPORT.

Change-Id: Idb7e58c94dab53fd82dd49150af9eaec78430c40
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
gpu: ion: Check for null name argument

Add check for null argument to avoid dereferencing
a null-pointer.

Change-Id: Icb452d0764e375bf2684e013c51d260de98e8583
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
gpu: ion: Add more debug info to client debugfs IF

Add logging of buffer physical address (if allocation
is from physically contiguous heap) and iommu mapping
information to the ion client debug interface.

Change-Id: Id3a77c1b5e3c5d15b11b3612f07d10092922cdff
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
gpu: ion: Add lock around debug routine

Access to rb tree of user and kernel ION clients
must be protected by a mutex.

Change-Id: Ie27eba65f8cab3a7c20c041eb46429ba62c5c00f
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
gpu: ion: Add dump of memory map

Add dump of physical memory map, showing allocated and
free areas, to debugfs interface for heaps with carveout memory.

Change-Id: I9bda9f3e555e55570c95e652616ca1fcc25eb0ab
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
msm: memory: Calculate DDR size early at boot time

Calculate the DDR size available to APPS which can be
used during early boot up time such as reservation
size based on the available RAM.

CRs-Fixed: 392855
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
(cherry picked from commit d71c5f90a6a47801ceedfa37f3d291acd96a0b36)

Conflicts:

	arch/arm/mach-msm/include/mach/memory.h
	arch/arm/mach-msm/memory.c

Change-Id: I14d7b6ae37218b63964351372ae6abba936448f9
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
sched: Fix select_fallback_rq() vs cpu_active/cpu_online

Commit 5fbd036b55 ("sched: Cleanup cpu_active madness"), which was
supposed to finally sort the cpu_active mess, instead uncovered more.

Since CPU_STARTING is ran before setting the cpu online, there's a
(small) window where the cpu has active,!online.

If during this time there's a wakeup of a task that used to reside on
that cpu select_task_rq() will use select_fallback_rq() to compute an
alternative cpu to run on since we find !online.

select_fallback_rq() however will compute the new cpu against
cpu_active, this means that it can return the same cpu it started out
with, the !online one, since that cpu is in fact marked active.

This results in us trying to scheduling a task on an offline cpu and
triggering a WARN in the IPI code.

The solution proposed by Chuansheng Liu of setting cpu_active in
set_cpu_online() is buggy, firstly not all archs actually use
set_cpu_online(), secondly, not all archs call set_cpu_online() with
IRQs disabled, this means we would introduce either the same race or
the race from fd8a7de17 ("x86: cpu-hotplug: Prevent softirq wakeup on
wrong CPU") -- albeit much narrower.

[ By setting online first and active later we have a window of
  online,!active, fresh and bound kthreads have task_cpu() of 0 and
  since cpu0 isn't in tsk_cpus_allowed() we end up in
  select_fallback_rq() which excludes !active, resulting in a reset
  of ->cpus_allowed and the thread running all over the place. ]

The solution is to re-work select_fallback_rq() to require active
_and_ online. This makes the active,!online case work as expected,
OTOH archs running CPU_STARTING after setting online are now
vulnerable to the issue from fd8a7de17 -- these are alpha and
blackfin.

Reported-by: Chuansheng Liu <chuansheng.liu@intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: linux-alpha@vger.kernel.org
Link: http://lkml.kernel.org/n/tip-hubqk1i10o4dpvlm06gq7v6j@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>

Conflicts:

	kernel/sched/core.c

Change-Id: Ib22f61c28494bcccc40f9f7fa3812c72e5528203