ASoC: msm: Use 16K sample rate for RFECNS

To enable record with an RFECNS device use a 16K
sample rate.

Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
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>
ASoC: msm: Add routing controls for SW Listen

Certain codecs will not have HW MAD that can be
used for Listen feature. In such cases Listen is
implemented using SW MAD in ADSP. This change will
enable user space to use SW MAD in ADSP.

Signed-off-by: Venkat Sudhir <vsudhir@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>