msm_fb: display: turn mdp clock on at pipe_commit

mdp clock is controlled by frame work. There has
possibility that mdp clock had been turned off while
frame update still happen. In this case update
thread may stuck at wait4vsync since there has no
mdp clcok to trigger vsync interrupt. This patch
will enable mdp clock at pipe commit when mdp clock
is tunred off so that frame update can be completed.

Change-Id: I2d31b9a4b6f0cb9dd36516a80931988e23e8a545
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_dsi_cmd.c

Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
Merge "msm_fb: display: turn mdp clock on at pipe_commit"
msm: vidc: Add ioctls for MPEG-2 extradata support

Add ioctls for MPEG-2 extra data support.

Change-Id: I529681c350e35a4b304675cc3d67181a7c7dc37a
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
Merge "msm: vidc: Add ioctls for MPEG-2 extradata support"
msm_fb: hdmi: add range check for format

While accessing the video format from
reserved field of screeninfo the video
format should be checked for sanity. This
change adds appropriate range check for this
value.

Change-Id: Ib4828a1819caf402ad074b582777cb3d5e81b275
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
Merge "msm_fb: hdmi: add range check for format"
msm: mdp: Fix reserved field usage

An earlier commit(ec5b2f)increased the number of reserved fields
in the kernel standard fb.h header changing the struct size.
This caused issues with userland applications using the corresponding
bionic header. This patch revert the earlier increas in size
and makes corresponding adjustments to the reserved field usage.
A follow up patch will remove usage of reserved fields entirely.

Change-Id: Ibc2c00de71e5a6d2563a8a8a3e0916d15faef32b
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Signed-off-by: Arun Kumar K.R <akumarkr@codeaurora.org>
msm_fb: display: replace msleep with wait4vsync

vsync is controlled by frame work which means vsync irq
off may happen at any instance. This patch use a reference
count to control vsync irq enable/disable so that
wait4vsync can replace msleep safely during suspend.

Change-Id: Ief84b1b421436e1f750288eb9a9760a9cb96c555
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay.c

Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
msm_fb: display: wait4vsync after timing generator is turned off

When continuous splash is enabled, timing generator is enabled at
bootloader, it then needs to be turned off at mdp4_dsi_video_on()
to switch displayed content from frame buffer. wait4vsync after
timing generator is turned off is necessary to make sure DMAP has
finished fetching splash logo from original splash buffer. Otherwise,
DMAP iommu page fault may happen.

Change-Id: I35f9fb9da76f93b60d4719d147aea3246c770c9f
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
Merge "msm_fb: display: replace msleep with wait4vsync"
Merge "msm_fb: display: wait4vsync after timing generator is turned off"
Merge "msm: mdp: Fix reserved field usage"
kernel/sys.c: fix stack memory content leak via UNAME26

Calling uname() with the UNAME26 personality set allows a leak of kernel
stack contents.  This fixes it by defensively calculating the length of
copy_to_user() call, making the len argument unsigned, and initializing
the stack buffer to zero (now technically unneeded, but hey, overkill).

CVE-2012-0957

Reported-by: PaX Team <pageexec@freemail.hu>
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: PaX Team <pageexec@freemail.hu>
Cc: Brad Spengler <spender@grsecurity.net>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Merge "kernel/sys.c: fix stack memory content leak via UNAME26"
msm: display: sync point clean up

Remove unused fence input in mdp_display_commit
structure
Use different timeline name for different fb

Change-Id: I4edd335b36dce057ff3e54302af6088a9cc470ec
Signed-off-by: Ken Zhang <kenz@codeaurora.org>

Conflicts:

	drivers/video/msm/msm_fb.c

Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
msm: display: increase fence timeout

Increase timeout value to 900ms to allow
gfx engine to render longer.
When sync_fence_wait fails, need not put fence as
it will be handled outside the loop.

Change-Id: Id4caff55c9f99c48e5f87a85d30fe4c8c0cd65e7
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
Merge "msm: display: sync point clean up"
Merge "msm: display: increase fence timeout"
msm: camera: Fix for camera crash

In msm_server_control function add a check for src
and dest before calling memcpy function to avoid
kernel crash

Change-Id: I814f654c223892a21d585fef31bd6ef75254c108
CRs-Fixed: 444081
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
Merge "msm: camera: Fix for camera crash"