msm: mdss: Add support to YCBYCR MDP format

Add support to MDP_YCBYCR_H2V1 interleaved YUV format.

Change-Id: I3b4fccf8303db778af213feb03644e5600ee803f
Signed-off-by: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>
arm/dt: camera:adjust mount angle for gc0339 sensor

Adjust the mount angle of gc0339 sensor from 90 degree to
270 degree.

Change-Id: If464c66e9a0f84fb9744991e90868352a9c77e81
CRs-Fixed: 532212
Signed-off-by: Wang Wenbin <wenbinw@codeaurora.org>
arm/dt: msm-iommu-v0: don't gate XO shutdown

The MMSSNOC AXI clock is controlled by the apps clock driver,
therefore there is no concept of "active-only". If the clock
is on, it will stay on irrespective of whether the apps
processor is running or power-collapsed. Drivers need to
ensure that their requests are removed before entering a
low-power mode that is expected to lead to XO shutdown.
Therefore there is no point in including an active-only flag,
and drivers should not rely on this flag taking care of
turning off this clock, because that can't happen.

CRs-fixed: 521149
Change-Id: I5f77330599c1e7258512f655b826a215d2ddfdb7
Signed-off-by: Susheel Khiani <skhiani@codeaurora.org>
arm/dt: msm-iommu-v1: don't gate XO shutdown

The MMSSNOC AXI clock is controlled by the apps clock driver,
therefore there is no concept of "active-only". If the clock
is on, it will stay on irrespective of whether the apps
processor is running or power-collapsed. Drivers need to
ensure that their requests are removed before entering a
low-power mode that is expected to lead to XO shutdown.
Therefore there is no point in including an active-only flag,
and drivers should not rely on this flag taking care of
turning off this clock, because that can't happen.

CRs-fixed: 521149
Change-Id: I2bb3eb1e223d13ef097619e64d64030482c026fe
Signed-off-by: Susheel Khiani <skhiani@codeaurora.org>
msm: mdss: Mute blend warning.

MDSS driver throws warning in case requested blend operation does
not match with layer properties but it internally handles such
cases with proper blend configuration.
Silent the warning as it results in excessive logging.

Change-Id: Ia37a16d55dde4a4532972c0bb5dc6e7ecf35eb07
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
tty: Fix race condition if flushing tty flip buffers

As Ilya Zykov identified in his patch 'PROBLEM: Race condition in
tty buffer's function flush_to_ldisc()', a race condition exists
which allows a parallel flush_to_ldisc() to flush and free the tty
flip buffers while those buffers are in-use. For example,

  CPU 0                         |  CPU 1                                  |  CPU 2
                                | flush_to_ldisc()                        |
                                |  grab spin lock                         |
tty_buffer_flush()              |                                         | flush_to_ldisc()
 wait for spin lock             |                                         |  wait for spin lock
                                |   if (!test_and_set_bit(TTYP_FLUSHING)) |
                                |    while (next flip buffer)             |
                                |     ...                                 |
                                |     drop spin lock                      |
  grab spin lock                |                                         |
   if (test_bit(TTYP_FLUSHING)) |                                         |
    set_bit(TTYP_FLUSHPENDING)  |      receive_buf()                      |
    drop spin lock              |                                         |
                                |                                         |   grab spin lock
                                |                                         |    if (!test_and_set_bit(TTYP_FLUSHING))
                                |                                         |    if (test_bit(TTYP_FLUSHPENDING))
                                |                                         |    __tty_buffer_flush()

CPU 2 has just flushed and freed all tty flip buffers while CPU 1 is
transferring data from the head flip buffer.

The original patch was rejected under the assumption that parallel
flush_to_ldisc() was not possible. Because of necessary changes to
the workqueue api, work items can execute in parallel on SMP.

This patch differs slightly from the original patch by testing for
a pending flush _after_ each receive_buf(), since TTYP_FLUSHPENDING
can only be set while the lock is dropped around receive_buf().

Change-Id: Iffe9515db564931438d00aaf9319cc20dfb7fd80
Reported-by: Ilya Zykov <linux@izyk.ru>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Acked-by: Ilya Zykov <linux@izyk.ru>
Cc: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 39f610e40eecc39e4c34e047fd6904ca6b525520
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[rameezmustafa@codeaurora.org: backport to kernel 3.4]
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
msm: mdss: disable MDP hw underflow recovery

When MDP underflows, hardware will automatically try to issue a reset to
recover from it. Potential issue has been identified when reset happens
on two video interfaces at the same time which may lead to a hw lockup.
To avoid such situations disable the hardware underflow recovery, MDP
will still automatically recover at the beginning of next frame.

Change-Id: I3473486e229e67f6213db83a0ecb34333a977d4f
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
misc: isa1200: Add mutex for clk_on

clk_on is a boolean which maintains the enable/disbale
status of clock. To avoid the race condition, mutex call
is added for the clk_on.

CRs-fixed: 507663
Change-Id: If6d933568abc747f3b18497b2c2e743fff4c9e04
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
input: synaptics_fw_update: Change permissions on lockdown sysfs entry

Permissions should be set to 0664 instead of 0777 for sysfs
entries.  Change them to pass CTS test.

Change-Id: I50237eaa917303efda0ad049649611bf1b6d9c31
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
ARM: dts: msm: Add the external micbias for msm8x10 AMIC3

AMIC3 is supported in MSM8610 MTP platform to serve
as the secondary analog mic for stereo recording. Per
HW design, the micbias for AMIC3 is supplied as external
one. Add the configuration to support MSM8610 AMIC3.

Change-Id: Ia25d4b351967bdc86639872bb8117d9e1907791a
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
ASoC: msm8x10: Add the widget for secondary analog mic

AMIC3 is used as secondary analog mic in some use case
to service as stereo recording. Add the widget for the
secondary mic in machine driver to support this usage.

Change-Id: I91b13d43fc1c955d7c369ca5250d2c005b8a1935
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
net: sock: Add temporary padding to sock_common

To prevent unintentional writes to skc_bind_node, shift its
location within the struct. This change can be later reverted
once the code writing to this struct offset is removed.

Change-Id: I81b1fefbdbae0312c211d0d26d472aa6e0140aec
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
msm: spm-regulator: add support for mode selection

Add support to the spm-regulator driver to select which regulator
operating mode to utilize.  There are three possible mode
selections: PWM mode, auto mode, or the existing mode set by
hardware or bootloaders.

Change-Id: Ieaf69f26078d4e9f14db3b2eb7b5cbe2dc8ed31e
Signed-off-by: David Collins <collinsd@codeaurora.org>
ARM: dts: msm: configure APC supply regulator S2 to auto mode for msm8610

Configure PMIC PM8110 regulator SMPS 2 for auto mode.  When
operating in auto mode, the regulator automatically switches
between PWM (high power) and PFM (low power) modes based upon
real-time current consumption.  This results in lower aggregate
power consumption since PFM mode has lower ground current than
PWM mode.

Change-Id: Iddd7a1303235cf7fdd8235b88e47c46b7be615ad
Signed-off-by: David Collins <collinsd@codeaurora.org>
arm/dt: 8610: add novatek NT35590 720p panel for msm8610

Add the device tree file for novatek NT35590 720p panel for msm8610.

Change-Id: I30b0dfbdb632ee1bc8f0e03c42cb857dcdd889c7
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
Merge "msm: mdss: Add support to YCBYCR MDP format"
Merge "msm: mdss: Mute blend warning."
Merge "tty: Fix race condition if flushing tty flip buffers"
Merge "msm: mdss: disable MDP hw underflow recovery"
mdss: display: unmap 'bl_fb_addr_va' when the mapping is no longer needed

Remove the mapping to the original continuous splash frame buffer
once its contents have been copied. This avoids a virtual address
leak, and holding a mapping to memory that may be eventually
reclaimed for use by other subsystem.

Change-Id: I8d7b6d954809a74d5a1ae60491e295b95458a2b7
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>