ASoC: msm: Null dereference check added

In asm_read function we should check buffer pointer
before it is dererferenced.

CRs-Fixed: 612682
Change-Id: I1968c038e1d35381bf174000287d542441e41092
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
mm-camera: Changes to remove unused code for security issue reported

Changes to remove MSM_CAM_IOCTL_SET_MEM_MAP_INFO Ioctl support.
This will avoid physical memory mapping to userspace.

Change-Id: If014e6d152786b508c8e7ee6c53631913cd4cfcf
Signed-off-by: Guruprasad Gaonkar <ggaonk@codeaurora.org>
msm: msm_fb: remove mmio access through mmap

Disable access to mm io and add
appropriate range checks to ensure valid accesses
through framebuffer mmap. This prevents illegal
access into memory.

CRs-Fixed: 474706
Change-Id: If25166f2732433ef967e99c716440030b567aae9
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
Merge "mm-camera: Changes to remove unused code for security issue reported"
Merge "msm: msm_fb: remove mmio access through mmap"
lib/scatterlist: error handling in __sg_alloc_table()

I was reviewing code which I suspected might allocate a zero size SG
table.  That will cause memory corruption.  Also we can't return before
doing the memset or we could end up using uninitialized memory in the
cleanup path.

Change-Id: Icee6be8ea22644d7f16264d9d2a0887c7145996b
CRs-Fixed: 611562
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
media: dvb: mpq: video: enable input capture for dvb/video

 - notify userspace address and size whenever elementary
   stream data enters into dvb/video module.

Change-Id: Id7ce8104bf6770e32e2889da0272bfd25e19f82d
Signed-off-by: Ananda Kishore <kananda@codeaurora.org>
Merge "lib/scatterlist: error handling in __sg_alloc_table()"
Merge "ASoC: msm: Null dereference check added"
msm: hdmi: always enable hdcp encryption

Change-Id: Iec46dd0e52895ef97b8eb2633ac601ed0e6f14f7
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
Signed-off-by: c_ddeshm <ddeshm@codeaurora.org>
msm: hdmi: proper hdmi turn on sequence

Change-Id: Iab193356d0ce199002efc7b58f19b856016a7346
Signed-off-by: c_ddeshm <ddeshm@codeaurora.org>
hdmi:msm : fix for the hpd issue

Change-Id: Icbc66f5ab9ff14e33cd87372b83e8058373bec7a
Signed-off-by: c_ddeshm <ddeshm@codeaurora.org>
msm: hdmi: optimise HPD event handling

Do not reset the controller if mode (vic) does not
change on HPD.

Change-Id: I0bdbb1d8348b89c502d3320b177924a29fe4b9f4
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
msm: hdmi: proper audio tear down

Properly tear down the audio session in kernel on
transitioning from LK if it was started in LK.

Change-Id: I60a21cda844af7d207baf43d9369c91e49e9d325
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: c_ddeshm <ddeshm@codeaurora.org>
ASoC: msm: Fix the noise in HDMI on HDMI connect disconnect

Pops and long squeak sounds are heard during the resolution switch
on some monitors
The noise is due to the playback of the stale data in the end device.
To workaround the issue, a silence has to be played all the times to
clear out the end device buffers.
Open a playback session with the HDMI device, this will cause a underrun
in the AFE port whenver the no audio playback is in progress.
This underrun will trigger silence packets at the AFE port and will
clear out the end device stale buffers

Change-Id: I8b3d8dd8b9d1e0f2beae6e56401741b2e87516ea
CRs-Fixed: 498791
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
Signed-off-by: c_ddeshm <ddeshm@codeaurora.org>
msm_fb: hdmi: play silence audio to reset TV

Some TV goes to bad state that will cause audio noise.
Playing a piece of silence audio can reset it.

Change-Id: I26db3fc91d1955b1df7f3bdab181446fa9485c0d
Signed-off-by: c_ddeshm <ddeshm@codeaurora.org>
msm: display: hdmi: enhance mutex protection

Adding mutex for audio configuration.

Change-Id: I342f16d62e326a0ce24692656ec5044adc68b87f
Signed-off-by: c_ddeshm <ddeshm@codeaurora.org>
msm_fb: frame_drop Improvements

Multiple fixes for frame drops

Change-Id: I32e89f15f511d5e55ccc9c9a198f3ab49b3d04c0
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
msm_fb: Fix security bug info->par check

Add check for info->par before assigning to mfd.

CRs-Fixed: 526286
Change-Id: I21763468ee5a977ee554c2266e8a7fbde5b441cc
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
sched: re-calculate a cpu's next_balance point upon sched domain changes

Commit 55ddeb0f (sched: Reset rq->next_interval before going idle) reset
a cpu's rq->next_balance when pulled_task = 0, which will be true when
the cpu failed to pull any task, causing it go idle. However that patch
relied on next_balance being calculated as a result of traversing cpu's
sched domain hierarchy.

A cpu that is the only online cpu will however not be attached to any
sched domain hierarchy. When such a cpu calls into idle_balance(), we
will end up initializing next_balance to be 1sec away! Such a CPU will
defer load balance check for another 1sec, even though we may bring up
more cpus in the meantime requiring it to check for load imbalance more
frequently. This could then lead to increased scheduling latency for
some tasks.

This patch results in a cpu's next_balance being re-calculated when its
attaching to a new sched domain hierarchy.  This should let cpus call
load balance checks at the right time we expect them to!

Change-Id: I855cff8da5ca28d278596c3bb0163b839d4704bc
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>