msm: display: Use socinfo_get_version for LVDS pixel remap on 8064 target

Use socinfo_get_version instead of socinfo_platform_get_version for
improving image quality of LVDS display through pixel remap in 8064 targets

Change-Id: I28814de2404e0569a4a2f8862ae3aa5c8e3471a7
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
msm_fb: display: Correct LVDS Phy mux settings

Fix the display color issue in 1.1 chips due to wrong mux settings in
LVDS Phy

Change-Id: Ia51500e15e0ffb3e4cc056073985cdeed5751652
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
msm_fb: display: add dtv wait for vsync when in blt mode

Currently dtv is waiting for overlay done when in blt mode. When dtv
frame rate is low, this return may be too soon. So before dmae
finishes updating buffer, the buffer may be overwritten by userspace.
Add dtv wait4vsync after overlay done to lock the buffer untill the
next vsync to avoid tearing or flicking.

Change-Id: Ic57544a5305fdf9081bfeeccd8d364395faaf602
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm_fb: Increase backlight granularity from 15 to 255 levels

Currently number of backlight levels are set to 15, which causes
noticeable flicker when backlight level is changed from CABL
functionality in userspace. So to improve visual performance,
increase backlight granularity from current 15 levels to 255 levels.

This change is for msm8960 & apq8064 liquids which use Chimei panels.

CRs-fixed: 342485

Change-Id: I204f881d45fbcd4a419cc8e61c3bcb1f4d520f7e
Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>
diag: Disable all log masks when receive disable command

When diag receives the command to diable all log masks,
disable all log masks, and pass all log code updates to
the appropriate processors.

CRs-Fixed: 357355
Change-Id: Ied1e5a3ff7d79f477a8f3ef3dfe4343cbd5972a7
Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>
msm_fb: display: Flush pipe registers before staging the pipe

Flush pipe registers before staging the pipe for the Mixer with
pull mode panel interfaces. This fixes the IOMMU page fault/underrun
caused by pipe fetching previously unmapped buffers due to missing flush
calls

CRs-Fixed: 356484
Change-Id: I6bc2e49746a7c3773708796bc1709c75a8afaa4b
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
msm: camera: Change timeout values for msm_server_proc_ctrl.

Allow userspace to set timeout values for msm_server_proc_ctrl.

Change-Id: I3cccccafc036d0904f7c10d523a6a03f25b7b9b3
Signed-off-by: Deepak Kurien <dkurien@codeaurora.org>
Signed-off-by: Jignesh Mehta <jigneshm@codeaurora.org>
msm:kgsl: Enable GPU DCVS for msm8930

To save power for graphics applications, enable GPU DCVS feature
for msm8930

Change-Id: I0ca2311fa3b6efc07733ad13d835470c9e9b3d39
Signed-off-by: Sudhakara Rao Tentu <srtentu@codeaurora.org>
USB: gadget: android: Add NULL check for platform data

Add NULL check for platform data which might otherwise
cause NULL pointer derefernce in case pdata is not defined
for the target.

Change-Id: Ie482f107048acc5c4ba0993196af3902af3b81d6
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
msm: board-copper: Initialize SPM device driver ahead of Device Tree

SPM driver is needed for voltage regulator and acpuclock. Initialize the
SPM device driver in boards file before regular drivers are initialized.

Change-Id: I88a9a06a91e9bb4ff6b31845e6afa012e78b8e40
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
msm: copper: Add Low Power Management drivers for CPUIdle

When the core is in idle, CPUIdle framework calls into the architecture
specific idle driver. The idle driver uses RPM resources (L2, VDD, XO)
and the time available to determine the lowest power mode possible and
uses the SPM driver to put the core in low power mode.

Add LPM levels that specify the latency and the energy required to enter
different low power modes. These values are used to determine how deep a
sleep can be achieved before the next scheduled wakeup.

Change-Id: Ia2ba25e618aa72cb02f49fbd0028a0615e465dc8
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
msm: pm-boot: Add devicetree support for pm-boot

pm-boot driver abstracts warm boot configurations for the power
management drivers. Add device tree support to read the boot
configuration information from DTS file.

Change-Id: I1135f796ddb054bb1ea4b64b9ff323736157bdc8
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
msm: pm-8x60: Use Qtimer for copper

msm_timer is no longer available for copper. Use alternate Qtimer API
for copper.

Change-Id: I2df4f6d90090d4c751331eee9bb768629b745f09
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
msm: camera: Enable MT9E013 for 8x60

Add board file configuration, clock configuration and
clock setting to enable MT9E013 sensor on 8x60 v4l2
architecture

Change-Id: I90eb9c7055ec5e3223f5c608769af7c363a49f54
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
Bluetooth: Remove holding lock when sending A2MP message

Remove holding the AMP manger list lock when sending the
A2MP Change Notify message, as this uses L2CAP and will
lock the socket and possibly sleep.

This removes a potential deadlock and a "BUG: sleeping
function called from invalid context" message from the
kernel log.

Change-Id: Icf8c5afc1a5cde36517bb979820c83a20ee207fd
CRs-fixed: 358736
Signed-off-by: Peter Krystad <pkrystad@codeaurora.org>
msm: copper: Register non-secure timer interrupts

Register for both secure and non-secure timer interrupts so
as to allow for timer interrupts to be received when operating
in both secure and non-secure modes.

Change-Id: I9f0686be9314f1ea86790110c9821d1b2a2b4895
Signed-off-by: Sathish Ambley <sambley@codeaurora.org>
msm: platsmp: Update release sequence for secondary cores

Release the secondary cores out of reset using the latest
sequence required for the copper target on the simulator.

Change-Id: If8d8bbb6c2aadd0cf8a57afdcf81ba4bea4e0421
Signed-off-by: Sathish Ambley <sambley@codeaurora.org>
base: genlock: allow synchronization with a single gralloc handle

In order to support synchronization in a process with a single
gralloc handle we require the ability to write lock a buffer
while it is already read locked by the same handle. This change
extends the concept of an exclusive write lock or recursive read
locks to a genlock handle (rather than the genlock lock).
Genlock cannot provide deadlock protection because the same
handle can be used simultaneously by a producer and consumer.
In practice an error will still be generated when the timeout
expires.

CRs-fixed: 356263
Change-Id: I322e7fadc8b43287f53b211242b176d3de731db2
Signed-off-by: Jeff Boody <jboody@codeaurora.org>
msm: footswitch: Allow assigning of consumer names to footswitches

regulator_get() expects two arguments: a consumer device pointer and
a regulator name.  For footswitch regulators, users of this API have
usually passed NULL in place of the device pointer, which was treated
like a wildcard for the purposes of matching. Those that passed
pointers received no advantage from it anyway, since it was not
possible to specify consumer device names in the devices-* files using
the macros in footswitch.h.

Improve on this by expanding the footswitch macros to take a consumer
name strings. This allows regulator_get() to find matches using a
stricter criteria that considers the consumer device name and ID,
as well as the regulator name.

Change-Id: I77618007b674480aff031329757b41cc00014478
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
msm: kgsl: Pass device pointers to regulator_get()

Passing a device pointer instead of NULL as the first argument
to regulator_get() allows the device to be taken into account
when finding a matching regulator. This removes the need to
specify a unique regulator_name in struct kgsl_pwrctrl.

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