msm_fb: display: Add pre-multiplied alpha support for MDP4.

MDP4 blend logic differs from GPU blend implementation as MDP4
does not differentiate between pre-multiplied alpha layers and
non pre-multiplied alpha layers. Check layers for pre-multiplied
alpha and change blend logic accordingly.

CRs-Fixed: 355755
CRs-Fixed: 361729
Change-Id: Id8253d3888f1ebbadba1b6bbd87e7d98bac22da7
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
(cherry picked from commit 3d36e64838fbd064ad4868e1a3770e27c183f83e)

Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
USB: gadget: f_audio_source: Fix error handling and increase
 packet size

Fixes watchdog reset on USB disconnect
Larger packet size fixes performance in fullspeed mode

Signed-off-by: Mike Lockwood <lockwood@google.com>
netfilter: xt_IDLETIMER: Rename INTERFACE to LABEL in
 netlink notification.

Signed-off-by: Ashish Sharma <ashishsharma@google.com>
USB: gadget: f_audio_source: Fix use after free in
 audio_unbind

When USB was disconnected, we were freeing our audio_dev struct in audio_unbind
before the audio system had cleaned up, resulting in a hang in audio_pcm_close.
We now statically allocate the audio_dev struct to avoid this problem.

Change-Id: I58ad21eaa20dcf4aa74ee614ef3b6ed2c91d52a1
Signed-off-by: Mike Lockwood <lockwood@google.com>
USB: gadget: f_audio_source: Fix compilation error

Change-Id: I1b785c47bda03208d396473a9d1c94631f5624d9
Signed-off-by: Mike Lockwood <lockwood@google.com>
Revert "ARM: clean up idle handlers"

This reverts commit 24def8ab6c383aacc78f71c91b25b160b88465c6.
ARM: disable preemption in machine_shutdown

Since the smp call to stop the other cpus are handled in those
cpus in interrupt context, there's a potential for those smp
handlers to interrupt threads holding spin locks (such as the
one a mutex holds).  This prevents those threads from ever
releasing their spin lock, so if the cpu doing the shutdown
is allowed to switch to another thread that tries to grab the
same lock/mutex, we could get into a deadlock (the spin lock
call is called with preemption disabled in the mutex lock code).

To avoid that possibility, disable preemption before doing the
smp_send_stop().

Change-Id: I7976c5382d7173fcb3cd14da8cc5083d442b2544
Signed-off-by: Mike J. Chen <mjchen@google.com>
netfilter: xt_qtaguid: report only uid tags to
 non-privileged processes

In the past, a process could only see its own stats (uid-based summary,
and details).
Now we allow any process to see other UIDs uid-based stats, but still
hide the detailed stats.

Change-Id: I7666961ed244ac1d9359c339b048799e5db9facc
Signed-off-by: JP Abgrall <jpa@google.com>
Revert "wakelock: remove sync workqueue"

This reverts commit 3d21613c21c8a9535ae6708cc247c33bd8cca7b4.
Revert "wakelock: (tungstwenty's implementation) plus lots of other"

This reverts commit 7decaf3079cec960c74458844f2cf3ee94e1cc81.
Revert "wakelock: (tungstwenty's implementation) plus lots of other"

This reverts commit 0ae93485b4d14c81d04b45be6c06448a01c4256a.
Revert "ZRAM for ANDROID"

This reverts commit a7775870dfd7faa5b1cb8892b28b4c95c9fc87bb.
Revert "Staging: android: lowmemorykiller.c"

This reverts commit febeb1d728820d5fb9c56e4329d8266a1eaef934.
Revert "staging: android/lowmemorykiller: Do not kill kernel threads"

This reverts commit 3c993d4e34eccf9a146b0791e295118ccfd4fedd.
Revert "staging: android/lowmemorykiller: No need for task->signal"

This reverts commit 3fb9e738b40ba8b773244076d188ea151c25ce7a.
Revert "staging: android/lowmemorykiller: Better mm handling"

This reverts commit 4339e0bf421f96181159e319d6fc5e6d676a3090.
Revert "staging: android/lowmemorykiller: Don't grab tasklist_lock"

This reverts commit 3929f4152224fa16c6b343bbc61b0338771620b9.
drivers: staging: Resync LMK with Google

Change-Id: If338822749261b5f396c5c713a38d88868eccead
vmscan: kswapd carefully call compaction

With CONFIG_COMPACTION enabled, kswapd does not try to free contiguous
free pages, even when it is woken for a higher order request.

This could be bad for eg.  jumbo frame network allocations, which are done
from interrupt context and cannot compact memory themselves.  Higher than
before allocation failure rates in the network receive path have been
observed in kernels with compaction enabled.

Teach kswapd to defragment the memory zones in a node, but only if
required and compaction is not deferred in a zone.

Change-Id: Ia4bb3034bbd209030bda7a6ebaa820091299f08d
[akpm@linux-foundation.org: reduce scope of zones_need_compaction]
Signed-off-by: Rik van Riel <riel@redhat.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
vmscan: only defer compaction for failed order and higher

Currently a failed order-9 (transparent hugepage) compaction can lead to
memory compaction being temporarily disabled for a memory zone.  Even if
we only need compaction for an order 2 allocation, eg.  for jumbo frames
networking.

The fix is relatively straightforward: keep track of the highest order at
which compaction is succeeding, and only defer compaction for orders at
which compaction is failing.

Change-Id: Ibf6cc80a83e22ba4e5e856b51d12b2e4c95b0698
Signed-off-by: Rik van Riel <riel@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>