Commit graph

577627 commits

Author SHA1 Message Date
Linux Build Service Account
8e9e0fd780 Merge "Merge remote-tracking branch 'msm4.4/tmp-da9a92f' into msm-4.4" 2016-11-04 22:22:00 -07:00
Hareesh Gundu
71963395a5 msm: kgsl: Fix potential device NULL pointer dereferences
Ensure that device pointer isn't NULL before using it in
kgsl_snapshot_save_frozen_objs().

Change-Id: I676dfa5567b1d09427e3e7691045fabc71b53d43
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
2016-11-04 21:46:22 -07:00
Karthikeyan Periasamy
0e5ae23063 Revert "defconfig: msm64: msm: Compile vidc driver as LKM"
Video kernel modules as LKM make the T32 debugging difficult.
So, We revert the change and make video drivers as part of boot image.

CRs-Fixed: 1086328
Change-Id: Icd8aa9f935eb0096d1e13934ea556c74d7341093
Signed-off-by: Karthikeyan Periasamy <kperiasa@codeaurora.org>
2016-11-04 18:29:05 -07:00
Zhen Kong
420d51e073 qseecom: remove entry from qseecom_registered_app_list
In an error handling case, the QSEECOM_IOCTL_LOAD_APP_REQ ioctl
freed the entry for new TA, but didn't removed it from
qseecom_registered_app_list. Make change to remove it.

Change-Id: Id681fbf3c923027d3db875d506cbe3f971919a8d
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2016-11-04 17:45:05 -07:00
Joonwoo Park
dfb9634d03 sched: prevent race between disable window statistics and task grouping
Change of colocation group requires to finish CPU busy time accounting
prior to its operation by calling update_task_ravg().  However when
window statistics accounting is disabled, update_task_ravg() acts as
nop and results in incorrect CPU time accounting.

Disallow colocation group change while window statistics accounting is
disabled in order to prevent race between reset_all_window_stats() and
colocation grouping functions.

Change-Id: I6dfa20b8d8b0ae7ccc94119bf9cf14c5e11a1cf7
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2016-11-04 17:25:30 -07:00
Venkat Gopalakrishnan
359e6bb764 ARM: dts: msm: update bus bandwidth vote for msmcobalt ufs
The bandwidth vote determines the bus throughput needed for a
given running UFS gear frequency. For high throughput use cases
the current interface speed based votes may not be sufficient to
achieve peak user level throughput, as it doesn't count for other
system level latencies in the data path. Hence vote higher but
making sure the system stays in nominal voltage corner.

Change-Id: I95cda7e33288df7099826b37c2f436c5a33792e8
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-11-04 15:13:10 -07:00
Siena Richard
633c754750 ASoC: wcd9xxx: clean up bootup errors
Fix errors shown during bootup to ensure robustness and enable
cleaner bootup process.

Change-Id: Ic6671aede0742f46e8573340a497e9f19773e5d8
CRs-fixed: 1073250
Signed-off-by: Siena Richard <sienar@codeaurora.org>
2016-11-04 13:58:31 -07:00
Siena Richard
94c9d333eb ASoC: Change info logs to debug
Change ASoC info logs to debug to reduce excessive logging during
bootup.

Change-Id: I142b35901e8ba7724d3ba74ae8c58be3bc8dc44a
CRs-fixed: 1073250
Signed-off-by: Siena Richard <sienar@codeaurora.org>
2016-11-04 13:40:34 -07:00
Skylar Chang
388eea86fe msm: ipa: fix division by 0 for DMA pipes
For DMA pipes, bufer size is 0. This commit fixes a
division by 0 in kernel when connecting DMA pipes.

Change-Id: I11551594e5115e71aa116cc7238953205a4118c3
CRs-Fixed: 1085266
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2016-11-04 13:27:42 -07:00
Phani Kumar Uppalapati
492e06c8a0 ASoC: wcd934x: Change SIDO reference to internal
Add support to change SIDO reference to internal mode
during rock bottom sleep mode.

CRs-Fixed: 1080507
Change-Id: I8d70ad663f3476e1c81cc2126b1229a3c7c80265
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-11-04 12:42:19 -07:00
Oleg Perelet
691ddba4ee msm: kgsl: Enable limits management on A540v2
Add limits management to A540v2 GPU feature set.

CRs-Fixed: 1075694
Change-Id: Ib2680fb97fed1d297c9a96c95edb08dea620495b
Signed-off-by: Oleg Perelet <operelet@codeaurora.org>
2016-11-04 09:53:49 -07:00
Sriharsha Allenki
5875dc5e26 ARM: dts: msm: Add ADC nodes for pmfalcon
Clients of VADC_HC and BTM include reading voltage phone
power, system thermistors for thermal mitigation such as
msm_therm, case_therm, XO therm. Round robin ADC (RRADC)
provides clients ability to read supported channels from
PMfalcon RRADC such as battery ID, battery thermistors,
DCIN and USBIN voltage and current. Add the supported VADC,
BTM and RR ADC channels for the msmfalcon platforms.

Change-Id: I1b8bf9762642e0af73d7ac7fa51c974b93fd4b31
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
2016-11-04 13:00:34 +05:30
Walter Yang
e69b06911e ASoC: add 352800Hz into the pcm known rates
Add 352800Hz into pcm known rates to match with the sound
sample rate macro definitions.

CRs-Fixed: 1082850
Change-Id: Iedd78288f71ddcaa9fcb2f63bd3b73be2c0006dd
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
2016-11-03 23:28:30 -07:00
AnilKumar Chimata
45da966c60 qcedev: Validate Source and Destination addresses
Source and Destination addresses passed by user space apps/clients
are validated independent of type of operation to mitigate kernel
address space exploitation.

Change-Id: I9ecb0103d7a73eedb2e0d1db1d5613b18dd77e59
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
2016-11-04 11:35:15 +05:30
Vamsi Krishna Samavedam
8c928763dd ARM: dts: msm: Disable clock gating on msmcobalt
Disable clock gating to avoid ISOC packet drop during Super Speed
U1/U2 mode.

CRs-Fixed: 1085388
Change-Id: I11caee63b7d99f1a2c7f563cb5e1478c9e8ac90a
Signed-off-by: Vamsi Krishna Samavedam <vskrishn@codeaurora.org>
2016-11-03 22:44:47 -07:00
Sarada Prasanna Garnayak
ed05352f5c ARM: dts: msm: update ICNSS DT node for msmcobalt interposer
The msmcobalt interposer target has interposed with pm_falcon pmic.
Remove the pm_cobalt regulator handler reference, clock and smmu
memory address and offset from the ICNSS DT node. Allow ICNSS DT
node compilation for msmcobalt interposer target.

CRs-Fixed: 1085547
Change-Id: I4aa1b9876bf1afd9b895d89dc5c4323ba3a3f661
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
2016-11-03 22:39:36 -07:00
Fenglin Wu
cd6a5983ba gpio: qpnp-pin: Fix reading the GPIO mode for GPIO_LV_MV subtype
GPIO_LV_MV subtype has different MODE_SEL mask with other existing
subtypes. Correct the MODE_SEL mask in qpnp_pin_get() function to
make sure it could get the correct status for LV_MV subtype GPIOs.

CRs-Fixed: 1081831
Change-Id: Ibeb5d34412d4333f9c7f21d2fc7df1d3b1d4e72e
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2016-11-04 13:26:18 +08:00
Trishansh Bhardwaj
377d77ee1f msm: camera: Change %p into %pK
Prevents kernel info leak by changing %p into %pK

CRs-Fixed: 1052835
Change-Id: Iad411dbba05326aa2bce82aff5e8140fd0a31a08
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2016-11-03 22:09:52 -07:00
Hemant Kumar
f054b81fba sound: usb: Add support to handle QMI client disconnect
In case of remote QMI client restart, QMI client disconnect
is notified to qmi server. Handle this notification by going
over all the active usb audio devices and issue set alt 0
on corresponding active interfaces of device. After this
perform usb audio device clean up to unmap iova.

Change-Id: Ie89b06d821c1f968ecc30333654bc3a1466f74e3
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-11-03 16:54:19 -07:00
Hemant Kumar
2a1d099062 usb: xhci: Clear event handler busy flag upon event ring cleanup
There is a possibility of unacknowledged pending interrupt at the time
of secondary event ring cleanup. As a result xHC does not generate any
interrupt further because event handler busy flag is set. Hence disable
interrupter to prevent any further interrupt, acknowledge any pending
interrupt and clear event handler busy flag. This allows xHC to generate
interrupt after setting up new event ring.

Change-Id: I1b1791eacbf7afffd101d56d0ae06fe237b8c076
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-11-03 16:53:45 -07:00
Arve Hjønnevåg
c4a0b63b57 ANDROID: binder: Add strong ref checks
Prevent using a binder_ref with only weak references where a strong
reference is required.

BUG: 30445380

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Git-repo: https://android.googlesource.com/kernel/msm.git
Git-commit: 5e2a2bc89956ae1c739854403408059144b23c28
Signed-off-by: Ravi Kumar Siddojigari <rsiddoji@codeaurora.org>
Change-Id: I66c15b066808f28bd27bfe50fd0e03ff45a09fca
Signed-off-by: Ravi Kumar Siddojigari <rsiddoji@codeaurora.org>
2016-11-03 16:18:35 -07:00
David Dai
d71222ae41 msm: msm_bus: limit max chars read by sscanf
Current bus_floor_vote_store_api does not limit/check
the size of the string in input, allowing stack overflow.
Specify the max number of characters read allowable to
the size of destination buffer.

CRs-Fixed: 1050455
Change-Id: Idd409e3e38cfb01b28fa24543112d6bb206314ff
Signed-off-by: David Dai <daidavid1@codeaurora.org>
2016-11-03 15:01:17 -07:00
Vidyakumar Athota
a8a95cafb3 ASoC: msmcobalt: Update ignore suspend for MAD_CPE out widgets
Ignore suspend flag is not set for "MAD_CPE" out widgets, causing
device not to go into suspend state during voice activation. Set
ignore suspend flag to allow suspend during SVA use case.

Change-Id: I18b7cb311e793c820da10990c47f472f7a0d0944
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2016-11-03 14:25:31 -07:00
Banajit Goswami
cc89541383 ASoC: msm: q6dspv2: wake up tasks when ADSP goes down
When ADSP goes down, all tasks waiting for response from
ADSP should be woken up, so that the upper layers can
proceed with the clean up. Change adds code to wake up
tasks, waiting for response from ADSP for memory related
commands, when ADSP sub-system notifier reaches ASM driver.

CRs-Fixed: 1085631
Change-Id: I0eed467aec676dd6eba71bf08aa4a45ada90133b
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-11-03 12:13:06 -07:00
Daniel Bristot de Oliveira
916622c7d5 cgroup: Disable IRQs while holding css_set_lock
While testing the deadline scheduler + cgroup setup I hit this
warning.

[  132.612935] ------------[ cut here ]------------
[  132.612951] WARNING: CPU: 5 PID: 0 at kernel/softirq.c:150 __local_bh_enable_ip+0x6b/0x80
[  132.612952] Modules linked in: (a ton of modules...)
[  132.612981] CPU: 5 PID: 0 Comm: swapper/5 Not tainted 4.7.0-rc2 #2
[  132.612981] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.8.2-20150714_191134- 04/01/2014
[  132.612982]  0000000000000086 45c8bb5effdd088b ffff88013fd43da0 ffffffff813d229e
[  132.612984]  0000000000000000 0000000000000000 ffff88013fd43de0 ffffffff810a652b
[  132.612985]  00000096811387b5 0000000000000200 ffff8800bab29d80 ffff880034c54c00
[  132.612986] Call Trace:
[  132.612987]  <IRQ>  [<ffffffff813d229e>] dump_stack+0x63/0x85
[  132.612994]  [<ffffffff810a652b>] __warn+0xcb/0xf0
[  132.612997]  [<ffffffff810e76a0>] ? push_dl_task.part.32+0x170/0x170
[  132.612999]  [<ffffffff810a665d>] warn_slowpath_null+0x1d/0x20
[  132.613000]  [<ffffffff810aba5b>] __local_bh_enable_ip+0x6b/0x80
[  132.613008]  [<ffffffff817d6c8a>] _raw_write_unlock_bh+0x1a/0x20
[  132.613010]  [<ffffffff817d6c9e>] _raw_spin_unlock_bh+0xe/0x10
[  132.613015]  [<ffffffff811388ac>] put_css_set+0x5c/0x60
[  132.613016]  [<ffffffff8113dc7f>] cgroup_free+0x7f/0xa0
[  132.613017]  [<ffffffff810a3912>] __put_task_struct+0x42/0x140
[  132.613018]  [<ffffffff810e776a>] dl_task_timer+0xca/0x250
[  132.613027]  [<ffffffff810e76a0>] ? push_dl_task.part.32+0x170/0x170
[  132.613030]  [<ffffffff8111371e>] __hrtimer_run_queues+0xee/0x270
[  132.613031]  [<ffffffff81113ec8>] hrtimer_interrupt+0xa8/0x190
[  132.613034]  [<ffffffff81051a58>] local_apic_timer_interrupt+0x38/0x60
[  132.613035]  [<ffffffff817d9b0d>] smp_apic_timer_interrupt+0x3d/0x50
[  132.613037]  [<ffffffff817d7c5c>] apic_timer_interrupt+0x8c/0xa0
[  132.613038]  <EOI>  [<ffffffff81063466>] ? native_safe_halt+0x6/0x10
[  132.613043]  [<ffffffff81037a4e>] default_idle+0x1e/0xd0
[  132.613044]  [<ffffffff810381cf>] arch_cpu_idle+0xf/0x20
[  132.613046]  [<ffffffff810e8fda>] default_idle_call+0x2a/0x40
[  132.613047]  [<ffffffff810e92d7>] cpu_startup_entry+0x2e7/0x340
[  132.613048]  [<ffffffff81050235>] start_secondary+0x155/0x190
[  132.613049] ---[ end trace f91934d162ce9977 ]---

The warn is the spin_(lock|unlock)_bh(&css_set_lock) in the interrupt
context. Converting the spin_lock_bh to spin_lock_irq(save) to avoid
this problem - and other problems of sharing a spinlock with an
interrupt.

Change-Id: I2064d3c21863e50ee1a70e57f7915d04f2ba0407
Cc: Tejun Heo <tj@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Juri Lelli <juri.lelli@arm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: cgroups@vger.kernel.org
Cc: stable@vger.kernel.org # 4.5+
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Rik van Riel <riel@redhat.com>
Reviewed-by: "Luis Claudio R. Goncalves" <lgoncalv@redhat.com>
Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Acked-by: Zefan Li <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Git-commit: 82d6489d0fed2ec8a8c48c19e8d8a04ac8e5bb26
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[runminw@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
2016-11-03 11:57:08 -07:00
Puja Gupta
5d08a1c80d soc: qcom: Initialize structure with default values
There is possibility for use of uninitialized variable. Hence initialize
the structure with default values.
Also fix couple of other debug logs.

CRs-Fixed: 1078904
Change-Id: I32abceba2d55c95bdb8e9b6463a39d29fb3bc7c7
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
2016-11-03 11:46:36 -07:00
Shiv Maliyappanahalli
e20ce23300 drivers: soc: implement notify_tx_abort()
The glink buffers used to send commands to adsp using
glink_tx() will be freed by glink using notify_tx_abort()
during remote subsystem restart. Implement notify_tx_abort()
so that the buffers can be reclaimed by APR.

Change-Id: Ibc9ce23d4ba15d0e3faa9db3e760965a7439aed8
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
2016-11-03 11:39:41 -07:00
Abhijit Kulkarni
7c9a3efa79 msm: mdss: Enable secure display and camera feature for msmcobalt
Add support for secure display and camera in driver. The physical address
of the secure buffers is programmed into driver and hence there is no
need of stage 1 translation. These changes handle the detach/attach of
smmu contexts while going into and coming out of secure use case.
For secure display both the secure and unsecure contexts are detached,
while for secure camera only the secure context is detached.

CRs-Fixed: 1085143
Change-Id: Iadab43e9655a9e97cdc6661c17a73891cbc2a17f
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2016-11-03 10:33:25 -07:00
Zhen Kong
49da28a571 qseecom: whitelist support for kernel client and listener
-- Add whitelist support for listener to send modified resp to TZ;
-- support whitelist for kernel client;
-- Change the method to check whitelist feature.

Change-Id: I0030b0008d6224cda3fdc1f80308a7e9bcfe4405
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2016-11-03 10:14:36 -07:00
Laxminath Kasam
cb24f354ce drivers: mfd: Fix 32-bit audio compile
Add header in utils to resolve compile
issue in 32-bit mode.

Change-Id: I542b9fe014cff5a4b944eaab6034bfdb3e63a087
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2016-11-03 21:24:25 +05:30
Phani Kumar Uppalapati
bb07c9f891 ASoC: wcd934x: Update surge recovery for version 1.1
Update codec headphone surge recovery sequence for
version 1.1.

Change-Id: I74a10da503622f7cd9ceb9a8b503b876e17abab4
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-11-03 07:32:19 -07:00
Linux Build Service Account
758693b4a6 Merge "usb: pd: Avoid calling SVID disconnect if not previously connected" 2016-11-03 06:24:06 -07:00
Linux Build Service Account
ddb7835f5f Merge "ASoC: wcd934x-dsp-cntl: Add misc device to control codec dsp" 2016-11-03 06:24:05 -07:00
Linux Build Service Account
ce631fb608 Merge "drivers: qcom: ultrasound: Lock async driver calls" 2016-11-03 06:24:02 -07:00
Linux Build Service Account
9da5130045 Merge "drivers: soc: Add new parameters for APR IPC logging" 2016-11-03 06:24:01 -07:00
Linux Build Service Account
d39cd55f06 Merge "ASoC: msm: qdsp6v2: Change audio drivers to use %pK" 2016-11-03 06:23:58 -07:00
Linux Build Service Account
475e375e99 Merge "ASoC: wcd934x: Update OCP connection attempts" 2016-11-03 06:23:57 -07:00
Linux Build Service Account
086c9df600 Merge "clk: Add support to vote to regulator framework from clk framework" 2016-11-03 06:23:57 -07:00
Linux Build Service Account
71f578efa8 Merge "ASoC: msmcobalt: Initialize variable to default value" 2016-11-03 06:23:55 -07:00
Linux Build Service Account
f319f3de8b Merge "ASoC: msm: qdsp6v2: Index check for out of range" 2016-11-03 06:23:55 -07:00
Linux Build Service Account
79ef787822 Merge "msm: camera: isp: Fix reset sequence on stop" 2016-11-03 06:23:53 -07:00
Ashay Jaiswal
81a1e629f8 ARM: dts: msm: add PMFALCON/PM2FALCON devices for msmcobalt interposer
Add PMIC devices and remove reference of PMCOBALT/PMICOBALT from all
client device nodes.

CRs-Fixed: 1083528
Change-Id: Idc0f0de7f3196d5e456d62e871c8ccfcb576fb07
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
2016-11-03 05:28:52 -07:00
Srinivas Ramana
6c42ab0ecd ARM: dts: msm: Add interposer dts files for msmcobalt
Add device tree support for msmcobalt interposer platform
using msmfalcon CDP/MTP.

Change-Id: Ie9eef135cdefc8d2a55f038cf9de5fc7f3656f64
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2016-11-03 17:35:31 +05:30
Srinivas Ramana
96b30ff11b Documentation: edac: Add bindings for arm64 cpu erp
This is a snapshot from msm-3.18 upto the
commit 262b8c5814ec ("edac: cortex_arm64_edac:
modify sbe detection to use perf events") for the
arm64 cache cpu erp bindings.

Change-Id: I7313a121440bf5a455401cf73bd5ef4d6c1506cb
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2016-11-03 13:39:39 +05:30
Linux Build Service Account
e1f711f8e0 Merge "usb: pd: Implement RX message queuing" 2016-11-02 22:38:48 -07:00
Linux Build Service Account
81d5b6b5da Merge "usb: dwc3: Draw 100mA upon host bus reset" 2016-11-02 22:38:48 -07:00
Linux Build Service Account
39a4ec35cc Merge "sound: usb: Map audio format received from QMI client" 2016-11-02 22:38:47 -07:00
Linux Build Service Account
c16a50bf49 Merge "selinux: nlmsgtab: add SOCK_DESTROY to the netlink mapping tables" 2016-11-02 22:38:44 -07:00
Stephen Boyd
2ac3d304b9 clk: Add support to vote to regulator framework from clk framework
Add vdd_class support which would help vote/unvote for any voltage rail
for the clock frequency to the regulator framework. A clock client request
for a clock frequency would look for the corresponding voltage vote and
would be send the request to regulator framework.

Change-Id: I5b1229091fcb7b3887b54735b9663fd31a35db21
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-11-03 09:16:56 +05:30
Jack Pham
64d72675d7 usb: pd: Avoid calling SVID disconnect if not previously connected
Only call an SVID handler's disconnect function only if it was
previously connected, i.e. when the state machine had proceeded
received a successful DISCOVER_SVIDs response. This helps to
avoid excessive notification to SVID clients.

While at it, require that .connect and .disconnect callbacks
are supplied during registration. This helps to eliminate NULL
checks each time they are called.

Change-Id: I030153a6b2106a6504ed51b5cb00a27f842e2488
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-11-02 20:22:11 -07:00