Commit graph

80294 commits

Author SHA1 Message Date
Gilad Broner
9fbeb1c910 ufs: qcom: add dts property to disable LPM modes
Since msmcobalt RUMI uses QRBTC-V2 UFS PHY, there are a few limitations
that must be applied in order to be able to initialize UFS:
1. UFS should remain in PWM-G1 1-Lane and never change its gear, as other
gears are not stable
2. hibern8 enter/exit should be bypassed
3. we should avoid any power change (as in runtime suspend/resume)

Add "qcom,disable-lpm" property to facilitate disabling of these.

Change-Id: I3f1801da1e2bf1ce8ce98f5ab08211683106ae8c
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
2016-03-23 21:25:44 -07:00
Susheel Khiani
20a5dc1e2f iommu/arm-smmu: Request TZ to change page table format to V8L
For targets where we have slave side protection,
global register programming is handled by TZ. And
since it supports V7S page table format only, by
default TZ programs all context bank to permit
V7S format by programming VA64 bit of CBA2R register
as 0.

But if context bank itself is non secure then its
page tables are managed by HLOS where we can
support V8L page table format. So, provide a way
to request TZ to change page table format to V8L
for non secure context banks.

CRs-Fixed: 959535
Change-Id: I1f4d4b98c4f240a8351f791901abdfa78b829973
Signed-off-by: Susheel Khiani <skhiani@codeaurora.org>
2016-03-23 21:25:38 -07:00
Skylar Chang
5a195b37db cne: Add reference count for Smart Wireless Interface Manager
Add the reference count for Smart Wireless Interface Manager to
know whether there are any process who still has the socket in
question in use or not.
Enable INET DIAG.
Redefine the TCP_FLAG as it gives compiling error when an enum is defined
by a function return.

Change-Id: I1aa9c810fec2e332048c9ef4199ec3f996bc3a75
Signed-off-by: Chinh Tran <chinht@codeaurora.org>
[chiaweic@codeaurora.org: resolve conflicts encountered with port to 4.4]
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2016-03-23 21:25:31 -07:00
Junjie Wu
3eb23fd73c cpufreq: interactive: Use load prediction provided by scheduler
With modification in scheduler, governor now gets predicted
instantaneous demand waiting to run in addition to demand from
previous window for each CPU. Make use of this information since
prediction from scheduler could be more accurate than just looking at
past few windows.

Governor calculates two frequencies during each sampling period: one based
on demand in previous sampling period (f_prev), and the other based on
prediction provided by scheduler (f_pred). Max of both will be selected
as final frequency. Hispeed related logic, including both frequency
selection and delay is ignored when prediction is enabled. If only
f_pred but not f_prev picked policy->max, max_freq_hysteresis period is
not started/extended. This is to reduce power cost of mis-prediction
if it happens.

One use case prediction could dramatically help is when a heavy task
wakes up after sleeping for a long time. With prediction, governor
could ramp up to frequency the task needs much faster than before.

To enable prediction, echo 1 to enable_prediction file in
cpufreq interactive sysfs directory.

Change-Id: I27396785886e43ea01c9000c651c8bd142172273
Suggested-by: Saravana Kannan <skannan@codeaurora.org>
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
2016-03-23 21:25:29 -07:00
Joonwoo Park
d96fdc91d1 sched: fix compile failure with !CONFIG_SCHED_HMP
Fix various compilation failures when CONFIG_SCHED_HMP or
CONFIG_SCHED_INPUT isn't enabled.

Change-Id: I385dd37cfd778919f54f606bc13bebedd2fb5b9e
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2016-03-23 21:25:24 -07:00
Joonwoo Park
16ecb20600 sched: restrict sync wakee placement bias with waker's demand
Biasing sync wakee task towards waker CPU's cluster makes sense when the
waker's demand is high enough so the wakee also can take advantage
of high CPU frequency voted because of waker's load.  Placing sync wakee
on the low demand waker's CPU can lead placement imbalance which can
lead unnecessary migration.

Introduce a new tunable "sched_big_waker_task_load" that defines the big
waker so scheduler avoid wakee on waker's cluster bias when the waker's
load is below the tunable.

CRs-fixed: 971295
Change-Id: I1550ede0a71ac8c9be74a7daabe164c6a269a3fb
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
[joonwoop@codeaurora.org: fixed a minor conflict in
 include/linux/sched/sysctl.h.]
2016-03-23 21:25:23 -07:00
Joonwoo Park
616e04a51c sched: add preference for waker cluster CPU in wakee task placement
If sync wakee task's demand is small it's worth to place the wakee task
on waker's cluster for better performance in the sense that waker and
wakee are corelated so the wakee should take advantage of waker cluster's
frequency which is voted by the waker along with cache locality benefit.
While biasing towards the waker's cluster we want to avoid the waker CPU
as much as possible as placing the wakee on the waker's CPU can make the
waker got preempted and migrated by load balancer.

Introduce a new tunable 'sched_small_wakee_task_load' that differentiates
eligible small wakee task and place the small wakee tasks on the waker's
cluster.

CRs-fixed: 971295
Change-Id: I96897d9a72a6f63dca4986d9219c2058cd5a7916
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
[joonwoop@codeaurora.org: fixed a minor conflict in
 include/linux/sched/sysctl.h.]
2016-03-23 21:25:22 -07:00
Pavankumar Kondeti
6d742ce87b sched: Add separate load tracking histogram to predict loads
Current window based load tracking only saves history for five
windows. A historically heavy task's heavy load will be completely
forgotten after five windows of light load. Even before the five
window expires, a heavy task wakes up on same CPU it used to run won't
trigger any frequency change until end of the window. It would starve
for the entire window. It also adds one "small" load window to
history because it's accumulating load at a low frequency, further
reducing the tracked load for this heavy task.

Ideally, scheduler should be able to identify such tasks and notify
governor to increase frequency immediately after it wakes up.

Add a histogram for each task to track a much longer load history. A
prediction will be made based on runtime of previous or current
window, histogram data and load tracked in recent windows. Prediction
of all tasks that is currently running or runnable on a CPU is
aggregated and reported to CPUFreq governor in sched_get_cpus_busy().

sched_get_cpus_busy() now returns predicted busy time in addition
to previous window busy time and new task busy time, scaled to
the CPU maximum possible frequency.

Tunables:

- /proc/sys/kernel/sched_gov_alert_freq (KHz)

This tunable can be used to further filter the notifications.
Frequency alert notification is sent only when the predicted
load exceeds previous window load by sched_gov_alert_freq converted to
load.

Change-Id: If29098cd2c5499163ceaff18668639db76ee8504
Suggested-by: Saravana Kannan <skannan@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
[joonwoop@codeaurora.org: fixed merge conflicts around __migrate_task()
 and removed changes for CONFIG_SCHED_QHMP.]
2016-03-23 21:25:17 -07:00
Junjie Wu
efa673322f sched: Provide a wake up API without sending freq notifications
Each time a task wakes up, scheduler evaluates its load and notifies
governor if the resulting frequency of destination CPU is larger than
a threshold. However, some governor wakes up a separate task that
handles frequency change, which again calls wake_up_process().

This is dangerous because if the task being woken up meets the
threshold and ends up being moved around, there is a potential for
endless recursive notifications.

Introduce a new API for waking up a task without triggering
frequency notification.

Change-Id: I24261af81b7dc410c7fb01eaa90920b8d66fbd2a
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
2016-03-23 21:25:17 -07:00
Pavankumar Kondeti
6418f213ab sched: Revise the inter cluster load balance restrictions
The frequency based inter cluster load balance restrictions are not
reliable as frequency does not provide a good estimate of the CPU's
current load. Replace them with the spill_load and spill_nr_run
based checks.

The higher capacity cluster is restricted from pulling the tasks from
the lower capacity cluster unless all of the lower capacity CPUs are
above spill. This behavior can be controlled by a sysctl tunable and
it is disabled by default (i.e. no load balance restrictions).

Change-Id: I45c09c8adcb61a8a7d4e08beadf2f97f1805fb42
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
[joonwoop@codeaurora.org: fixed merge conflicts due to omitted changes
 for CONFIG_SCHED_QHMP.]
2016-03-23 21:25:13 -07:00
Srivatsa Vaddagiri
3004236139 sched: colocate related threads
Provide userspace interface for tasks to be grouped together as
"related" threads. For example, all threads involved in updating
display buffer could be tagged as related.

Scheduler will attempt to provide special treatment for group of
related threads such as:

1) Colocation of related threads in same "preferred" cluster
2) Aggregation of demand towards determination of cluster frequency

This patch extends scheduler to provide best-effort colocation support
for a group of related threads.

Change-Id: Ic2cd769faf5da4d03a8f3cb0ada6224d0101a5f5
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
[joonwoop@codeaurora.org: fixed minor merge conflicts.  removed ifdefry
 for CONFIG_SCHED_QHMP.]
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>

Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2016-03-23 21:25:12 -07:00
Srivatsa Vaddagiri
df6bfcaf70 sched: Update fair and rt placement logic to use scheduler clusters
Make use of clusters in the fair and rt scheduling classes. This is
needed as the freq domain mask can no longer be used to do correct
task placement. The freq domain mask was being used to demarcate
clusters.

Change-Id: I57f74147c7006f22d6760256926c10fd0bf50cbd
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
[joonwoop@codeaurora.org: fixed merge conflicts due to omitted changes
 for CONFIG_SCHED_QHMP.]
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2016-03-23 21:25:11 -07:00
Srivatsa Vaddagiri
cb1bb6a8f4 sched: Introduce the concept CPU clusters in the scheduler
A cluster is set of CPUs sharing some power controls and an L2 cache.
This patch buids a list of clusters at bootup which are sorted by
their max_power_cost. Many cluster-shared attributes like cur_freq,
max_freq etc are needlessly maintained in per-cpu 'struct rq' currently.
Consolidate them in a cluster structure.

Change-Id: I0567672ad5fb67d211d9336181ceb53b9f6023af
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
[joonwoop@codeaurora.org: fixed minor conflict in
 arch/arm64/kernel/topology.c. fixed conflict due to ommited changes for
 CONFIG_SCHED_QHMP.]
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
2016-03-23 21:25:10 -07:00
Skylar Chang
f36ae7405a msm: ipa: snapshot of IPA changes
This snapshot is taken as of msm-3.18 commit
d5809484b (Merge "msm: ipa: fix race condition
when teardown pipe" )

Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2016-03-23 21:25:09 -07:00
Vinod Koul
cb9c0e72ea ALSA: compress: update struct snd_codec_desc for sample rate
Now that we don't use SNDRV_PCM_RATE_xxx bit fields for sample rate, we need to
change the description to an array for describing the sample rates supported by
the sink/source

Change-Id: I2dc6b4e48cccbc7a3da7207be42cf11502373572
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Git-commit: b8bab04829
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: vivek mehta <mvivek@codeaurora.org>
[fred@codeaurora.org: resolved context conflict in struct snd_codec_desc]
[fred@codeaurora.org: added msm-compress-q6-v2.c to resolve compilation error]
Signed-off-by: Fred Oh <fred@codeaurora.org>
2016-03-23 21:25:00 -07:00
Tony Truong
f2c54bd2fd mhi: core: Set correct DMA mask on device
Set the correct DMA mask on the platform device to
avoid bounce buffering from the default 32 bit mask.

Change-Id: I7e201e83fd21b0f0a6f57754a3b6f3eded9be58f
Signed-off-by: Andrei Danaila <adanaila@codeaurora.org>
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-23 21:24:53 -07:00
Tony Truong
a603bd09f9 mhi: Use standard kernel return codes
Replace the MHI defined enum for return codes with
kernel standard return codes. This greatly improves readability
and parsing of errors by userspace clients.

Change-Id: Ica47f8c3a149f23243b5fb6a4aabcdc0a36b1535
Signed-off-by: Andrei Danaila <adanaila@codeaurora.org>
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-23 21:24:52 -07:00
Tony Truong
b755b7ceb4 mhi: core: Enable SBL logging channels
Enable SBL logging channels.

Change-Id: I156bc89ca1be0ed966eeb1b2e38b8bfd7bf44de4
Signed-off-by: Andrei Danaila <adanaila@codeaurora.org>
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-23 21:24:47 -07:00
Andrei Danaila
f688e16bf5 mhi: core: Enable queueing of virtual buffers
Enable clients to queue virtual buffers, thus leaving
all the DMA operations to MHI.

Change-Id: I824d2f387b1a21d322ca0628963995824227bd76
Signed-off-by: Andrei Danaila <adanaila@codeaurora.org>
2016-03-23 21:24:41 -07:00
Junjie Wu
0ea6cc5218 tracing: power: Add trace events for core control
Add trace events for core control module.

Change-Id: I36da5381709f81ef1ba82025cd9cf8610edef3fc
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
2016-03-23 21:24:30 -07:00
Jordan Crouse
881d8ec58a sync: oneshot_sync: Add oneshot_sync driver
Add the oneshot_sync driver as of msm-3.18 commit
7892968f (sync: oneshot_sync: Update oneshot_sync for new sync APIs).

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2016-03-23 21:24:25 -07:00
Gilad Broner
c3b854ad6c dm: add snapshot of dm-req-crypt
This snapshot is taken as of msm-3.18 commit:
5684450d70 ("Promotion of kernel.lnx.3.18-151201").
dm-req-crypt is necessary for full disk encryption.

Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
2016-03-23 21:24:15 -07:00
Gilad Broner
ce93b221ca crypto: msm: add inline crypto engine (ICE) driver snapshot
This snapshot is taken as of msm-3.18 commit e70ad0c ("Promotion of kernel.lnx.3.18-151201")

Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
2016-03-23 21:24:13 -07:00
Andrey Markovytch
b61ac21fb0 mm + fs: extends support for cache dropping
Exposes drop_pagecache_sb (required by eCryptfs cache wiping)
Adds truncate_inode_pages_fill_zero (required by eCryptfs cache wiping),
which not only truncates pages but also fills them with 0, so that the
cached data can no longer be retrieved.

Change-Id: Icfc18a2c8cdc922e71ee17add6459a1355e77ba6
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
[gbroner@codeaurora.org: fix merge conflict]
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
2016-03-23 21:24:12 -07:00
Andrey Markovytch
8928f8683b PFK: fixed issue where key in TZ was not set properly
When key is set in ICE via TZ, HLOS should send two parts, SALT and
the KEY itself according to AES standards. KEY was used for both parts.

Change-Id: I453dea289b01bdf49352d5209255966052f5dc1b
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
2016-03-23 21:24:07 -07:00
Andrey Markovytch
584531e72e PFK: new module to work with ecryptfs
PFK is a new module that accompanies eCryptfs and
enables it to utilize ICE hw encryption engine. Module
is responsible for storing encryption/decryption keys
inside eCryptfs inodes for each file and loading them
to ICE

Change-Id: I6e755ca657164919147fe0d9482477e14a4be5eb
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
[gbroner@codeaurora.org: fix merge conflicts, adapted LSM hooks
and added missing qseecom headers to fix compilation]
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
2016-03-23 21:24:06 -07:00
Andrey Markovytch
5eebf86343 ecryptfs: enhancing ecryptfs to be configurable with encryption type
enabled eCryptfs for qcom targets. In addition to the usual
options, a special mode 'aes-xts' was added for qcom ICE hw
encryption

Change-Id: I20c01adc46c977b4a5db0be9ff93384cda14bc56
Signed-off-by: Lina Zarivach <linaz@codeaurora.org>
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
[gbroner@codeaurora.org: fix merge conflict]
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
2016-03-23 21:24:05 -07:00
Andrey Markovytch
ecc052ba4e platform: msm: add Per-File-Tagger (PFT) driver
Integrated from msm-3.14. Additional fixes were made to compile with the
new kernel and various new warnings and checkpatch issues were fixed

Change-Id: I073db1041e41eac9066e37ee099f1da9e4eed6c0
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
[gbroner@codeaurora.org: fixed merge conflict and adapted the LSM
security hooks]
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
2016-03-23 21:24:03 -07:00
Mohan Pallaka
4377fa96aa input: gen_vkeys: squash commit from 3.14-kernel
Squash and apply the following changes taken from the msm-3.14
kernel branch as of msm-3.14
commit 8139d0b4e7a6d ("ARM: dts: msm: Set flag to manage clks")

commit c24a3df92a457643cc0821eb9e8f392ae5a907ee
Author: Amy Maloche <amaloche@codeaurora.org>
Date:   Thu May 9 10:23:41 2013 -0700

    input: gen_vkeys: Make y_offset an optional property

    Not all targets will need the y coordinate shifted to
    function properly, so set this value as default 0.

    Change-Id: I1816433c3601fe099ffb8ee275637e573990e432
    Signed-off-by: Amy Maloche <amaloche@codeaurora.org>

 Documentation/devicetree/bindings/input/gen_vkeys.txt
 drivers/input/touchscreen/gen_vkeys.c
 2 files changed, 13 insertions(+), 5 deletions(-)
commit bb2ac18f8fab38fa12d8a7d8b7ee80d9c0049329
Author: Amy Maloche <amaloche@codeaurora.org>
Date:   Wed Apr 17 12:15:56 2013 -0700

    vkeys: gen_vkeys: Add key position offset

    Add virtual key position offset to match virtual key
	positions with front panel.

    Change-Id: Ibbf89e816d9654f202b75470df0c673aa42439c8
    Acked-by: Chun Zhang <chunz@qti.qualcomm.com>
    Signed-off-by: Amy Maloche <amaloche@codeaurora.org>

 Documentation/devicetree/bindings/input/gen_vkeys.txt
 drivers/input/touchscreen/gen_vkeys.c
 include/linux/input/gen_vkeys.h
 3 files changed, 10 insertions(+), 2 deletions(-)
commit 1a6d213cf5a3e40d8b39507e2b010dc81de63630
Author: Mohan Pallaka <mpallaka@codeaurora.org>
Date:   Wed Aug 8 11:25:52 2012 +0530

    input: Add support for virtual key generation

    Virtual keys are used for navigation on Android.
    These are not specific to the controller used
    in the target but are specific to the target.
    Add a module to generate virtual keys independently
    of the controller.

    Change-Id: I0c86dc77f1bc53c283e990be419c2715edf4e1c0
    Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
    Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
    [stepanm@codeaurora.org: resolve Kconfig conflicts]
    Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>

 .../devicetree/bindings/input/gen_vkeys.txt
 drivers/input/touchscreen/Kconfig
 drivers/input/touchscreen/Makefile
 drivers/input/touchscreen/gen_vkeys.c
 include/linux/input/gen_vkeys.h
 5 files changed, 278 insertions(+)

Change-Id: Ie0e14d201a42632af57ff23dc85cec8881125e5a
Signed-off-by: Alex Sarraf <asarraf@codeaurora.org>
2016-03-23 21:23:54 -07:00
Alex Sarraf
9ba5d5b815 input: gpio-keys: add definition for input device name
Add a macro definition for the input device name.

Change-Id: I084e073186765228c48b6dec9ea05d7085350617
Signed-off-by: Alex Sarraf <asarraf@codeaurora.org>
2016-03-23 21:23:51 -07:00
Mohit Aggarwal
4b81b05c57 rtc: alarm: Change wake-up source
Currently, RTC_ALARM is used to wake-up target from
suspend state and is also used for power-off alarm
feature. This patch uses qtimer to wake-up from
suspend state.

Change-Id: Ia42cfecd573309be2f03c18b4f1c321be8202d7d
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
2016-03-23 21:23:46 -07:00
Satya Durga Srinivasu Prabhala
36ea398cfb qcom: perf: probe number of events in kryo CPU PMU init
CPU PMU events needs to be probed and returned per new design in
kernel 4.4.

Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2016-03-23 21:23:40 -07:00
Danny Segal
060b80f220 usb: gadget: Add support for DMA mapping optimization of request buffers
In order to improve performance, this patch enabled mapping of USB request
buffers in advance, before queueing them to the HW. This can be used when
there is a pool or pre-mapped request buffers so we don't need to map it
again every time the request gets queued.

Change-Id: Ic3a6db749343ef1345e0816210517755aee055b3
Signed-off-by: Danny Segal <dsegal@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-03-23 21:23:36 -07:00
Mayank Rana
c6246e5ef9 msm_hsusb: Allow USB BAM driver to compile if CI is not enable
USB BAM driver is accessing some of APIs which are specific to
CI controller. Hence add definitions of those APIs as No-ops
when CI is not enable to compile USB BAM driver.

Change-Id: Id121f042023f4a176936c8b575613244ec46de7f
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-03-23 21:23:34 -07:00
Mayank Rana
7d9fa0899e usb: gadget: qdss: Modify to support configfs usage
- This change adds configfs usage with USB QDSS driver.
- It removes all different supported control and data transports
and assume BAM2BAM as default mode.
- It also removes supported DPL functionality from this driver.

Change-Id: I9678c9e9a397445f36272616e517bbb83a59e88a
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-03-23 21:23:33 -07:00
Mayank Rana
395af08172 USB: gadget: QDSS: Add snapshot of USB QDSS Function driver
This change adds USB QDSS function driver which is used for
USB QDSS functionality. This snapshot is taken as of msm-3.18
kernel commit d5809484bb1b.

Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-03-23 21:23:32 -07:00
Mayank Rana
f6e4c0aed1 platform: msm: Add snapshot of USB BAM driver
Add USB BAM driver used which allows USB BAM to communicate with other
other peripherals (e.g QDSS or IPA) BAM.

This snapshot is taken as of msm-3.18 commit d5809484bb1b.

Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-03-23 21:23:31 -07:00
Venkata Narendra Kumar Gutta
8e51c8ce31 ASoC: msm: Add support for HW MAD bypass feature for listen
HW MAD bypass feature is to facilitate input to CPE by avoiding
MAD in codec. This is done by routing DEC1 data to CPE. Add the
required changes to support this feature.

CRs-fixed: 938514
Change-Id: I7788b1475cd22bdea291bcae47f048131b220ce3
Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>
2016-03-23 21:23:30 -07:00
Lakshmi Narayana Kalavala
e29112a1f7 msm: camera: Update camera drivers
Add changes to update camera drivers to:

1. Update necessary Kconfig files to support camera driver
compilation.
2. Support minor changes to V4L framework.
3. Export uapi headers to header_install export location.

Signed-off-by: Seemanta Dutta <seemanta@codeaurora.org>
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2016-03-23 21:22:47 -07:00
Jing Zhou
a69176361c msm: camera: isp: Remove buffer queue shared list
Remove the shared list of buffer queue that is used in case of
dual vfe. Whenever a buffer is dequeued from the buffer queue
program it on both vfe and ensure that buffer is dequeued only
once by compositing the buf done irq.
Also, program scratch buffer for stats stream

Change-Id: I96cd0a97b24bf6bc0223cbee8d1fc6bf2ecc7c49
Signed-off-by: Harsh Shah <harshs@codeaurora.org>
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Jing Zhou <jzhou70@codeaurora.org>
2016-03-23 21:22:45 -07:00
Jing Zhou
cc999c3a99 msm: camera: isp: Debug double add state check
Add changes to track buffer being added to list. Add error
messages if buffer is found to be added twice. Add state checking
in the isp driver.

Change-Id: I1504e8984db3578009b8944719bbd559ad57d63d
Signed-off-by: Harsh Shah <harshs@codeaurora.org>
Signed-off-by: Jing Zhou <jzhou70@codeaurora.org>
2016-03-23 21:22:40 -07:00
Seemanta Dutta
0288b6f43b Revert "msm: camera: Update camera drivers"
This reverts commit 282882c50fe26957c00bd598e8cab75d00251e2e.

Signed-off-by: Seemanta Dutta <seemanta@codeaurora.org>
2016-03-23 21:22:39 -07:00
Arun Menon
c9647fc5cf msm: vidc: Add Video driver for MSM targets
Add snapshot for Video driver source for MSM targets. The code is
migrated from msm-3.18 kernel at the below commit level -
d5809484bb1bf5864dad2f081b0145224762963a.

Signed-off-by: Arun Menon <avmenon@codeaurora.org>
2016-03-23 21:22:38 -07:00
Vijay Ganti
5151ee897d soc: qcom: msm_perf: Detect and notify when peak perf Cluster load is seen
Detect Perf cluster peak loads near FMAX based on the trigger
thresholds set. On meeting the peak load criteria, the userspace
is notified to take action by applying parameters to enhance performance.

CRs-Fixed: 969499
Change-Id: Ie9687bf1aa832434dc61d20056f91a096d7be4f0
Signed-off-by: Vijay Ganti <viganti@codeaurora.org>
2016-03-23 21:22:34 -07:00
Tapas Kumar Kundu
c022987819 soc: qcom: msm_perf: Add support for enter/exit cycle for io detection
Add support for enter/exit cycle sysfs nodes for io detection

There are some usecases which may benefit from different enter/exit
cycle load criteria for IO load. This change adds support for
that.

Change-Id: Iff135ed11b92becc374ace4578e0efc212d2b731
Signed-off-by: Tapas Kumar Kundu <tkundu@codeaurora.org>
2016-03-23 21:22:30 -07:00
Tapas Kumar Kundu
9ccb569bd7 soc: qcom: msm_perf: Add support for multi_cycle entry/exit nodes
Add support for multi_enter_cycles/multi_exit_cycles per cluster

There are some usecases which may benefit from different enter/exit
cycle load criteria for multimode cpu load. This change adds support for
that.

Change-Id: I3408405307ca03b9bba3f03e216ef59b98f29832
Signed-off-by: Tapas Kumar Kundu <tkundu@codeaurora.org>
2016-03-23 21:22:29 -07:00
Tapas Kumar Kundu
e85e0f6452 soc: qcom: msm_perf: Add timers to exit SINGLE mode
Certain governors may stop sending out notifications once CPUs enter
idle at min frequency.If governor's notifications stop then single mode
will not exit for long time. It can happen only if the exit conditions are
set in such a way that the time taken to exit single mode exceeds the time
for the governor to ramp down, idle out and hence stop sending
notifications leaving the system in single mode indefinitely.

This change adds separate enter/exit cycle sysfs nodes along with a per
cluster non-deferrable timer for single mode exit. The timer is armed only
when the load starts falling below the exit load threshold and is
cancelled when either the load starts going up or SINGLE mode is exited
due to exceeding exit cycle count. On expiry the timer resets SINGLE mode
and the enter/exit cycle counts.

Change-Id: I13552b2f4085c435b917833a2993f8c64ff4ed2f
Signed-off-by: Tapas Kumar Kundu <tkundu@codeaurora.org>
2016-03-23 21:22:28 -07:00
Rohit Gupta
ad20b57ffb soc: qcom: msm_perf: Detect & notify userspace about heavy CPU loads
Detect single and multi threaded heavy workloads based on loads
received from interactive governor.
- If the max load across all the CPUs is greater than a
  user-specified threshold for certain number of governor windows
  then the load is detected as a single-threaded workload.
- If the total load across all the CPUs is greater than a
  user-specified threshold for certain number of governor windows
  then the load is detected as a multi-threaded workload.
If one of these is detected then a notification is sent to the
userspace so that an entity can read the nodes exposed to get an
idea of the nature of workload running.

Change-Id: Iba75d26fb3981886b3a8460d5f8999a632bbb73a
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
2016-03-23 21:22:27 -07:00
Rohit Gupta
d1e73b2919 soc: qcom: msm_perf: Add detection for heavy IO workloads
Some workloads spend a lot of time in IO activity and need higher
performance from system resources (for eg. CPU/DDR frequencies)to
complete with decent performance. Unfortunately cpufreq governors and
other system resources crucial for IO are tuned for general usecases
and hence might be slower to react to such demanding IO workloads.

This patch adds functionality to detect IO workloads and then send
hints to userspace of the detected activity so that userspace can
take necessary tuning action to prepare the system for such activity.
IO activity is tracked every interactive governor timer boundary and
if the percentage of iowait time in each cycle exceeds certain
threshold continuously for certain number of cycles then heavy IO
activity is detected.

Change-Id: I73859517cb436e50340ef14739183e61fc62f90f
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
2016-03-23 21:22:26 -07:00
Rohit Gupta
c4d4ef627d soc: qcom: Add a msm_performance module
Sometimes for power saving reasons we might want to keep fewer CPUs
online without adversely affecting performance for certain real world
usecases. This module helps to provide that hotplug support to the
userspace such that it tries to make a best effort in keeping a certain
number of CPUs online as specified by the userspace.
It allows any userspace entity to specify the CPUs that it wants to
manage with this module and of those, the number of CPUs that should be
kept online.

Change-Id: I82c6d6e998d3740ad6f8c67b47344ce87f328b8b
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
2016-03-23 21:22:18 -07:00