msm: vidc: Free memory allocated to keep track of buffer ownership

Memory for free_output_indices and free_input_indices was never freed.
This commit kfrees the memory as part of venc_close().

Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: iommu: Set reserved bits for IOMMU hardware

There are several hardware private bits that are required for
proper operations of IOMMU hardware blocks. Set those bits
appropriately.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ARM: msm: Clean up sensor ADSP driver; OCMEM is no longer used

OCMEM is no longer used, hence, removing OCMEM related code from the
ADSP driver.

Acked-by: Kevin Smith <smithk@qti.qualcomm.com>
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
seq_file: remove "%n" usage from seq_file users

All seq_printf() users are using "%n" for calculating padding size,
convert them to use seq_setwidth() / seq_pad() pair.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Joe Perches <joe@perches.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Dorimanx Note:
Adapt to 3.4.x branch.

This fix:
<4>------------[ cut here ]------------
<4>WARNING: at lib/vsprintf.c:1325 vsnprintf+0x43c/0x448()
<4>Please remove ignored %n in '%n'
<4>Modules linked in: exfat
<4>[<c010d1fc>] (unwind_backtrace) from [<c01959c8>] (warn_slowpath_common+0x60/0x80)
<4>[<c01959c8>] (warn_slowpath_common) from [<c0195a1c>] (warn_slowpath_fmt+0x34/0x4c)
<4>[<c0195a1c>] (warn_slowpath_fmt) from [<c03a555c>] (vsnprintf+0x43c/0x448)
<4>[<c03a555c>] (vsnprintf) from [<c0264090>] (seq_printf+0x44/0x84)
<4>[<c0264090>] (seq_printf) from [<c028fd8c>] (show_map_vma+0x104/0x29c)
<4>[<c028fd8c>] (show_map_vma) from [<c0290268>] (show_smap+0x9c/0x1ac)
<4>[<c0290268>] (show_smap) from [<c0263be8>] (seq_read+0x208/0x4c8)
<4>[<c0263be8>] (seq_read) from [<c0242968>] (vfs_read+0xa8/0x170)
<4>[<c0242968>] (vfs_read) from [<c0242da0>] (sys_read+0x44/0x8c)
<4>[<c0242da0>] (sys_read) from [<c0106900>] (ret_fast_syscall+0x0/0x30)
<4>---[ end trace 07fcae1a8b820aae ]---
intelliactive: rework input register/unregister

Signed-off-by: Paul Reioux <reioux@gmail.com>
Sound Control: expose direct register manipulations to userspace

bump driver version to 3.3

Signed-off-by: Paul Reioux <reioux@gmail.com>
Sound Control: Misc clean up for newer WCD9xxx SOCs

Bump driver version to 3.4

Signed-off-by: Paul Reioux <reioux@gmail.com>
Sound Control: let register lock be dependent on different hw revisions

Signed-off-by: Paul Reioux <reioux@gmail.com>
Sound Control: separate locking mechanism for recording and playback

with newer hardware revisions coming from Qualcomm, single register lock
control isn't sufficient to cover both playback and recording usage scenarios

bump to version 3.5

Signed-off-by: Paul Reioux <reioux@gmail.com>
arch/arm/mach-msm/mpm-of.c: gcc 4.9.x fix up

Signed-off-by: Paul Reioux <reioux@gmail.com>
SOUND CONTROL: set speaker to 1 by default.
Revert "cpufreq: interactive: Simplify frequency calculations"

This reverts commit 13d1c44fbb08fc78931e54b53dfc29d946805b47.
cpufreq: interactive: Support variable frequency calculations

Use a threshold value up to which we are evaluating the current
speed weighted by current load against each new choice of speed.
Above switch to the original frequency calculation proportional to
load relative to the max possible frequency which allows for more
dynamic and fair changes.

Default threshold is cpuinfo min which guarantees minimal freqs
and energy usage during (offloaded) media playback.
Merge remote-tracking branch 'do/LG-STOCK-KK' into LG-STOCK-KK
SOUND CONTROL: Fixed LG LOCK reset by Faux APP. and we loose the tuning.

every time user open faux APP, the lock we set to 0, then kernel or rom
was resetting the speaker and mic gain to min... that is very bad!

Allow control only via STweaks and Faux App for HeadPhones Gain only!

Now all COOL again! :)
SOUND CONTROL: add LG lock to HeadPhones PA, and make cosmetic mod.
msm: perf: Add L2 support for tracecounters

Add L2 counter output to the tracecounters implementation.
This enables collection of L2 PMU counter values upon context switch.
Set up filtering based on number of L2 counters and number of cores.
Read L2 counter values and display them along with L1 counter values.

Change-Id: I8bbbd251ee52c66505d22ccf037c601013a916f0
Signed-off-by: Sheetal Sahasrabudhe <sheetals@codeaurora.org>
msm: krait-l2-accessors: Remove set_get_l2_indirect_reg() API

There are no remaining users of this API, which writes to an indirect
register and reads back the new value. To simplify the future addition
of RTB logging for L2 indirect CP15 accesses, remove the unused API.

set_l2_indirect_reg() and get_l2_indirect_reg() can be individually
called to accomplish the same purpose that set_get_l2_indirect_reg()
served, with a negligible performance difference for common usecases.

Change-Id: If372370eabda7cf5d9eee488222a17e139609a36
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
ASoC: msm: qdsp6v2: Add a new waitqueue state for mem map/unmap

All of the commands being sent to the DSP are using cmd_state flag
which can be overwritten when several commands are sent at the same
time. This results in Memory map command timing out. The change will
separate the memory flag from flags for other commands so that they
do not overwrite each other.

CRs-fixed: 673781
Change-Id: I61e059f402feb2c4e1e3dbed1825990456e78471
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
msm: camera: Add sensor stats type

In HDR mode, sensor sends meta data as stats.
Add sensor stats type used in HDR mode.

Change-Id: I877a34c76ce2c9e2bfa5524133db3e0f281f2024
Signed-off-by: Shuai Yuan <shuaiy@codeaurora.org>