msm_fb: display: Evenly balancing load on MDP ports

Moving RGB1 and RGB2 to AXI port 1. This fixes underrun issues seen
on External display while playing videos. This patch evenly balancing
pipe loads on each port.

CRs-Fixed: 458421

Change-Id: I975f580d36bffb697f466afb63da6dc990e1127e
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Merge "msm_fb: display: Evenly balancing load on MDP ports"
msm: pm2: Restore interrupt subsystem from sleep.

Change-Id: Id5128e47e1e78688d0b608b64454555f26a65043
Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
Signed-off-by: Baji Patthan <bpatth@codeaurora.org>
Merge "msm: pm2: Restore interrupt subsystem from sleep."
msm: kgsl: fix paren placement leading to fence timeout

The incorrect paren placement can lead to a fence timeout
because the last_timestamp is always written. As a result
the last_timestamp could be corrupted by writing an old
value leading to a future timestamp_cmp indicating that a
signaled sync pt was unsignaled.

Change-Id: I4650a467bfdd98a905f86fbec7d833596c67ba19
Signed-off-by: Jeff Boody <jboody@codeaurora.org>
Merge "msm: kgsl: fix paren placement leading to fence timeout"
msm_fb : Modify mixer staging down during OVERLAY_UNSET

Commit the mixer for the base pipe to avoid primary going blank
while video playaback and suspend resume concurrency test.

Change-Id: I08d00b7331d510ca32fcc5fd372c406297738382
Signed-off-by: Neti Ravi Kumar <ravineti@codeaurora.org>

CRs-Fixed: 469494
Signed-off-by: Neti Ravi Kumar <ravineti@codeaurora.org>
Merge "msm_fb : Modify mixer staging down during OVERLAY_UNSET"
msm_fb: display: Avoid MDP clock disable during DMA update

MDP Core clock gets disabled by clock control thread during Idle
screen update with MDDI. But, this thread's action can conflict
with a late frame update call. This change adds safety checks to
avoid this conflict.

Change-Id: Id1d6fd4a66bab91075f285cdbe5fec2406d1fb79
Signed-off-by: lakshmi narayana p <lpatib@codeaurora.org>
Merge "msm_fb: display: Avoid MDP clock disable during DMA update"
USB: ci13xxx_udc: Don't free dTD immediately after active bit is cleared

USB controller may access the dTD one more time after clearing the active
bit in token field.  There is a possibility of software freeing it in this
window.  When this happens, USB controller may access incorrect memory and
leads to system level issues.

dTDs are freed when requests are freed by function drivers during
disconnect or unbind.  The above race condition will come into effect only
for zero length packets.  dTDs are dynamically created for sending zero
length packets on IN endpoints.  These dTDs are immediately freed after
active bit is cleared.  Defer this to next dTD completion.  It is safe to
assume that hardware will no longer access the previous dTD when the next
dTD is completed.

Don't allocate/free setup status phase and GET_STATUS data phase requests
dynamically.  Use  one request for both cases and allocate it during bind.

CRs-Fixed: 474557
Change-Id: I5d41c310e1bb35d93b5af7d90a24ce5aab24f5f9
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Merge "USB: ci13xxx_udc: Don't free dTD immediately after active bit is cleared"
Squashed update of kernel from 3.4.0 to 3.4.42

Signed-off-by: nobodyAtall <tsogkas@ceid.upatras.gr>

Conflicts:
	drivers/base/power/main.c
	include/linux/sched.h
 arm/crypto: Add optimized AES and SHA1 routines

Add assembler versions of AES and SHA1 for ARM platforms.  This has provided
up to a 50% improvement in IPsec/TCP throughout for tunnels using AES128/SHA1.

Platform   CPU SPeed    Endian   Before (bps)   After (bps)   Improvement

IXP425      533 MHz      big     11217042        15566294        ~38%
KS8695      166 MHz     little    3828549         5795373        ~51%

Signed-off-by: David McCullough <ucdevel@gmail.com>
Signed-off-by: nobodyAtall <tsogkas@ceid.upatras.gr>
msm: timer: Don't check state of clock while setting next timer event

The commit fd6681cd4d0782f6e6ac918ab337016f59c2520b introduced
a silent bug that incorrectly checks state of the clock while
setting the next timer event. The bug manifests only during
failure code path of msm idle operation, which is very rare.
Due to the bug, the driver isn't be able to reprogram the timer
device.

CRs-fixed: 468902
Change-Id: I4ec14ea9c3a5d318ef98d2b13bd55efd89538df5
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
Signed-off-by: nobodyAtall <tsogkas@ceid.upatras.gr>
timekeeping: fix 32-bit overflow in get_monotonic_boottime

get_monotonic_boottime adds three nanonsecond values stored
in longs, followed by an s64.  If the long values are all
close to 1e9 the first three additions can overflow and
become negative when added to the s64.  Cast the first
value to s64 so that all additions are 64 bit.

Change-Id: Ic996d8b6fbef0b72f2d027b0d8ef5259b5c1a540
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: nobodyAtall <tsogkas@ceid.upatras.gr>
netfilter: xt_qtaguid: fix ipv6 protocol lookup

When updating the stats for a given uid it would incorrectly assume
IPV4 and pick up the wrong protocol when IPV6.

Change-Id: Iea4a635012b4123bf7aa93809011b7b2040bb3d5
Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: nobodyAtall <tsogkas@ceid.upatras.gr>
netfilter: xt_qtaguid: start tracking iface rx/tx at low level

qtaguid tracks the device stats by monitoring when it goes up and down,
then it gets the dev_stats().
But devs don't correctly report stats (either they don't count headers
symmetrically between rx/tx, or they count internal control messages).

Now qtaguid counts the rx/tx bytes/packets during raw:prerouting and
mangle:postrouting (nat is not available in ipv6).

The results are in
  /proc/net/xt_qtaguid/iface_stat_fmt
which outputs a format line (bash expansion):
  ifname  total_skb_{rx,tx}_{bytes,packets}

Added event counters for pre/post handling.
Added extra ctrl_*() pid/uid debugging.

Change-Id: Id84345d544ad1dd5f63e3842cab229e71d339297
Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: nobodyAtall <tsogkas@ceid.upatras.gr>
ipv4: Check if dev_out is NULL in ip_route_output_slow()

Change-Id: If04a8e99942dbe7e099e736dc87c2a49e1e778f9
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Signed-off-by: nobodyAtall <tsogkas@ceid.upatras.gr>
ipv4: Skip calling fib_detect_death() if fib_dev is NULL

Change-Id: I1b8c6c7e79cb8a05b4b715ddb3299d74edef0e14
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Signed-off-by: nobodyAtall <tsogkas@ceid.upatras.gr>