msm: qdsp6v2: Revert some patches to sync with CM11

Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Apr 27 00:22:33 2014 +0530

    Revert "msm: qdsp6v2: memset stack buffer allocation."

    This reverts commit c998b6967eb78d1339f6dd39c417625dbbd0c716.

Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Apr 27 00:19:37 2014 +0530

    Revert "msm: ultrasound: Add a new input device configuration"

    This reverts commit 65410884fe0bbf7d85482b4fa2af75c01db80b0c.

Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Apr 27 00:18:59 2014 +0530

    Revert "msm: ultrasound: Support side buttons"

    This reverts commit eb0b922d10bfcdd0c0e5e768e26cb9066a1060ec.

Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Apr 27 00:18:31 2014 +0530

    Revert "msm: ultrasound: Add Sync Gesture data format"

    This reverts commit 2c374a7a28a7f331f3dcd28bb49ed14229441649.

Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Apr 27 00:18:07 2014 +0530

    Revert "msm: ultrasound: support multiple devices, conflicting with USF"

    This reverts commit cd208210f11f10464d9f8522d3f6c230ca5e440c.

Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Apr 27 00:17:39 2014 +0530

    Revert "msm: ultrasound: add verifications of some input parameters"

    This reverts commit 51c111f5e53f8d1c088060ce511009cbf427bcc1.

Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Apr 27 00:16:45 2014 +0530

    Revert "msm: ultrasound: Add support for general button events"

    This reverts commit ba1a409f1e245ca76aeafa514c2e2fcdf98cfb03.

Author: Pranav Vashi <neobuddy89@gmail.com>
Date:   Sun Apr 27 00:16:13 2014 +0530

    Revert "qdsp6v2: Add support for suspend command for WMA decoder"

    This reverts commit fe2b79871d06ef0040575d01354f63e6e02e31d2.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
fs: exfat: Update to v1.2.8

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
readahead: make context readahead more conservative

This helps performance on moderately dense random reads on SSD.

Transaction-Per-Second numbers provided by Taobao:

		QPS	case
		-------------------------------------------------------
		7536	disable context readahead totally
w/ patch:	7129	slower size rampup and start RA on the 3rd read
		6717	slower size rampup
w/o patch:	5581	unmodified context readahead

Before, readahead will be started whenever reading page N+1 when it happen
to read N recently.  After patch, we'll only start readahead when *three*
random reads happen to access pages N, N+1, N+2.  The probability of this
happening is extremely low for pure random reads, unless they are very
dense, which actually deserves some readahead.

Also start with a smaller readahead window.  The impact to interleaved
sequential reads should be small, because for a long run stream, the the
small readahead window rampup phase is negletable.

The context readahead actually benefits clustered random reads on HDD
whose seek cost is pretty high.  However as SSD is increasingly used for
random read workloads it's better for the context readahead to concentrate
on interleaved sequential reads.

Another SSD rand read test from Miao

        # file size:        2GB
        # read IO amount: 625MB
        sysbench --test=fileio          \
                --max-requests=10000    \
                --num-threads=1         \
                --file-num=1            \
                --file-block-size=64K   \
                --file-test-mode=rndrd  \
                --file-fsync-freq=0     \
                --file-fsync-end=off    run

shows the performance of btrfs grows up from 69MB/s to 121MB/s, ext4 from
104MB/s to 121MB/s.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Tested-by: Tao Ma <tm@tao.ma>
Tested-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
mdss: ppp: Add support for MDP_Y_CBCR_H2V2_VENUS format

Currently support to handle MDP_Y_CBCR_H2V2_VENUS format is
not present in driver. Adding the same.

Signed-off-by: Radhika Ranjan Soni <rrsoni@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: mdss: Fix possible buffer overflow in ppp

Correct the limit check for the buffer format and avoid the
possible buffer overflow.

Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
mdss: ppp: Add support for MDP_BGRX_8888 in mdp3 ppp

Support for MDP_BGRX_8888 is required, so we are adding it in.

Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
mdss: ppp: Fix ppp parse error out sequence

Put was called on fence twice, second time with a NULL pointer,
which was causing a crash.

Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
mdss: ppp: free ppp bw when not in use for some time

For every request ppp was toggling on and off bw and clock.
This behavior was not for ideal bw driver and would also increase
the total time to process ppp request. Now ppp request for bw and
keeps it until there has been no additional requests for over
50ms.

Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
mdss: ppp: Correct ppp bw request

Integer overflow occurred in calculating ib, this value was then
given to bw request resulting in an invalid request.

Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
mdss: ppp: Fix arithmetic error

Width was not calculated properly. This would cause ppp to go
into bad state and hang.

Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
mdss: ppp: Correct bg start address cacluation

Calculation for bg address offset when there is a rotation or flip
has been corrected.

Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
mdss: ppp: Remove unnecessary code from ppp

This code should have never been there in the first place.

Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
mdss: ppp: Increase accuracy of scaling factor calculation in ppp

Due to the scaling factor not being accurate enough the pixel
repetition logic for yuv content did not match the scaling logic.
With a more accurate scaling factor we are avoiding problematic
cases with scaling yuv content.

Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Linux 3.4.83

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
build: Dont initiate SELinux in Permissive mode

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
out: Clean more garbage

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
drivers: staging: Correct typo in debug

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ARM: dts: msm8974: Reduce cpu DMA latency

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
build: Set correct flags

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
rbtree: add postorder iteration functions

Postorder iteration yields all of a node's children prior to yielding the
node itself, and this particular implementation also avoids examining the
leaf links in a node after that node has been yielded.

In what I expect will be its most common usage, postorder iteration allows
the deletion of every node in an rbtree without modifying the rbtree nodes
(no _requirement_ that they be nulled) while avoiding referencing child
nodes after they have been "deleted" (most commonly, freed).

I have only updated zswap to use this functionality at this point, but
numerous bits of code (most notably in the filesystem drivers) use a hand
rolled postorder iteration that NULLs child links as it traverses the
tree.  Each of those instances could be replaced with this common
implementation.

1 & 2 add rbtree postorder iteration functions.
3 adds testing of the iteration to the rbtree runtime tests
4 allows building the rbtree runtime tests as builtins
5 updates zswap.

This patch:

Add postorder iteration functions for rbtree.  These are useful for safely
freeing an entire rbtree without modifying the tree at all.

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Reviewed-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Cc: David Woodhouse <David.Woodhouse@intel.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Michel Lespinasse <walken@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>