msm: acpuclock-8226: Use restricted cpu rates for bringup

Adjust the list of cpu frequencies to those which can be supported
by the maximum regulator setting.

Change-Id: Ibf0d33ca42a3370f8e5943bf75c3c2304c591289
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
cma: Remove __init annotations from data structures

Several of the CMA data structures are used after initialization
remove the __init annotations from them.

Change-Id: Iff48ed88eef7b8fffdfba4b868cc69ded3c6df42
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
cma: Fix up devicetree bindings

The correct binding for regions is linux,contiguous-regions.
Fix it.

Change-Id: I4bbb4cd3e880c75d917b5a5a081861b3197adfa3
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
msm_fb: Add runtime mixer-2 output format configuration

Set mixer-2 output format using metadata_ioctl before
queuing buffer for write back from mdp. Default output
format is NV12. Mixer-2 support RGB_565, RGB_888,
ARGB_8888, XRGB_888 and NV12 as output format.

Change-Id: I34d307e65cbd8e9e3356c8b5928edca42624d261
Signed-off-by: Pawan Kumar <pavaku@codeaurora.org>
msm: ipa: Data path stall fixes and throughput optimizations

Without this commit, IPA data path can stall under high throughput
scenarios. The race condition that leads to loss of BAM interrupt
when switching from polling to interrupt mode is fixed.  Also, the
logic to replenish the recieve pool is made robust in the face of
low memory conditions. Lastly, various optimizations to make the SW
transmit and receive data path more efficient.

Change-Id: I705e646f544be8aeff127ecd727ffb7bd75ce924
Signed-off-by: Ravi Gummadidala <rgummadi@codeaurora.org>
msm: ipa: add additional WLAN events

These are needed to support AP+STA concurrency

Change-Id: I238950988e4bf971d6005bffda284984448ff9aa
Signed-off-by: Ravi Gummadidala <rgummadi@codeaurora.org>
defconfig: msm9625: disable RMNET-BAM and enable RMNET_WWAN

Enable WWAN Driver is required for the
embedded data path for IPA enabled platforms.

Change-Id: I7809032995055ab9f1065ac9d20f56a05b6cde86
Signed-off-by: Vladislav Mordokhovitch <vmordoho@codeaurora.org>
Signed-off-by: Talel Atias <tatias@codeaurora.org>
msm: remote_spinlock: implement sfpb trylock

The trylock API for sfpb remote spinlock implementation is stubbed out.
This is a problem as "msm: smd: Add remote spinlock init check" adds a
usecase for the trylock API provided by remote_spinlock.  Implement the
sfpb trylock so that the usecase remains functionally correct on targets
using sfpb remote spinlocks.

Change-Id: Ic6a05b42cc944e5613deb68b750a46abf75dfd29
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
power: qpnp-bms: use ADC synchronous voltage and current API

Currently, the BMS driver is using BMS override mode in order to
measure simultaneous voltage and current. This is not optimal.
Override mode causes a delay and may be inaccurate.

Instead, use the ADC driver's synchronous voltage and current API
to read these values straight from the user adc peripherals.

Change-Id: I50172db21af75bca1e7ceff73cc08908da527795
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
msm: iommu: add missing include

irqreturn_t is defined in irqreturn.h. Include irqreturn.h in
iommu_perfmon.h so that iommu_perfmon.h's users don't have to include
it themselves.

Change-Id: I57b7bb3dd8cb823c302d8938b9c0304b10aa367b
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
msm: 8064: Enable all cores in FSM8064_EP

Femto development platform (FDP) require all the cores to be enabled.
Add the smp ops to the machine macro for FSM8064_EP

Change-Id: I3949065e87ba69a35504b7b79052d29792b77b32
Acked-by: Kaushik Sikdar <ksikdar@qti.qualcomm.com>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
msm: 8064: gpio change for fsm8064_ep platform

GPIO change to enable the 1PPS signal input to DAN card.

Change-Id: I75aad4001a1ea0deb6dddbd9694cd01d77d8ce2b
Acked-by: Jie Luo <jluo@qti.qualcomm.com>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
msm: kgsl: Check the current interrupt status before power operations

Sometimes the core will go idle before the interrupt can be handled on
the GPU. If that happens then we could go to a lower power state before
cleaning up the pending interrupt and various entities that might be
waiting for it. Consider the current interrupt status when checking
for idle.

CRS-fixed: 449813
Change-Id: Ic0dedbadfd2d40e4411cf3b05e1eb4c4eecf7841
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Resolve a potential race in the interrupt handler

In the GPU interrupt handler we attempt to clear the ts_cmp_enable
for the active context so that future interrupts are skipped until
someone needs one again. If for some reason the interrupt handler
is delayed then there is a possiblity that the "current" context in
the GPU isn't the one that fired the interrupt. In that case we
could be accidently clearing a ts_cmp_enable for a context that
needs it. Instead of clearing in the interrupt handler clear it
from the GPU so we can be sure we got the right context.

As a bonus pushing this logic to the GPU side lets us get rid of
some extra register reads/writes in the interrupt handlers.

Change-Id: Ic0dedbadbf350f7c4866092fa0686f9b42f3cd33
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Add event tracepoints

Add tracepoints for tracking the lifespan of GPU events.

Change-Id: Ic0dedbadf99b1efcb650608c6ac664d3c4ddafd5
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: smd_tty: Initialize the tty_port structure

There has been an update to the Linux TTY Framework to centralize
common code which is repeated over and over using tty_port helpers.
A warning message has been added to the kernel in order for the
individual tty drivers to adapt to this update.

Update smd_tty driver to adapt to the updated Linux TTY Framework.

CRs-Fixed: 446129
Change-Id: Id65556238c13154e40241b2a4c485eb88fbf19ae
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
msm: mdss: Enable pan_display to support continuous splash screen

The pan_display path to send the frame update is not
setup to support continuous splash screen feature.
Continuous splash screen is broken if the first update
cames via a pan_display.
We need to setup the mixer for the continuous splash
screen feature. This has to be delayed till the split display
setup has been completed.

Change-Id: I2f0f268c1988f58c02cbdba7bc48b53bf999eea5
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
diag: Update last msg SSID, event and log message values

Diag msg ssids, events and log codes are updated on the modem side.
These values are out of date with what is on the modem.
Bring these values up to date with the modem.

Change-Id: I985cb1c8e8910bf292bb1c4c0c03ebbee753dcfa
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
cma: Add support for associating regions by name

Currently, the devicetree lookup code assumes that all
CMA regions are present at a fixed address and uses the
fixed address for associating CMA regions to devices.
This presents a problem for dynamically assigning regions.
Device names get mangled/changed between flattened and
populated devicetree so relying on that is unworkable.
Add a separate name binding to allow lookup later between
devices.

Change-Id: Iaacd9888ea708d7293f1120e2b8c473c5c601f3d
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
defconfig: msm8974: Enable CMA

Enable the Contiguous Memory Allocator (CMA) feature. This lets
drivers allocate large contiguous blocks of memory without the
need to remove it from the kernel's allocator.

Change-Id: I4ae45fcfc45e8b6a7103179c83676aec52eb977c
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>