Revert "[PATCH]  msm_fb: display: Keep fb1 for MDP version < 4.0.2"

This reverts commit 1f4be063fd797613dc78f70ca108a356e978d247

Change-Id: Ieef5f51fd84c5e1917f48df17d670659f26c2b7e
Update 3.8 KSGL drivers with latets changes From CAF

Conflicts:

	include/linux/autoconf.h
kbuild: Really don't clean bounds.h and asm-offsets.h

Commit 7d3cc8b tried to keep bounds.h and asm-offsets.h during make
clean by filtering these out of $(clean-files), but they are listed in
$(targets) and $(always) and thus removed automatically. Introduce a new
$(no-clean-files) variable to really skip such files in Makefile.clean.

Signed-off-by: Michal Marek <mmarek@suse.cz>
ima: free duplicate measurement memory

Info about new measurements are cached in the iint for performance.  When
the inode is flushed from cache, the associated iint is flushed as well.
Subsequent access to the inode will cause the inode to be re-measured and
will attempt to add a duplicate entry to the measurement list.

This patch frees the duplicate measurement memory, fixing a memory leak.

Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mtd: msm_nand: Allow CPU to take ownership of oob buffer while page read

In msm_nand_read_oob() while checking for an erased page the
ownership of the oob buffer is with DMA and CPU might read
corrupt data to decide upon erased page. The exact contents will
be updated only after dma_unmap_page() is called. Fix this by giving
ownership to CPU before checking for erased page.

CRs-Fixed: 285705
Signed-off-by: Sujith Reddy Thumma <sthumma@codeaurora.org>
(cherry picked from commit 7316b6561180820ca2198d137bc92c3e09e71738)

Change-Id: I8f29f26d0886af12bf61213a3020936da7185845
Signed-off-by: Sunil Joseph <sunilj@codeaurora.org>
qdsp5: audio: Set audio stopped flag before calling wakeup

During audio flush and stop command processing, wakeup on read
and write wait queue is done first and then audio stopped flag
is set to true. If a process waiting on read and write queue gets
scheduled first before stopped flag is set then this may result in
read or write command being sent to DSP after adsp disable operation,
which is unexpected.

Fix this by setting stopped flag before calling wakeup.

Change-Id: I20ef197e572d0ffc015d6004296ea7b9f5db2806
Signed-off-by: Manish Dewangan <manish@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/qdsp5/audio_aac_in.c
	arch/arm/mach-msm/qdsp5/audio_evrc_in.c
	arch/arm/mach-msm/qdsp5/audio_pcm_in.c
	arch/arm/mach-msm/qdsp5/audio_qcelp_in.c
qdsp5: audio: Protect common data between ADSP ISR and flush operation

During NEEDS_DATA or BUFFER_UPDATE event processing in ISR
context, if flush command is issued by application then
there is chance of concurrent access of some of the variables
shared between ISR and Process context. This may result in race
condition causing values of these shared variables to be
inconsistent.

Fix this by protecting these variables using spin lock. Also corrected
locking sequence order in encode drivers.

Change-Id: I06b4d08053ad13d1b118ab6f29e69e95b49d133f
Signed-off-by: Manish Dewangan <manish@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/qdsp5/audio_aac.c
	arch/arm/mach-msm/qdsp5/audio_aac_in.c
	arch/arm/mach-msm/qdsp5/audio_amrnb.c
	arch/arm/mach-msm/qdsp5/audio_amrwb.c
	arch/arm/mach-msm/qdsp5/audio_evrc.c
	arch/arm/mach-msm/qdsp5/audio_evrc_in.c
	arch/arm/mach-msm/qdsp5/audio_mp3.c
	arch/arm/mach-msm/qdsp5/audio_pcm.c
	arch/arm/mach-msm/qdsp5/audio_qcelp.c
	arch/arm/mach-msm/qdsp5/audio_qcelp_in.c
	arch/arm/mach-msm/qdsp5/audio_wma.c
	arch/arm/mach-msm/qdsp5/audio_wmapro.c
msm: qdsp5: Avoid race condition of init info cmd being sent multiple times

GET_INIT_INFO command is sent to modem adsp service to get the information
such as task/queues supported by adsp. This command is sent whenever
msm_adsp_get() is called first time by any decoder/encoder drivers. This
command needs to be sent only once, to achieve this a global flag
init_info_cmd_sent is set in msm_get_adsp() after sending GET_INIT_INFO
command to adsp services. Currently flag init_info_cmd_sent is not
protected by any lock. Hence there is chance of GET_INIT_INFO command
being sent multiple times if there are concurrent calls to msm_adsp_get()
where each caller observes flag init_info_cmd_sent not to be set.

Fix this by protecting adsp info initialization sequence with mutex.

Change-Id: Ib0bd865d44e4687f9a85b56854e1fd3277a5707d
Signed-off-by: Manish Dewangan <manish@codeaurora.org>
qdsp5: adsp: Add NULL check in adsp driver functions

ADSP driver functions are directly accessing module without checking
for NULL. This can result in crash if module supplied points to NULL.

Added NULL check to solve this.

Change-Id: I47eef0ea03086935ebfe33a2585ba214780e73f7
Signed-off-by: Manish Dewangan <manish@codeaurora.org>
msm: qdsp5: Initialize event length during adsp fake event generation

During adsp fake event generation, event length is not getting
initialized. This sometimes results in incorrect event data being read
during fake event processing by adsp driver clients.

Fix this by initializing event length properly before generating the
fake event.

Change-Id: Ifcab5adf542b04eef3dc03913b8e10c68f686e8c
Signed-off-by: Manish Dewangan <manish@codeaurora.org>
msm: adsp: qdsp5: Add debugfs to dump read/write commands from/to DSP.

Debugfs tool to get commands to/from DSP printed in logs.

Change-Id: I48748854b69b55cbf2e8fbf9fbdd50e8fe4ce8b5
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
msm: adsp: qdsp5: protect the debugfs code by check of CONFIG_DEBUG_FS.

With CONFIG_DEBUG_FS off,fix compile error.

Change-Id: I4ef4357ca72d24a81d2f8634e32841606c59a995
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
msm: snd: Add updated RPC version number for unicorn

SND RPC has been updated to major version to support new
SND device nodes for FM playback on unicorn. Hence add
support for new SND RPC version

Change-Id: Ibfdbeb033a2be20c76a662a0b847c7e041521a75
Signed-off-by: Sriranjan Srikantam <cssrika@codeaurora.org>
msm: adsp: qdsp5: update debugfs to print complete buffer for 16/32-bit q's

type of pointers to read cmd,msg buffers is changed
from uint32* to unint16* to print all the buffer data.

Change-Id: I4e52040a202e0ea7b174f63d509de331289173a4
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
msm: audio: voicepcm: Added snd pcm client driver

Added support for snd pcm client driver. Which
provides interface to write pcm samples to voice path.

Change-Id: I2bb9a5631c195fc047dde0dc209a6fff24014d0b
Signed-off-by: Rajesha Kini <rkini@codeaurora.org>
pecan: add triple buffering for pecan and hazel

but not enable now

Conflicts:

	include/linux/autoconf.h
p350: enable triple buffer for test
Revert "p350: enable triple buffer for test"

This reverts commit 245b5d35b830a9093733402f9ac0c3b7e1d30b5a

Change-Id: Idb7c602ce0f43d7095053e978c4e00242bd80b4e
Revert "pecan: add triple buffering for pecan and hazel"

This reverts commit 75ff2866c397350d1b8494b471a52914cfb798d4

Change-Id: I690242b54d9cddab7d84518aaebaf815f2120a92
Merge "Revert "pecan: add triple buffering for pecan and hazel"" into ics