mdss: Add return value when copy_from_user is successful

Return successful when the ioctl MSMFB_OVERLAY_PLAY_ENABLE
is successful.

CRs-Fixed: 492570
Change-Id: Id279be87ed2ccb519109b0dd491511af007c3841
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
msm: mdss: Add support for BGRX format

MDSS hardware supports BGRX format, add support
of this in software.

Change-Id: Idd474afa6e05c3bb4832fd20ed68925ebf024b9e
Signed-off-by: Pawan Kumar <pavaku@codeaurora.org>
msm: mdss: Fix FB base layer pipe allocation failure

At boot time when RGB pipe is used as frame buffer base
layer, it is failing in kickoff as pipe's front buffer
has zero planes. Add check for front buffer's number
of plane in kickoff.

Change-Id: I67cefedac3ca272012eb41812caa0bce5cca637e
Signed-off-by: Pawan Kumar <pavaku@codeaurora.org>
msm: clock-8084: Add clock entry for CoreSight kpss funnel

Add mapping for the clock for the kpss funnel CoreSight
component so that the CoreSight funnel driver can operate
on and manage the clock for the same.

Change-Id: I519ec91a0a096cd062c114fb3f2aa7802a961c95
Signed-off-by: Pushkar Joshi <pushkarj@codeaurora.org>
msm: kgsl: Allow tasks to signal pending events

Add a type parameter to event callbacks to give tasks a way to
communicate error conditions to the callback. Current type values
are KGSL_EVENT_TIMESTAMP_RETIRED for normal timestamp expiry and
KGSL_EVENT_CANCELLED if the event is cancelled prematurely.

Change-Id: Ic0dedbad9907cd50642a604a3af562e01a4b4a3b
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Do not try to resume the device from INIT state

If the device is still in INIT state there are no open instances
of it running.  Resume calls should be no-ops.  Do not attempt
to start the device at this point.

Change-Id: I1cb6d60581b0b5b0a2ab1b13418adc4ae3983c5e
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
msm: kgsl: guard all mem_idr operations with the mem_lock

It isn't possible to use rcu_read_lock() sections to guard
access to a data structure that is refcounted with a kref.
Rather than creating RCU-aware refcounts for kgsl_mem_entry
as described in Documentation/RCU/rcuref.txt, just use
the mem_lock to guard lookups in the idr.

Change-Id: Ia0733b156fc7a9b446cb8221b9172ce9faf111e7
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
msm: kgsl: fix NULL check in kgsl_mem_entry_set_pend()

Checking NULL before derefencing usually works better.

Change-Id: I2e2936eb9532dae4b0ef471b5cb2dd1c3a8f0975
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
msm: mdss: fix smp calculation for yuv frames

Shared memory pool calculations should be based on the width of the
surface when calculating the stride of second plane. This may lead to
unexpected SMP allocations leading to underflow or waste of SMP blocks.

Change-Id: I4eb998cff4f05273b7aa0111c917fa151b71b140
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: mdss: Reset hardware cursor flag on suspend

Reset hardware cursor enable flag while going
to suspend as cursor address doesn't remain
valid after iommu detaching which create
iommu page fault after resume.

Change-Id: I2fd484de72b62f39cdeaee025995afc975b3ba6e
Signed-off-by: Pawan Kumar <pavaku@codeaurora.org>
usb: xhci: Fix uninitialized variable compiler warning

Fix the following compiler warning:

drivers/usb/host/xhci-hub.c: In function 'xhci_hub_control':
drivers/usb/host/xhci-hub.c:544:6: warning: 'retval' may be used
uninitialized in this function error, forbidden warning: xhci-hub.c:544
make[7]: *** [drivers/usb/host/xhci-hub.o] Error 1

Change-Id: I4f7ab5fcfeaa3de9b9acc48571a92771935bc0be
Signed-off-by: Jack Pham <jackp@codeaurora.org>
msm: vidc: Handle FBD's with ARF flag

For VP8 some frames are used only for decoding and not for display.
FW sends FBD with DROP_FRAME flag set for this frames.These are queued
to driver by setting DROP_FRAME flag. Clients can decide how to handle
these FBD's.

Change-Id: I278637871e4fdeef8b4089b5e04596de88a543ad
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
ARM: 7527/1: uaccess: explicitly check __user pointer when !CPU_USE_DOMAINS

The {get,put}_user macros don't perform range checking on the provided
__user address when !CPU_HAS_DOMAINS.

This patch reworks the out-of-line assembly accessors to check the user
address against a specified limit, returning -EFAULT if is is out of
range.

[will: changed get_user register allocation to match put_user]
[rmk: fixed building on older ARM architectures]

CRs-Fixed: 504011
Change-Id: I3818045a136fcdf72deb1371b132e090fd7ed643
Reported-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Git-commit: 8404663f81d212918ff85f493649a7991209fa04
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
msm: iomap: correct MSMKRYPTON shared memory size and location

Correct the shared memory size and location for the MSMKRYPTON target.

Change-Id: I709ad62b0c1f6745ed44e32a6936e6b5b8a262bd
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
of: batterydata: Introduce DT support for battery data

Add the of_batterydata driver to parse device tree battery data.

Battery data contains battery profile information and is used by the
charger and the BMS drivers.

Change-Id: Ibe03800be0d51e82194c9385c6348c5a6c92711d
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
ARM: dts: msm: Add ipc-spinlock entry for MSMKRYPTON

Add the ipc-spinlock entry to facilitate locking between apps and non-apps
processors.

Change-Id: Ifc25710b828530ab9e9d0f10427e3b6b0c2ec982
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
msm: krypton: fix boot dependencies

Add SMD's dependencies, msm_smem_init() and msm_init_modem_notifier_list(),
to the early init sequence, msmkrypton_add_drivers().

Change-Id: Ic2807af06c552b286fe6c3fbc9b69a521e45be9e
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
ARM: dts: msm: Add smem entry for MSMKRYPTON

Add the shared memory entry to facilitate interprocessor communication.

Change-Id: Ifc63ed351dde2b6b0e56f727963767f50c05576b
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
ARM: dts: msm: Support no lpm for atmel touch controller

MSM8x10 MTP does not support low power mode(lpm)
for touch controller regulators.

Change-Id: Iae9faaad7eacae7e1e3d75e7807517f0c3ee8a89
Signed-off-by: Chun Zhang <chunz@codeaurora.org>
msm: camera2: Enhance processed divert in cpp driver.

The processed divert frames from cpp driver can be queued back
to free queue or queued in done queue. This change enhances
cpp driver to support both modes of operation.

Change-Id: I2ec08bd9c25fdb1db089d974c935e97898840e39
Signed-off-by: Rajakumar Govindaram <rajakuma@codeaurora.org>