video: msm: Do not use disable_irq in the spin_lock_irqsave context

Both mdp_isr() and mdp_histogram_disable() uses the same
spin lock mdp_spin_lock variable.  One core waits for disabling
mdp_isr after acquiring mdp_spin_lock and other core in mdp_isr()
waits for spin lock mdp_spin_lock and dead lock between two cores.

Change-Id: I73a10494ab78e92fc88a348aed4f526091b51f89
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
(cherry picked from commit 946ca6389b8f8c70b62a2f1ab4d81b475395f7d8)
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
video: msm: Remove adjustment to MDP revision

Remove the modification of mdp_rev during mdp_probe. Not needed since
board files now have the correct MDP revision data.

CRs-Fixed: 417080
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
(cherry picked from commit bfdabc012c3a91e893fc9ee8473d25ca12dccf5d)

Conflicts:

	drivers/video/msm/mdp.c

Change-Id: I553cb2a8e8de43b6c7b7976c3eca67d00a3cfe4f
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
msmfb: Add Enable/Disable flag definition

Fix compilation error, due to mm-core library supporting MDSS HW.

Change-Id: I50afc5e85129172e6b1774a0bc6b8ceff2aad45a
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
msm: Ensure droop detectors do not affect krait PLLs

The Droop detector mechanism present in Glitch-Free (GFMUX)
goes to nondeterministic state during frequent
standalone power collapse operation. It affects
Krait PLL output so that the PLL won't lock to
required frequency.

Since Droop detector isn't used, set sc_pdn (PLL_CLAMP)
permanently high to ensure droop detector is off and it
does not affect Krait PLL.

CRs-Fixed: 381144
Change-Id: I94ee03e0e9439c5195909a8646ff9e3c3f667893
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
(cherry picked from commit 06e444f9cd8106816a2874886cb4c165d4b03b81)

Conflicts:

	arch/arm/mach-msm/Kconfig
	arch/arm/mach-msm/Makefile

Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/Kconfig
	arch/arm/mach-msm/Makefile
msm: platsmp: Update Krait reset sequence

The SMP CPU initialization code incorrectly applied the
KPSS 2.x CPU reset sequence to Krait Pass 3, even on
targets using KPSS 1.x. Modify the SMP code to apply the
KPSS 1.x reset sequence where appropriate, regardless of
the CPU version. Also incorporate updated register settings
to avoid having to later reconfigure the Krait PLL clamps.

CRs-Fixed: 431744
Change-Id: Ie18cf5b2e1a91ae574934e64a487ee27d70ea1a5
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
(cherry picked from commit 986b5153852a01149ec967434b4a95acdb0ac5d9)

Conflicts:

	arch/arm/mach-msm/platsmp.c

Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
ARM: decompressor: avoid speculative prefetch from non-RAM areas

We setup identity MMU mappings across the entire 4GB of space, which
are permissionless because the domain is set to manager.

This unfortunately allows ARMv6 and later CPUs to speculatively
prefetch from the entire address space, which can cause undesirable
side effects if those regions contain devices.

As we setup the mappings with read/write permission, we can switch
the domain to client mode, and then use the XN bit for ARMv6 and
above to control speculative prefetch to non-RAM areas.

CRs-Fixed: 415757
Change-Id: I24bacf244b1e987e1b966eee64a2578cbdb12080
Reported-by: R Sricharan <r.sricharan@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
(cherry picked from commit 3463f07a22f288c6230aa8c230f623d9183c5a10)

Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
msm: Ensure krait pll clamp is always set for CPU0

To turn off droop detectors in glitch free mux, the krait PLL clamp
is set permanently for secondary cores in platsmp secondary boot path.
Set the pll clamp for primary core as well.

Change-Id: I4b18e7781515c3c66ef629c3c8ca3457ca9b2874
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
(cherry picked from commit 8fd644a8f5f4fad013c502a4600f63374a464ccb)

Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
Revert "msm: display: fence fd releasing"

This reverts commit 86bb7c63d4868939ccd60c4c213270ac2618ca77.

Change-Id: I98ac37a7ab1e167354554535bfb3b42ca2af16f6
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
msm: display: sync point error handling

Increase timeout value for fence waiting
Handle file handle error in fence creation

Change-Id: I46db344172795998fd03a1676f90d9dcbd19d0a6
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>