HLTE: Android expects SW_LID, not SW_FLIP.

Change-Id: I1f38f1aff1c5f410529ba788fa0980cced44b297
HLTE: Toggle reset of mcu to ensure all devices resume after sleep

  Fixes JIRA CYAN-4607 and CYAN-4229.

Change-Id: I060b2fb178bb24e145e86a56c3c89f316e8748ac
hlte: Fix sensors for real this time.

  Fixes issue of stuck orientation sensor introduced with last patch.
  Maintains the operability of the temp/humidity sensor.

Change-Id: I5f55527b728a2a15345cd2dfc0e01cbda08877ff
hlte: fix merge fail.

Change-Id: I3fe9ea6cf195611a6599485a557cf7544722c4e0
msm: mdss: share fb memory ion fd to userspace

Add new operation request to share ion fd to userspace
for mapping to the frame buffer memory.

Change-Id: I404c73c19e3fffec593ffd32c34e7b1a74a500d8
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
isdbt: Fix the build

 * "make mrproper" failed due to missing files.

Change-Id: I604d3e8fcc029b05a86438b0eb0540ad8fab87aa
msm: kgsl: Protect CP_STATE_DEBUG_INDEX

Put CP_STATE_DEBUG_INDEX and CP_STATE_DEBUG_DATA under protection
to keep it from being written from an IB1. Doing so however opens
up a subtle "feature" in the microcode: memory read opcodes turn off
protected mode in the microcode to do the read and then turns it
back on regardless of the initial state. This is a problem if the
memory read happens while protected mode is turned off and then we
try to access a protected register which then complains and goes boom.

To account for this irregularity explicitly turn back off protected
mode in all the places where we know this will be a problem.

Change-Id: Ic0dedbad1397ca9b80132241ac006560a615e042
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Mark mmapped objects with VM_DONTCOPY

Add VM_DONTCOPY to the default set of mmap flags to keep VM objects
from being copied on fork() and causing issues.  KGSL file descriptors
copied to a child are not expected to be usable.

Change-Id: Ic0dedbad85c07118a931ccb9f7a6fd0507da3e5a
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Cleanup the memory free list

Tighten up the memory free list code and remove the memory unused
debugfs file.  Outside of the cleanup the functional changes are
a) move the mutex to a spinlock for speed, and b) only return the
last entry in the list for given pid/gpu address combination.

Conflicts:
	drivers/gpu/msm/kgsl.c
	drivers/gpu/msm/kgsl.h
	drivers/gpu/msm/kgsl_debugfs.c

Change-Id: Ic0dedbad9595302e2b42de2807fa82c425d1717f
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
msm: kgsl: hold a process_private refcount in process_mem_print

There is a possible race condition where the process can be going
away while its debugfs 'mem' file is being read, which could cause
memory corruption.

Conflicts:

	drivers/gpu/msm/kgsl.c

CRs-Fixed: 627780
Change-Id: I697486faeb3f186fd1220d0acc1e449a4f7b77b0
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
hlte: update bluetooth driver.

  Fixes issues with BT devices causing reboots.
  JIRA CYAN-4725

Change-Id: Ie682d4b77e9618d57b62761da927a19f53768860
net/l2tp: don't fall back on UDP [get|set]sockopt

The l2tp [get|set]sockopt() code has fallen back to the UDP functions
for socket option levels != SOL_PPPOL2TP since day one, but that has
never actually worked, since the l2tp socket isn't an inet socket.

As David Miller points out:

  "If we wanted this to work, it'd have to look up the tunnel and then
   use tunnel->sk, but I wonder how useful that would be"

Since this can never have worked so nobody could possibly have depended
on that functionality, just remove the broken code and return -EINVAL.

Reported-by: Sasha Levin <sasha.levin@oracle.com>
Acked-by: James Chapman <jchapman@katalix.com>
Acked-by: David Miller <davem@davemloft.net>
Cc: Phil Turnbull <phil.turnbull@oracle.com>
Cc: Vegard Nossum <vegard.nossum@oracle.com>
Cc: Willy Tarreau <w@1wt.eu>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Change-Id: Iccb3384e7090e8c7cbcd717c12465c45d22c4393
net: guard tcp_set_keepalive() to tcp sockets

Its possible to use RAW sockets to get a crash in
tcp_set_keepalive() / sk_reset_timer()

Fix is to make sure socket is a SOCK_STREAM one.

Change-Id: Ieeb498a3e623cfcb54e1c865a3c0229e4acf1e87
Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Merge Samsung release N9005XXUFNG2 (Update 9)

SM-N9005_KK_Opensource_Update9.zip

 - Properly merge mdss changes
 - Fix previously durped fs/exfat (during Update 8)
 - After batch merging with 'patch -p1',
   all changes were validated with human eyes to remove
   duplicates(e.g. kernel/futex.c)
   and mismatched functions(e.g. sound/soc/soc-dapm.c)

Change-Id: I923889f048b4a0984e73c1eaec79851f6bda7f78
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
msm: vidc: Don't free OCMEM when there is an open video instance

Currently, vidc enters power collapse after a video has been paused
for 10 seconds; however, the video instance is not closed. Resuming
the video after vidc has entered power collapse causes our vidc
firmware to crash, thus breaking video functionality until the device
is rebooted.

Not freeing OCMEM during power collapse in the middle of an open
video instance works around this issue and is good enough until
the underlying issue has been fixed.

Change-Id: Ieb69e552b860941c43d959dc7bea0c938abbd5bc
Signed-off-by: Sultanxda <sultanxda@gmail.com>
hlte: cypress-touchkey - add keydisabler

Change-Id: Icf1cdf74a20f907f5db7d76db43da0c41612aa7f
msm: vidc: Send resolution along with output buffer

Send the resolution along with output buffer to the client
to avoid a race condition where resolution might be changed
multiple times in driver before client requests for updated
resolution.

Change-Id: I8ebb99e3baa04da09f153195a674babcebcfea78
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
drivers: port bluesleep, msm_serial_hs from android-msm-sprat-3.10-kitkat-wear (experimental)

Change-Id: I7d15cf74e7a4e6ffd6beb8d0aaf598a581872921
Signed-off-by: arter97 <qkrwngud825@gmail.com>
bluesleep: replace androidboot_mode_charger with poweroff_charging

Our kernel source tree uses poweroff_charging instead of androidboot_mode_charger for LPM

Signed-off-by: arter97 <qkrwngud825@gmail.com>
net: core: Support UID-based routing.

This contains the following commits:

1. 0149763 net: core: Add a UID range to fib rules.
2. 1650474 net: core: Use the socket UID in routing lookups.
3. 0b16771 net: ipv4: Add the UID to the route cache.
4. ee058f1 net: core: Add a RTA_UID attribute to routes.
    This is so that userspace can do per-UID route lookups.

Bug: 15413527
Change-Id: I1285474c6734614d3bda6f61d88dfe89a4af7892
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>