Commit graph

583301 commits

Author SHA1 Message Date
Asutosh Das
6b46b13b42 ARM: dts: msm: increase the system pm levels in sdm660
Increasing the system pm-level would ensure that Vccq2 &
ref-clk supply are turned off during system suspend.

Change-Id: I22b42d971266c6cb67f1f15e2b48c3f111c22ac8
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
2017-02-17 07:36:32 +05:30
Jeevan Shriram
d1bb84d765 certs: dm-verity: add keyring certification for verity
Enable SYSTEM_TRUSTED_KEYS and add certification for x509 signing for
system.

CRs-Fixed: 1116507
Change-Id: I01298d75da0ff9faee2d01118107d53e9a2aef8a
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
2017-02-16 17:58:04 -08:00
Asutosh Das
64db44d65e ARM: dts: msm: move ref-clk from phy to ufs node in sdm660
This patch moves the ref-clk node from the phy node
to the ufs node.
This is done so as to turn-off the ref-clk supply when
the link is off.

Change-Id: I17139340f2208b67b9a2d99419ac6ce92c06dbe5
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
2017-02-17 07:21:52 +05:30
Asutosh Das
fd9bba4caa phy: qcom-ufs: parse ref-clk details prior to resource request
Do not request a resource if the ref clk regulator details are
not defined in ufs phy node.

Change-Id: I10eb426d4407388681340cb71fe9e761794dc298
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
2017-02-17 07:12:00 +05:30
Asutosh Das
c1c02eecad scsi: ufs-qcom: Control ufs-ref-clk-supply from host node
UFS device requires a reference clock for
operating in HS (High-speed) gears. This device
reference clock is provided by the dedicated SoC pad
on QCOM platforms. This rail needs to be powered by
1.2v power pads.
Currently, that supply is being controlled
in the ufs phy driver. Phy driver doesn't have any
knowledge of the system-pm state. Hence, it can't
selectively toggle this supply.

Hence, move the control of this supply to ufs driver.
The host driver has the knowledge of system-pm state &
is better equipped to toggle this supply.

Change-Id: Ia19c6e7d9ffb856a01d31ab56ea97a7bb1affae6
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
2017-02-17 07:03:04 +05:30
Jack Pham
35ab08e7cb usb: pd: Skip decreasing current when requesting the same PPS
When a PPS PDO is selected and a request is made for the same
PDO at a different voltage, there is no need to suspend the
current draw. This allows for more efficient charging as the
charger does not have to ramp down / ramp back up its current
limit.

Change-Id: I2e5af41788b5297204a3f603a5375ec78020c919
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2017-02-16 16:06:41 -08:00
Rabin Vincent
1e64d58846 block: protect iterate_bdevs() against concurrent close
commit af309226db916e2c6e08d3eba3fa5c34225200c4 upstream.

If a block device is closed while iterate_bdevs() is handling it, the
following NULL pointer dereference occurs because bdev->b_disk is NULL
in bdev_get_queue(), which is called from blk_get_backing_dev_info() (in
turn called by the mapping_cap_writeback_dirty() call in
__filemap_fdatawrite_range()):

 BUG: unable to handle kernel NULL pointer dereference at 0000000000000508
 IP: [<ffffffff81314790>] blk_get_backing_dev_info+0x10/0x20
 PGD 9e62067 PUD 9ee8067 PMD 0
 Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
 Modules linked in:
 CPU: 1 PID: 2422 Comm: sync Not tainted 4.5.0-rc7+ #400
 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996)
 task: ffff880009f4d700 ti: ffff880009f5c000 task.ti: ffff880009f5c000
 RIP: 0010:[<ffffffff81314790>]  [<ffffffff81314790>] blk_get_backing_dev_info+0x10/0x20
 RSP: 0018:ffff880009f5fe68  EFLAGS: 00010246
 RAX: 0000000000000000 RBX: ffff88000ec17a38 RCX: ffffffff81a4e940
 RDX: 7fffffffffffffff RSI: 0000000000000000 RDI: ffff88000ec176c0
 RBP: ffff880009f5fe68 R08: 0000000000000000 R09: 0000000000000000
 R10: 0000000000000001 R11: 0000000000000000 R12: ffff88000ec17860
 R13: ffffffff811b25c0 R14: ffff88000ec178e0 R15: ffff88000ec17a38
 FS:  00007faee505d700(0000) GS:ffff88000fb00000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
 CR2: 0000000000000508 CR3: 0000000009e8a000 CR4: 00000000000006e0
 Stack:
  ffff880009f5feb8 ffffffff8112e7f5 0000000000000000 7fffffffffffffff
  0000000000000000 0000000000000000 7fffffffffffffff 0000000000000001
  ffff88000ec178e0 ffff88000ec17860 ffff880009f5fec8 ffffffff8112e81f
 Call Trace:
  [<ffffffff8112e7f5>] __filemap_fdatawrite_range+0x85/0x90
  [<ffffffff8112e81f>] filemap_fdatawrite+0x1f/0x30
  [<ffffffff811b25d6>] fdatawrite_one_bdev+0x16/0x20
  [<ffffffff811bc402>] iterate_bdevs+0xf2/0x130
  [<ffffffff811b2763>] sys_sync+0x63/0x90
  [<ffffffff815d4272>] entry_SYSCALL_64_fastpath+0x12/0x76
 Code: 0f 1f 44 00 00 48 8b 87 f0 00 00 00 55 48 89 e5 <48> 8b 80 08 05 00 00 5d
 RIP  [<ffffffff81314790>] blk_get_backing_dev_info+0x10/0x20
  RSP <ffff880009f5fe68>
 CR2: 0000000000000508
 ---[ end trace 2487336ceb3de62d ]---

The crash is easily reproducible by running the following command, if an
msleep(100) is inserted before the call to func() in iterate_devs():

 while :; do head -c1 /dev/nullb0; done > /dev/null & while :; do sync; done

Fix it by holding the bd_mutex across the func() call and only calling
func() if the bdev is opened.

Change-Id: I3385298e24d9a6121b7b0e35d4f8be15091f3fb4
Fixes: 5c0d6b60a0 ("vfs: Create function for iterating over block devices")
Reported-and-tested-by: Wei Fang <fangwei1@huawei.com>
Signed-off-by: Rabin Vincent <rabinv@axis.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: af309226db916e2c6e08d3eba3fa5c34225200c4
Git-repo: git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
2017-02-16 14:57:53 -08:00
Abhinav Kumar
4ad201445b drm/msm/sde:: fix optional property parsing for qseed and csc properties
With commit <5aad7456b5a5aeea93a437ae46680a97d089fe51> (<drm/msm/sde:
parse csc type dtsi entry to select valid csc>), support for
CSC is added to 8998 target. However this is an optional property for
some targets. Fix the parsing logic to not fail in case of missing
optional properties.

CRs-Fixed: 2002381
Change-Id: Idfe750d3afbd0d88d89ffa873deae130a24b2827
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Signed-off-by: Manoj Kumar AVM <manojavm@codeaurora.org>
2017-02-16 13:23:25 -08:00
Linux Build Service Account
7066afbbe9 Merge "drm/msm/sde: signal pending PAGE_FLIP events" 2017-02-16 13:09:28 -08:00
Nicholas Troast
ad819206fd ARM: dts: msm: add connector temp iio channel for SMB138X
SMB138X uses the connector temperature. Add it.

Change-Id: I3bb6769a1846fd29e5cca27d8589ed90de003dd3
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2017-02-16 12:40:29 -08:00
Linux Build Service Account
f44d9e364a Merge "ARM: dts: msm: update CPU efficiency values for sdm660" 2017-02-16 03:05:22 -08:00
Linux Build Service Account
2081c63810 Merge "proc: fix conversion of oom_score_adj to oom_adj" 2017-02-16 03:05:21 -08:00
Linux Build Service Account
b2a4c95db8 Merge "USB: gadget: Replace %pK with %pM" 2017-02-16 03:05:20 -08:00
Linux Build Service Account
93e5bbd790 Merge "ARM: dts: msm: Enable support for LPM Errata feature on msm8998" 2017-02-16 03:05:19 -08:00
Linux Build Service Account
fe216fd6e7 Merge "uio: fix potential use after free issue when accessing debug_buffer" 2017-02-16 03:05:18 -08:00
Linux Build Service Account
bd552c4107 Merge "BACKPORT: aio: mark AIO pseudo-fs noexec" 2017-02-16 03:05:17 -08:00
Linux Build Service Account
007f16c687 Merge "diag: dci: Initialize the stat variable before using it" 2017-02-16 03:05:16 -08:00
Linux Build Service Account
f7050a38c1 Merge "diag: dci: Send masks information to only supported peripherals" 2017-02-16 03:05:15 -08:00
Linux Build Service Account
9de942a379 Merge "drivers: lmh_lite: Invalidate cache after the scm call" 2017-02-16 03:05:13 -08:00
Linux Build Service Account
986f8e85bd Merge "msm: thermal: Ignore thermal bite for secure device" 2017-02-16 03:05:13 -08:00
Linux Build Service Account
5997ded262 Merge "drivers: thermal: Exit sysfs notify kthread when sensor unregisters" 2017-02-16 03:05:12 -08:00
Linux Build Service Account
02ebf6683c Merge "defconfig: msmcortex: Enable regmap debugfs write" 2017-02-16 03:05:11 -08:00
Linux Build Service Account
47b76bb345 Merge "regmap: Kconfig: make ALLOW_WRITE_DEBUGFS default unset" 2017-02-16 03:05:10 -08:00
Linux Build Service Account
d3731e3536 Merge "pinctrl: qcom: Add syscore system suspend/resume" 2017-02-16 03:05:09 -08:00
Linux Build Service Account
94721ff236 Merge "power: qpnp-fg: Fix possible race condition in FG debugfs" 2017-02-16 03:05:08 -08:00
Linux Build Service Account
15c6242e37 Merge "soc: qcom: spcom: fix error handling" 2017-02-16 03:05:07 -08:00
Linux Build Service Account
df96de77bc Merge "soc: qcom: spss_utils: fix error handling" 2017-02-16 03:05:05 -08:00
Linux Build Service Account
d0533fe42b Merge "defconfig: msmcortex: Disable CONFIG_ICNSS_DEBUG" 2017-02-16 03:05:00 -08:00
Linux Build Service Account
74bd9576d5 Merge "soc: qcom: glink_spi_xprt: Add check for SSR during RX polling" 2017-02-16 03:04:59 -08:00
Asutosh Das
a723713f60 scsi: ufs: full reinit upon resume if link was off
During suspend, if the link is put to off, it would require
a full initialization during resume.
This patch resets and restores both the hba and the card
during initialization.

Change-Id: I37b36c51ca1b475d8f8dfd2d9b1f098c917c86e4
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
2017-02-16 16:17:40 +05:30
Shantanu Jain
be42c7ff1f input: touchscreen: remove msg21xx mstar touch driver
Remove msg21xx mstar touch driver from the kernel code
as it has never been used in any of the recent platforms.

Change-Id: I0ac1f93d9736c402732b6c4a8d22b1bf3500e4c4
Signed-off-by: Vevek Venkatesan <vevekv@codeaurora.org>
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2017-02-16 15:05:31 +05:30
Raviteja Tamatam
55a50d1f4a ARM: dts: msm: update correct default OT settings for mdss
Fix default read and write vbif OT settings for mdss driver
in sdm630 and sdm660.

Change-Id: Ib4ae31359db5770d37210d850fde8bb25c9f965b
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2017-02-16 14:55:56 +05:30
Satish Babu Patakokila
26a74701eb ASoC: msm: qdsp6v2: Add support for fractional sampling rates
Add fractional sampling rates as HDMI Core supports these
sampling rates.

CRs-fixed: 1071528
Change-Id: Ib527283453fcdcc601a68d17e8aafa3d1efc21fb
Signed-off-by: Satish Babu Patakokila <sbpata@codeaurora.org>
2017-02-16 00:46:38 -08:00
Rama Krishna Phani A
9ddd600744 ARM: dts: msm: Update Temperature sensor support for sdm660
Update SW temperature sensor mapping for sdm660 target as per
latest mapping from HW team.

Change-Id: I8459749b603ccd62729fc2ef775661c6b56022c4
Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
2017-02-16 12:32:15 +05:30
Tirupathi Reddy
e186ae7318 regulator: cpr4-mmss-ldo: Correct the GFX LDO CPR sensor count for sdm630
The GFX LDO CPR sensor count in sdm630 is different from that of sdm660.
Assign the correct sensor count under a soc-id comparison check.

CRs-Fixed: 2007621
Change-Id: I82231a30143dc3df0bee3421101316c1d9693d08
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
2017-02-16 11:38:22 +05:30
Yingwei Zhao
830c802874 ARM: dts: msm: Add pmic bring up changes for SDM630 QRD
Add battery configuration, enable volume up key, and add PM660A
configuration for SDM630 QRD device.

CRs-Fixed: 2006325
Change-Id: Ifa87e30ebaced84b18c26041c0f659332266d5ee
Signed-off-by: Yingwei Zhao <cyizhao@codeaurora.org>
2017-02-16 13:42:49 +08:00
Sharad Sangle
ec4074f71e ASoC: msm: remove obsolete dolby driver
Remove the obsolete Dolby driver as it is no longer
used.

CRs-Fixed: 2007569
Change-Id: I863f2b930d579730761da7964f246c914583ef51
Signed-off-by: Sharad Sangle <assangle@codeaurora.org>
2017-02-15 21:36:56 -08:00
Liam Mark
334dad34a6 proc: fix conversion of oom_score_adj to oom_adj
Ensure that oom_score_adj values are properly converted to
oom_adj values by rounding appropriately.

When there is an attempt to calculate an oom_adj value from its
oom_score_adj value the lack of precision results in an oom_adj
value that is one less than it should be.

For example the oom_adj calculated from oom_score_adj 117 is
calculated as 1.989  (117*17 / 1000), and this is rounded to
1 (and not 2 as it should be).

By properly generating oom_adj values backward compatibility is
better supported.

Change-Id: I7f102cf445e572b8e855a9d6b0cf91e3c438eabf
Signed-off-by: Liam Mark <lmark@codeaurora.org>
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2017-02-16 10:13:46 +05:30
Sahitya Tummala
ae92a00f02 uio: fix potential use after free issue when accessing debug_buffer
The variable debug_buffer is a global variable which is allocated
and free'd when open/close is called on debugfs file -
"/sys/kernel/debug/rmt_storage/info". The current code doesn't
have locks to handle concurrent accesses to the above file.
This results into use after free issue when debug_buffer is
accessed by two threads at the same time. Fix this by adding
a mutex lock to protect this global variable.

Change-Id: I6bc3f0ae2d7fca3ca9fe8561612f5863b6c3268a
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
2017-02-15 20:22:41 -08:00
Abhijit Kulkarni
9a5cb63822 msm: mdss: fix secure session power vote
This change fixes the clock and gdsc disable for smmu.
During transitioning to secure session, smmu session
is detached but vote for clock and gdsc is not removed
since smmu hardware is still being used. So there remains
an additional vote and this renders smmu related clocks
and bimc gdsc always on when we transition back to
non-secure state. This change fixes the unbalance of this vote.

CRs-Fixed: 2004902
Change-Id: I363a4acfd17b96afc05cfe78cd9a4defba674f55
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2017-02-15 19:27:22 -08:00
Hemant Kumar
357487d342 ARM: dts: msm: Enable support for LPM Errata feature on msm8998
LPM Errata feature is enabled on dwc3 controller which has
DWC3_REVISION_300A.

Change-Id: Icec177f2bcb4ebc335e5c71550d6ce2f933c1619
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2017-02-15 18:09:49 -08:00
Satya Durga Srinivasu Prabhala
8cb928e04e soc: qcom: ramdump: Remove page alignment during ramdump collection
Due to page alignment, memory size is exceeding and SMMU fault is
observed while collecting ramdumps for ADSP subsystem.

Change-Id: Ibadedcbac4eb83382d913e893722967e86775ea0
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2017-02-15 18:03:02 -08:00
Linux Build Service Account
a66dbe8484 Merge "msm: mdss: fix Display Port boot-up with default resolution" 2017-02-15 17:01:38 -08:00
Linux Build Service Account
5b25d934a1 Merge "msm: mdss: dp: add support to parse maximum PCLK from dtsi for display port" 2017-02-15 17:01:37 -08:00
Linux Build Service Account
70d13ef76a Merge "msm: mdss: Add HDR Metadata Interface" 2017-02-15 17:01:36 -08:00
Linux Build Service Account
b574c4b1dc Merge "msm: mdss: mask DSI FIFO overflow errors during BTA operation" 2017-02-15 17:01:36 -08:00
Linux Build Service Account
c8617c203f Merge "msm: sde: Disable client driven prefetch for rotator" 2017-02-15 17:01:35 -08:00
Linux Build Service Account
726f66a1d1 Merge "qos: Add NULL checking for irq descriptor" 2017-02-15 17:01:34 -08:00
Linux Build Service Account
55563cf6f9 Merge "soc: qcom: fingerprint: keep QSEE handle in kernel space" 2017-02-15 17:01:33 -08:00
Linux Build Service Account
1b5d6ee0c0 Merge "defconfig: msm: new flag for mediabox specific demux changes" 2017-02-15 17:01:31 -08:00