Commit graph

580472 commits

Author SHA1 Message Date
Linux Build Service Account
e48066aa5f Merge "msm: mdss: advertize hdr support on msm8998" 2017-01-05 02:09:03 -08:00
Linux Build Service Account
3ef2b6c93c Merge "msm: mdss: avoid possible infinite loop on kmalloc failure" 2017-01-05 02:09:02 -08:00
Linux Build Service Account
8b24b9db96 Merge "msm: mdss: fix cwb output buffer memory leak" 2017-01-05 02:09:01 -08:00
Linux Build Service Account
c4ae5b8690 Merge "ARM: dts: msm: Introduce bus topology for sdm630" 2017-01-05 02:09:01 -08:00
Linux Build Service Account
53a6c09ff4 Merge "msm: mdss: fix programming of scaler lut_ctrl register" 2017-01-05 02:09:00 -08:00
Linux Build Service Account
6b5c6d44ea Merge "msm: sde: move config validation earlier to stream on" 2017-01-05 02:08:59 -08:00
Linux Build Service Account
1841235aad Merge "ARM: dts: msm: add support for truly panel in dsc mode" 2017-01-05 02:08:58 -08:00
Linux Build Service Account
dbbac4f76f Merge "sched: Fix new task accounting bug in transfer_busy_time()" 2017-01-05 02:08:58 -08:00
Linux Build Service Account
24df0afae9 Merge "ppp: take reference on channels netns" 2017-01-05 02:08:57 -08:00
Linux Build Service Account
0cb304caa5 Merge "msm: kgsl: Add Zap shader name for A512 GPU on SDM660" 2017-01-05 02:08:56 -08:00
Linux Build Service Account
fa69f96bbb Merge "msm: mdss: rename dsi phy version for msm8996 and sdm660" 2017-01-05 02:08:55 -08:00
Linux Build Service Account
a5d7c799af Merge "msm: mdss: Set default fps for dedicated WB" 2017-01-05 02:08:50 -08:00
Linux Build Service Account
fbc0f1b44f Merge "msm: mdss: Memset commit structure in compat path" 2017-01-05 02:08:49 -08:00
Linux Build Service Account
11e1f7acff Merge "msm: mdss: Add sysfs node for mdss to give runtime fps" 2017-01-05 02:08:48 -08:00
Linux Build Service Account
d4e1fb98bd Merge "msm: mdss: Allow WB to use first available control path" 2017-01-05 02:08:48 -08:00
Linux Build Service Account
9bcaa86e0c Merge "msm: mdss: Fix potential NULL pointer dereference in mdss smmu driver" 2017-01-05 02:08:47 -08:00
Linux Build Service Account
7da94c32a4 Merge "msm: mdss: print fence name during sync fence timeouts" 2017-01-05 02:08:47 -08:00
Linux Build Service Account
afc76e01c9 Merge "msm: mdss: Fix compat IOCTLS in rotator and primary" 2017-01-05 02:08:46 -08:00
Linux Build Service Account
dfc703f24a Merge "msm: mdss: Fix potential NULL pointer dereferences" 2017-01-05 02:08:46 -08:00
Linux Build Service Account
fff2d13b25 Merge "msm: mdss: Initialize pan_name array to 0 and handle error case" 2017-01-05 02:08:45 -08:00
Linux Build Service Account
ee57bbcc67 Merge "msm: mdss: Update WB OT settings for SDM660" 2017-01-05 02:08:45 -08:00
Linux Build Service Account
0aac3e19af Merge "qpnp-fg-gen3: add support for configuring ESR filter coefficients" 2017-01-05 02:08:42 -08:00
Linux Build Service Account
b1cb986a8f Merge "ARM: dts: msm: Add G-Link SPI transport device for sdm630" 2017-01-04 15:40:19 -08:00
Linux Build Service Account
8c3460d38c Merge "ARM: dts: msm: Add G-Link SPI transport device for sdm660" 2017-01-04 15:40:18 -08:00
Linux Build Service Account
6c1b5be1fe Merge "nf: IDLETIMER: Use fullsock when querying uid" 2017-01-04 15:40:17 -08:00
Linux Build Service Account
4752ef6f66 Merge "ARM: dts: msm: Enable red LED blinking for pm660" 2017-01-04 15:40:17 -08:00
Guillaume Nault
1b0631a740 ppp: take reference on channels netns
Let channels hold a reference on their network namespace.
Some channel types, like ppp_async and ppp_synctty, can have their
userspace controller running in a different namespace. Therefore they
can't rely on them to preclude their netns from being removed from
under them.

==================================================================
BUG: KASAN: use-after-free in ppp_unregister_channel+0x372/0x3a0 at
addr ffff880064e217e0
Read of size 8 by task syz-executor/11581
=============================================================================
BUG net_namespace (Not tainted): kasan: bad access detected
-----------------------------------------------------------------------------

Disabling lock debugging due to kernel taint
INFO: Allocated in copy_net_ns+0x6b/0x1a0 age=92569 cpu=3 pid=6906
[<      none      >] ___slab_alloc+0x4c7/0x500 kernel/mm/slub.c:2440
[<      none      >] __slab_alloc+0x4c/0x90 kernel/mm/slub.c:2469
[<     inline     >] slab_alloc_node kernel/mm/slub.c:2532
[<     inline     >] slab_alloc kernel/mm/slub.c:2574
[<      none      >] kmem_cache_alloc+0x23a/0x2b0 kernel/mm/slub.c:2579
[<     inline     >] kmem_cache_zalloc kernel/include/linux/slab.h:597
[<     inline     >] net_alloc kernel/net/core/net_namespace.c:325
[<      none      >] copy_net_ns+0x6b/0x1a0 kernel/net/core/net_namespace.c:360
[<      none      >] create_new_namespaces+0x2f6/0x610 kernel/kernel/nsproxy.c:95
[<      none      >] copy_namespaces+0x297/0x320 kernel/kernel/nsproxy.c:150
[<      none      >] copy_process.part.35+0x1bf4/0x5760 kernel/kernel/fork.c:1451
[<     inline     >] copy_process kernel/kernel/fork.c:1274
[<      none      >] _do_fork+0x1bc/0xcb0 kernel/kernel/fork.c:1723
[<     inline     >] SYSC_clone kernel/kernel/fork.c:1832
[<      none      >] SyS_clone+0x37/0x50 kernel/kernel/fork.c:1826
[<      none      >] entry_SYSCALL_64_fastpath+0x16/0x7a kernel/arch/x86/entry/entry_64.S:185

INFO: Freed in net_drop_ns+0x67/0x80 age=575 cpu=2 pid=2631
[<      none      >] __slab_free+0x1fc/0x320 kernel/mm/slub.c:2650
[<     inline     >] slab_free kernel/mm/slub.c:2805
[<      none      >] kmem_cache_free+0x2a0/0x330 kernel/mm/slub.c:2814
[<     inline     >] net_free kernel/net/core/net_namespace.c:341
[<      none      >] net_drop_ns+0x67/0x80 kernel/net/core/net_namespace.c:348
[<      none      >] cleanup_net+0x4e5/0x600 kernel/net/core/net_namespace.c:448
[<      none      >] process_one_work+0x794/0x1440 kernel/kernel/workqueue.c:2036
[<      none      >] worker_thread+0xdb/0xfc0 kernel/kernel/workqueue.c:2170
[<      none      >] kthread+0x23f/0x2d0 kernel/drivers/block/aoe/aoecmd.c:1303
[<      none      >] ret_from_fork+0x3f/0x70 kernel/arch/x86/entry/entry_64.S:468
INFO: Slab 0xffffea0001938800 objects=3 used=0 fp=0xffff880064e20000
flags=0x5fffc0000004080
INFO: Object 0xffff880064e20000 @offset=0 fp=0xffff880064e24200

CPU: 1 PID: 11581 Comm: syz-executor Tainted: G    B           4.4.0+
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
rel-1.8.2-0-g33fbe13 by qemu-project.org 04/01/2014
 00000000ffffffff ffff8800662c7790 ffffffff8292049d ffff88003e36a300
 ffff880064e20000 ffff880064e20000 ffff8800662c77c0 ffffffff816f2054
 ffff88003e36a300 ffffea0001938800 ffff880064e20000 0000000000000000
Call Trace:
 [<     inline     >] __dump_stack kernel/lib/dump_stack.c:15
 [<ffffffff8292049d>] dump_stack+0x6f/0xa2 kernel/lib/dump_stack.c:50
 [<ffffffff816f2054>] print_trailer+0xf4/0x150 kernel/mm/slub.c:654
 [<ffffffff816f875f>] object_err+0x2f/0x40 kernel/mm/slub.c:661
 [<     inline     >] print_address_description kernel/mm/kasan/report.c:138
 [<ffffffff816fb0c5>] kasan_report_error+0x215/0x530 kernel/mm/kasan/report.c:236
 [<     inline     >] kasan_report kernel/mm/kasan/report.c:259
 [<ffffffff816fb4de>] __asan_report_load8_noabort+0x3e/0x40 kernel/mm/kasan/report.c:280
 [<     inline     >] ? ppp_pernet kernel/include/linux/compiler.h:218
 [<ffffffff83ad71b2>] ? ppp_unregister_channel+0x372/0x3a0 kernel/drivers/net/ppp/ppp_generic.c:2392
 [<     inline     >] ppp_pernet kernel/include/linux/compiler.h:218
 [<ffffffff83ad71b2>] ppp_unregister_channel+0x372/0x3a0 kernel/drivers/net/ppp/ppp_generic.c:2392
 [<     inline     >] ? ppp_pernet kernel/drivers/net/ppp/ppp_generic.c:293
 [<ffffffff83ad6f26>] ? ppp_unregister_channel+0xe6/0x3a0 kernel/drivers/net/ppp/ppp_generic.c:2392
 [<ffffffff83ae18f3>] ppp_asynctty_close+0xa3/0x130 kernel/drivers/net/ppp/ppp_async.c:241
 [<ffffffff83ae1850>] ? async_lcp_peek+0x5b0/0x5b0 kernel/drivers/net/ppp/ppp_async.c:1000
 [<ffffffff82c33239>] tty_ldisc_close.isra.1+0x99/0xe0 kernel/drivers/tty/tty_ldisc.c:478
 [<ffffffff82c332c0>] tty_ldisc_kill+0x40/0x170 kernel/drivers/tty/tty_ldisc.c:744
 [<ffffffff82c34943>] tty_ldisc_release+0x1b3/0x260 kernel/drivers/tty/tty_ldisc.c:772
 [<ffffffff82c1ef21>] tty_release+0xac1/0x13e0 kernel/drivers/tty/tty_io.c:1901
 [<ffffffff82c1e460>] ? release_tty+0x320/0x320 kernel/drivers/tty/tty_io.c:1688
 [<ffffffff8174de36>] __fput+0x236/0x780 kernel/fs/file_table.c:208
 [<ffffffff8174e405>] ____fput+0x15/0x20 kernel/fs/file_table.c:244
 [<ffffffff813595ab>] task_work_run+0x16b/0x200 kernel/kernel/task_work.c:115
 [<     inline     >] exit_task_work kernel/include/linux/task_work.h:21
 [<ffffffff81307105>] do_exit+0x8b5/0x2c60 kernel/kernel/exit.c:750
 [<ffffffff813fdd20>] ? debug_check_no_locks_freed+0x290/0x290 kernel/kernel/locking/lockdep.c:4123
 [<ffffffff81306850>] ? mm_update_next_owner+0x6f0/0x6f0 kernel/kernel/exit.c:357
 [<ffffffff813215e6>] ? __dequeue_signal+0x136/0x470 kernel/kernel/signal.c:550
 [<ffffffff8132067b>] ? recalc_sigpending_tsk+0x13b/0x180 kernel/kernel/signal.c:145
 [<ffffffff81309628>] do_group_exit+0x108/0x330 kernel/kernel/exit.c:880
 [<ffffffff8132b9d4>] get_signal+0x5e4/0x14f0 kernel/kernel/signal.c:2307
 [<     inline     >] ? kretprobe_table_lock kernel/kernel/kprobes.c:1113
 [<ffffffff8151d355>] ? kprobe_flush_task+0xb5/0x450 kernel/kernel/kprobes.c:1158
 [<ffffffff8115f7d3>] do_signal+0x83/0x1c90 kernel/arch/x86/kernel/signal.c:712
 [<ffffffff8151d2a0>] ? recycle_rp_inst+0x310/0x310 kernel/include/linux/list.h:655
 [<ffffffff8115f750>] ? setup_sigcontext+0x780/0x780 kernel/arch/x86/kernel/signal.c:165
 [<ffffffff81380864>] ? finish_task_switch+0x424/0x5f0 kernel/kernel/sched/core.c:2692
 [<     inline     >] ? finish_lock_switch kernel/kernel/sched/sched.h:1099
 [<ffffffff81380560>] ? finish_task_switch+0x120/0x5f0 kernel/kernel/sched/core.c:2678
 [<     inline     >] ? context_switch kernel/kernel/sched/core.c:2807
 [<ffffffff85d794e9>] ? __schedule+0x919/0x1bd0 kernel/kernel/sched/core.c:3283
 [<ffffffff81003901>] exit_to_usermode_loop+0xf1/0x1a0 kernel/arch/x86/entry/common.c:247
 [<     inline     >] prepare_exit_to_usermode kernel/arch/x86/entry/common.c:282
 [<ffffffff810062ef>] syscall_return_slowpath+0x19f/0x210 kernel/arch/x86/entry/common.c:344
 [<ffffffff85d88022>] int_ret_from_sys_call+0x25/0x9f kernel/arch/x86/entry/entry_64.S:281
Memory state around the buggy address:
 ffff880064e21680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff880064e21700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff880064e21780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                       ^
 ffff880064e21800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff880064e21880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Change-Id: I6b7e3b60aa17e7b67d20d4a894cafcb05e76dcbd
Fixes: 273ec51dd7 ("net: ppp_generic - introduce net-namespace functionality v2")
Reported-by: Baozeng Ding <sploving1@gmail.com>
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
[d-cagle@codeaurora.org: Merge conflicts resolved automatically]
Git-repo: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git
Git-commit: 1f461dcdd296eecedaffffc6bae2bfa90bd7eb89
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
2017-01-04 11:24:33 -08:00
Rajesh Kemisetti
bf63100b11 msm: kgsl: Add Zap shader name for A512 GPU on SDM660
This is needed to clear out the internal memories of
GPU while moving from secure to unsecure mode.

Change-Id: I9ef4848212246a2ed45395ef97c7f755784cb635
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
2017-01-05 00:16:44 +05:30
Linux Build Service Account
8bb66a7e41 Merge "regulator: cprh-kbss: add support for sdm660 kbss cpr instances" 2017-01-04 03:25:37 -08:00
Linux Build Service Account
246e930ecb Merge "ARM: dts: msm: Add initial device tree for SDA630" 2017-01-04 03:25:36 -08:00
Linux Build Service Account
db25c7c878 Merge "ARM: dts: msm: Add device tree for SDM630 CDP, MTP and RCM" 2017-01-04 03:25:35 -08:00
Linux Build Service Account
94e93c87d5 Merge "ARM: dts: msm: Add initial device tree for SDM658" 2017-01-04 03:25:35 -08:00
Linux Build Service Account
9a18201fc8 Merge "sched: Fix deadlock between cpu hotplug and upmigrate change" 2017-01-04 03:25:34 -08:00
Linux Build Service Account
f478111a15 Merge "ARM: dts: msm: modify cpu nodes for sdm660" 2017-01-04 03:25:33 -08:00
Linux Build Service Account
553ba64570 Merge "ARM: dts: msm: Update SDM660+PM660A QRD board hardware version" 2017-01-04 03:25:32 -08:00
Linux Build Service Account
b4e982d4ee Merge "ARM: dts: msm: Update Venus QOS settings for SDM660" 2017-01-04 03:25:31 -08:00
Linux Build Service Account
5c124705e3 Merge "ARM: dts: msm: Add camera dtsi for sdm660 qrd" 2017-01-04 03:25:30 -08:00
Dhoat Harpal
7e81f05cb8 ARM: dts: msm: Add G-Link SPI transport device for sdm660
G-Link SPI transport is used to communicate with external audio codec.
Add G-Link SPI transport device to support that configuration.

CRs-Fixed: 1106989
Change-Id: Id447b5e89e653065df6f368a4e5e59b22e0dc159
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2017-01-04 15:43:02 +05:30
Dhoat Harpal
0a38bf2a3c ARM: dts: msm: Add G-Link SPI transport device for sdm630
G-Link SPI transport is used to communicate with external audio codec.
Add G-Link SPI transport device to support that configuration.

CRs-Fixed: 1106989
Change-Id: Iac48fe87152379244e2c813f767b4e497553b8d1
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2017-01-04 15:38:06 +05:30
Odelu Kukatla
de9aa2c4aa ARM: dts: msm: Introduce bus topology for sdm630
Bus topology is the representation of bus connections in SOC
and is required for the bus driver to serve the bandwidth
requests from clients.

Change-Id: I474f390e86f291e78d6126ed769837b123e2a409
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
2017-01-04 13:15:55 +05:30
ansharma
c59063c0b8 ARM: dts: msm: Enable red LED blinking for pm660
Add LPG and PWM parameters to blink the red LED. This is controlled by
userspace during charging.
Disable the battery-charging LED triggers to avoid conflicting LED control
by userspace and kernel battery-charging events.

CRs-Fixed: 1106738
Change-Id: Ic1c0f7ef7f8144fade05cc06db3cf87bce55c236
Signed-off-by: ansharma <ansharma@codeaurora.org>
2017-01-04 09:30:07 +05:30
Tirupathi Reddy
a8af09abd1 regulator: cprh-kbss: add support for sdm660 kbss cpr instances
sdm660 CPU CPR controllers support full hardware closed-loop CPR
operation also known as CPR hardening. Extend the cprh-kbss-regulator
driver to handle CPU subsystem specific power requirements of
the sdm660 chip.

CRs-Fixed: 1105923
Change-Id: I2e24a061a5ad4ee959dd578da9e811ac7700702c
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
2017-01-04 09:19:00 +05:30
Subbaraman Narayanamurthy
15c1d49794 qpnp-fg-gen3: add support for configuring ESR filter coefficients
As per the hardware documentation, add support for configuring
ESR tight and broad filters for normal and low temperature. This
is needed as the low temperature ESR filter coefficients are not
functional in the hardware.

All the filter values (in terms of percentage) can be configured
through the device tree. When the battery temperature goes below
10 C or user configured temperature threshold, ESR filter values
of room temperature will be applied to ESR low temperature
filters. Once the battery temperature goes above 10 C, original
values will be applied back to ESR low temperature filters.

Change-Id: I347f194f96ace3036a3c49efe0306d9f909cef36
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-01-03 19:30:25 -08:00
Subbaraman Narayanamurthy
1a53645674 qpnp-fg-gen3: Handle false positives in battery missing detection
Battery missing detection interrupt fires prematurely for higher
battery ID values than the desired range. Fix this by disabling
BMD when battery is re-inserted and enable it after obtaining the
battery ID.

While at it, update the battery type shown in particular when a
battery profile is not available.

Change-Id: Ia5458a85289e47bda0a9f4bc59683af695974bc5
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-01-03 19:30:24 -08:00
Subbaraman Narayanamurthy
3d493610e3 qpnp-fg-gen3: clear profile integrity bit upon battery removal
In certain cases like battery hotswap where a strong charger is
connected and battery is re-inserted, the expectation from the
user is to reload the battery profile. This cannot happen unless
a dVdd reset happens and wipes out FG SRAM. To help with the
aforementioned scenario, clear the profile integrity bit every
time when the battery is re-inserted. This way, FG driver will
reload the profile everytime upon battery insertion.

When the battery is missing, cycle counters cannot be cleared as
the access to FG SRAM might not succeed. Hence remove it from the
battery removal path. It will be cleared anyways when the profile
is loaded after the battery is inserted.

While at it, show the cached value of battery_id instead of
reading it every time from RR_ADC peripheral. When the battery is
re-inserted, battery id is obtained from RR_ADC driver anyways
which is sufficient.

Change-Id: I0b9566f7a9fcc81e26e68280382e2d960c49eeb5
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-01-03 19:30:23 -08:00
Subbaraman Narayanamurthy
1897bd682b qpnp-fg-gen3: add support for dumping FG SRAM
Add support to dump FG SRAM periodically based on the module
parameters. This will be useful for debugging purpose.

To enable FG SRAM dump,
echo 1 > /sys/module/qpnp_fg_gen3/parameters/sram_dump_en

To disable FG SRAM dump,
echo 0 > /sys/module/qpnp_fg_gen3/parameters/sram_dump_en

To set FG SRAM dump period,
echo 15000 > /sys/module/qpnp_fg_gen3/parameters/sram_dump_period_ms

Change-Id: Ib4bae7f67100a4bda1e4b996f2fbaeb86da979d2
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-01-03 19:30:17 -08:00
Syed Rameez Mustafa
3997e768ac sched: Fix new task accounting bug in transfer_busy_time()
In transfer_busy_time(), the new_task flag is set based on the active
window count prior to the call to update_task_ravg(). update_task_ravg()
however, can then increment the active window count and consequently
the new_task flag above becomes stale. This is turn leads to inaccurate
accounting whereby update_task_ravg() does accounting based on the fact
that the task is not new whereas transfer_busy_time() then continues to
do further accounting assuming that the task is new. The accounting
discrepancies are sometimes caught by some of the scheduler BUGs.

Fix the described problem by moving the check is_new_task() after the
call to update_task_ravg(). Also add two missing BUGs that would catch
the problem sooner rather than later.

Change-Id: I8dc4822e97cc03ebf2ca1ee2de95eb4e5851f459
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
2017-01-03 19:22:23 -08:00
Jiangen Jiao
583385ee1c ARM: dts: msm: Update SDM660+PM660A QRD board hardware version
Change QRD board(SDM660+PM660A) major hardware version to 0x12.

CRs-Fixed: 1106360
Change-Id: I647e406199ee1daf3b7d489ccad07c5b8f448e8f
Signed-off-by: Jiangen Jiao <jiangenj@codeaurora.org>
2017-01-04 10:27:03 +08:00
Linux Build Service Account
054b950dfd Merge "msm: pcie: add mutex for PCIe enumeration" 2017-01-03 17:56:57 -08:00
Linux Build Service Account
a5f4f523f8 Merge "cpufreq: Register for hotplug notifier before locking hotplug" 2017-01-03 17:56:56 -08:00