Take a lot of maxwen's fixes
ashmem: fix deadlock when system is low on memory

When system is low on memory, allocating memory while holding the
ashmem_mutex may try to directly reclaim memory. Then ashmem_shrink()
is called in same thread. It will deadlock at acquiring ashmem_mutex.
This change lets ashmem_shrink() return failure if ashmem_mutex is not
available. Memory will be reclaimed from others.

Signed-off-by: David Savage <bedalus@gmail.com>

media: video: tegra: Don't overwrite avp outbox

Before writing a new value in avp outbox register ensure the last
value written in it has been read by AVP. If AVP has not yet read
the current value in avp outbox register then wait until it is done

media: video: nvavp: Add bsea/vcp clocks for Audio

1) Enable bsea/vcp clocks for Audio support by ioctl
2) Send kernel event NVE276_OS_INTERRUPT_APP_NOTIFY
to user space
3) Suspend Resume support

Signed-off-by: David Savage <bedalus@gmail.com>

arm: tegra: pcie: Fix Coverity issue

Fixed data type mismatch.
As irq was unsigned int following code was skipped always.

arch: arm: pcie: init TXBA registers

Setting default values in TXBA registers to avoid
unfair arbitration between downstream reads and
completions to upstream reads

Signed-off-by: David Savage <bedalus@gmail.com>

cpu-tegra: add proper transition latency - https://github.com/TripNRaVeR/tripndroid-endeavoru-3.1.10-htc/commit/f2d4998ba4d97b709740c484811625a1437ef936

Signed-off-by: David Savage <bedalus@gmail.com>

ARM: Tegra: Omit L2 flush at disable

In Tegra kernel L2 is disabled only upon CPU cluster power down,
e.g. LP2 entry. Flushing L2 upon every LP2 entry is costly.
Since we are always in single core mode upon cluster power down
we can safely omit L2 flush upon L2 disable.

Signed-off-by: David Savage <bedalus@gmail.com>

arm: tegra: fb: Update fix line_length
Update framebuffer's fix line_length parameter when changing
video mode dynamically.The new line_length should be according
to new x resolution. On addition, check the return value from
dc driver while setting a mode.

asoc: tegra: i2s: Fixes for audio_clock_2x rate

audio_clock_2x parent needs to be set first before
changing the rate, else it will not work.

Signed-off-by: David Savage <bedalus@gmail.com>

video: tegra: host: fix integer overflows

job_size() calculates the size of a job structure based on a struct
passed as a ioctl parameter. This calculation was not checked for
overflow.

Bug 1038551

Change-Id: I13d087dbd5aad5fef1c5d13ceb23e50f565acf95
Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Reviewed-on: http://git-master/r/127185
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Signed-off-by: David Savage <bedalus@gmail.com>

video: tegra: fb: Default stride from HW

This patch adds:

1.  line_stride value is honored in fb_set_par routine
2.  Hardware value for line_stride is used in fb_register

Bug 1025739

Change-Id: Ic37c4c90911c2c70e74b8d5609f3b32b521772ff
Signed-off-by: Christopher Freeman <cfreeman@nvidia.com>
Reviewed-on: http://git-master/r/127690
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Kevin Huang (Eng-SW) <kevinh@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Signed-off-by: David Savage <bedalus@gmail.com>

arm: tegra: pcie: WAR to avoid hang on PCIe device

Setting DFPCI_RSPPASSPW bit in AFI_CONFIGURATION
register to avoid instant hang on CPU read/write
while gpu transfers are in progress.

Bug 1034443

Change-Id: I40c99588753b8b2cb2d418b54c6ac73f7b8ddc13
Signed-off-by: Jay Agarwal <jagarwal@nvidia.com>
Reviewed-on: http://git-master/r/124037
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
Signed-off-by: David Savage <bedalus@gmail.com>

raw_ip_net: update driver to latest revision

Signed-off-by: David Savage <bedalus@gmail.com>

ext4: add missing save_error_info() to ext4_error()

commit f3fc0210c0fc91900766c995f089c39170e68305 upstream.

The ext4_error() function is missing a call to save_error_info().
Since this is the function which marks the file system as containing
an error, this oversight (which was introduced in 2.6.36) is quite
significant, and should be backported to older stable kernels with
high urgency.

Change-Id: Ifd98e9021037dbf5b84152d8853b214248961794
Reported-by: Ken Sumrall <ksumrall@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: ksumrall@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ken Sumrall <ksumrall@android.com>
Signed-off-by: David Savage <bedalus@gmail.com>

tegra_pcm: support audio up to 32bits

Signed-off-by: David Savage <bedalus@gmail.com>