msm8x60: use LZO compression also for ramdisk

Change-Id: I14e0740ef9faebf4368bdd0e207efad467ad50fd
msm8x60: semc_vpe1 add ION support

Change-Id: Ic2a904bf02fe9f4513cf36bc91d56595dcf00e1c
fuji: add missing sensor ION ifdef

Change-Id: I297cde30384996fa22fb4239d8289ffe88c6217c
mmc: fix crash for bcm sdio

Change-Id: Ied62e4bccac31011ec2521b111280408e7dc949d
msm:vidc: Fix buffer pool index

While searching for the available buffer entry
in the buffer pool the search should begin from
index 1 as zeroth entry is reserved.

CRs-fixed: 366361
Signed-off-by: Mohan Kumar Gubbihalli Lachma Naik <mgubbi@codeaurora.org>
(cherry picked from commit 8c7e367a5ccd1c78c728657a14f08d6956b72e50)

Change-Id: I754fac98ce14f28cede1cb590c62784ad303a645
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
ASoC: msm: qdsp6: Fixed the issue unmap command is sent incorrectly

When session CLOSE command is sent right before session RUN command
is acknowledged, callback function can mistakenly think that
the next received acknowledgement is for CLOSE command instead of
RUN command. This triggers driver to send memory unmap command to
the Q6 while it is still processing the CLOSE command. Eventually,
this leads to an invalid memory access and causes Q6 crash.

CRs-Fixed: 377281
Signed-off-by: Jay Wang <jaywang@codeaurora.org>
(cherry picked from commit 0668d106027ab1f2608171db970ecd1edf634d65)

Conflicts:

	sound/soc/msm/qdsp6/q6asm.c

Change-Id: Ieeadf5bc48060fd0462d23f5e0ca023dec43e09c
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm: audio: qdsp6v2: Fix WMV stream resume issue

- Suspend phone while WMV clip playback is going on.
Resume it, clip fails to play.
- At resume of WMV clip, Pause is issued initially
to driver. But there is a bug in pause API which is
not returning appropriate result. OMX component when
starts playback, it now issues resume to driver and
driver is setting DSP to run state even before ENC_DEC
params are set.
- Fix pause code to return error value if driver is not
enabled. This will avoid driver in sending CMD_RUN
before ENC_DEC command.

(cherry picked from commit 92ad28cd56803b451ae4bde72bfd20021c769649)

Change-Id: If2814bab09d47fd4c99cc1e917be8f573bed0b50
CRs-Fixed: 394756
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
msm: gpio-v2: Dont re-enable the interrupt and clear the status

If a gpio interrupt is already enabled, do not re-enable it again
and do not clear the interrupt status.
Before this patch:
If an edge interrupt is marked as wakeup, the gpio sys suspend will
clear the status and enable it.
On Resume - the gpio sys resume would clear the intr_status of the wakeup
irq.
Thus, if this particular wakeup irq triggered and woke us up, we lose its
intr_status before calling the gpio summary handler.
Now, when the summary handler is finally called, the irq handler for the
wakeup interrupt is never called.

With this change:
1) Not clearing the intr_status on sys-resume, ensures that it is marked as
pending in the gpio layer.
2) Not re-enabling it again, makes sure that when the irq framework unmasks
all irqs on resume, it does not clear the intr_status either.

Change-Id: I7289522c8c9c97c6f4210433814013160678d130
CRs-Fixed: 400562
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
msm: bam_dmux: handle system wide low memory conditions

When A2 turns on, queue_rx() is first run from the SMSM thread, and
attempts to allocate 32 2kB-buffers with GFP_KERNEL for DMA transactions.
If the system is low on memory, the allocation could put the thread to
sleep while the memory allocator scavenges for enough memory to satisfy
the request.  This is not desired as it stalls a critical system thread
that is communicating with a real-time system.

Instead, use GFP_NOWAIT which will return immediately if no memory is
available for the allocation request so that bam_dmux may handle the
situation gracefully and possibly reschedule the allocations for a later
time.

CRs-Fixed: 406946
Change-Id: Ibff8c2d75c56b41c8d947a49e5a477fea7b31a36
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
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.

(cherry picked from commit 0614b96dc8e4c8a0dd0db41aec5a79daa3bdf091)

Conflicts:

	lib/genalloc.c

(cherry picked from commit 64cf7183f37df623bec8f46348b11c5781d3b0cc)

Change-Id: Ied97c888b967c4433519cb47e972f7a0f2281d71
CRs-fixed: 387655
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm_serial_hs_hwreg.h: Correcting the even parity and odd parity bits

Currently parity bits are defined to be used with UART_DM_MR2
register with PARITY_MODE Bit as below :
EVEN_PARTIY = 1 and ODD_PARITY = 2
With these values, UART functionality doesn't work after enabling parity.
Hence adding correct used PARITY_MODE bits value as
EVEN_PARITY = 2 and ODD_PARITY = 1
after confirming with UART hardware programming guide.

(cherry picked from commit fd40e5f6313fbc74e8897927be1004faa5d9df08)

Change-Id: I90fa8384d434abd42dc46c917d39e8de1f540993
CRs-Fixed: 410377
Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
Merge branch 'jellybean' of https://github.com/CyanogenMod/android_kernel_sony_msm8x60 into jellybean