Commit graph

595592 commits

Author SHA1 Message Date
Linux Build Service Account
517f7db9b0 Merge "net: cnss2: restore pci config space before enable device" 2017-12-14 00:14:38 -08:00
Linux Build Service Account
bd5f048ed1 Merge "power: smb-lib: fix OTG enable error handling" 2017-12-14 00:14:37 -08:00
Linux Build Service Account
4f3110700c Merge "ion: ensure CMO target is valid" 2017-12-14 00:14:35 -08:00
Venkateswara Rao Tadikonda
cd2f67b4b3 drm/mm: Fix NULL pointer dereference in allocator
While searching for first hole (get_first_hole) and next free hole
(get_next_hole) from rbtree, rb_first() and rb_next() functions may
return NULL pointer. A NULL pointer check can avoid the NULL pointer
dereference.

Change-Id: I21c918fff3ae995a9d8b2201030401d80ed1fd9e
Signed-off-by: Venkateswara Rao Tadikonda <vtadik@codeaurora.org>
2017-12-14 11:47:46 +05:30
Satya Krishna Pindiproli
1e78a00797 ARM: dts: msm: add support for TDM interfaces on msm8996 MTP
Add TDM interface DAIs and corresponding GPIO changes
to support TDM on msm8996 MTP.

Change-Id: Ifcf6995c61a0a74ffa205d64d2d797255c978c41
Signed-off-by: Satya Krishna Pindiproli <satyak@codeaurora.org>
2017-12-14 11:45:15 +05:30
Satya Krishna Pindiproli
bdb77404d8 ASoC: msm: add TDM interface changes for 8996
Add documentation and TDM interface changes in msm8996
machine driver to support TDM on msm8996 MTP.

Change-Id: I5ae3c491a57c400deb6a2574ef0e1be90f7f0000
Signed-off-by: Satya Krishna Pindiproli <satyak@codeaurora.org>
2017-12-14 11:45:14 +05:30
Camus Wong
cb1d7b1c76 ARM: dts: msm: enable drm msm-hyp driver for msm8996
Enable virtual kernel drm driver for hypervisor environment for msm8996.

Change-Id: I6305e088e4b844d3f7dfe1620bd6d68cdaf6432f
Signed-off-by: Camus Wong <camusw@codeaurora.org>
2017-12-13 12:45:14 -05:00
Camus Wong
822f9b4e0b drm/msm-hyp: new virtual msm driver
This driver is enabled on hypervisor builds for the purpose of
creating a DRM device that DRM Master can open and listen on for
VBlank and Page Flip events.

Change-Id: Ib9b2df5ae0e2c33145663b3f515595e8f433a850
Signed-off-by: Camus Wong <camusw@codeaurora.org>
2017-12-13 12:37:20 -05:00
Asutosh Das
09460e0138 scsi: ufs: Trigger runtime-idle in a separate work
In case of an exception, there could be a deadlock:

-000|__switch_to()
-001|context_switch(inline)
-001|__schedule()
-002|schedule()
-003|schedule_timeout()
-004|do_wait_for_common(inline)
-004|__wait_for_common(inline)
-004|wait_for_common()
-005|wait_for_completion()
-006|destroy_work_on_stack(inline)
-006|flush_work()
-007|ufshcd_suspend()
-008|ufshcd_runtime_suspend()
-009|ufshcd_pltfrm_runtime_suspend()
-010|pm_generic_runtime_suspend()
-011|__rpm_callback(inline)
-011|rpm_callback()
-012|rpm_suspend()
-013|rpm_idle()
-014|__pm_runtime_idle()
-015|ufshcd_exception_event_handler()
-016|__read_once_size(inline)
-016|static_key_count(inline)
-016|static_key_false(inline)
-016|trace_workqueue_execute_end(inline)
-016|process_one_work()
-017|__read_once_size(inline)
-017|list_empty(inline)
-017|worker_thread()
-018|kthread()
-019|ret_from_fork(asm)

This is caused because in exception handler
pm_runtime_put_sync is invoked which calls ufshcd_suspend.
And ufshcd_suspend flushes the exception handler work
& deadlocks.
Hence, schedule the suspend work in a different context.

Change-Id: I02524cee5ab2b64e0ad5de873d5318aef7b6ac95
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
2017-12-13 05:54:21 -08:00
Binoy Jayan
0bb9cafcb6 ARM: dts: msm: Override vendor node entires in fstab for MSM8996ProAU
Override the property fsmgr_flags by adding the options verify and
slotselect for the vendor node in the fstab so that A/B is enabled and the
partition is verified by the device mapper target dm-verity. Also delete
the system node from the fstab as it is already mounted by the kernel.

Change-Id: Ib65f1d261c95b995f3999ba24517a69488346ca9
Signed-off-by: Binoy Jayan <bjayan@codeaurora.org>
2017-12-13 19:17:23 +05:30
Venkateswara Rao Tadikonda
e90990f5b1 drm/msm: Set proper GEM address space range for drm mm allocator
GEM address space range provided to drm mm allocator is not correct.
Start address and size of the address space should be passed to drm mm
initializer. Instead of size, end address of address space range is
passed to drm mm initializer.
msm_gem_get_iova() returns 0, even if memory mapping to virtual
address space is failed. Return proper error value to user space
driver incase of error.

Change-Id: I356a63b873094cb465909437dcdab9513e27b7ff
Signed-off-by: Venkateswara Rao Tadikonda <vtadik@codeaurora.org>
2017-12-13 15:23:34 +05:30
Zhiqiang Tu
8ad90a90e5 clk: msm: virtual clock adds support for usb, lpass and modem
Support usb, lpass and modem clocks in msm8996 virtual clock
frontend driver.

Change-Id: I5ee4f2d951f133a8403442707e633563efdc5c65
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2017-12-13 17:26:22 +08:00
Zhiqiang Tu
3b6fb95da8 ARM: dts: msm: blsp and sdhci switch to virtual clock on msm8996 vplatform
Enable virtual clock for uart, spi, i2c and sdhci.

Change-Id: Id0dd32c520eeb956390fb1e0e1a4f762c6ae47f9
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2017-12-13 17:12:55 +08:00
Sai Krishna Juturi
ff9900827c dwc3-msm: Notify proper current values in case of floating charger
Currently our driver is notifying ETIMEDOUT to PMIC
incase of floating charger. Consider if we are inserting
an SDP charger slowly that time also we will detect
it as floating charger then also we are notifying
ETIMEDOUT irrespective of current that is notified from
gadget driver. Hence notify charging current properly
if enumeration happens even in case of
floating charger so that PMIC can update real charger
type to SDP

Signed-off-by: Sai Krishna Juturi <jsaikrishna@codeaurora.org>
Change-Id: Ibeeeafac0834c9df7099a3f0bad274ddb393de47
2017-12-13 00:54:13 -08:00
Linux Build Service Account
2e1be1a230 Merge "smb1351: add MODEL_NAME property in parallel power_supply" 2017-12-12 19:00:52 -08:00
Linux Build Service Account
627a89f9ea Merge "ARM: dts: msm: Change rh850 interrupt to gpio_122 on auto cdp boards" 2017-12-12 19:00:50 -08:00
Linux Build Service Account
71de11b9ad Merge "soc: qcom: pil: NULL check before pil_memset_io" 2017-12-12 19:00:49 -08:00
Linux Build Service Account
1ad856e85a Merge "drivers: lmh_dcvsh: Defer cluster cooling register until core comes online" 2017-12-12 19:00:48 -08:00
Linux Build Service Account
8063b54c23 Merge "usb: pd: qpnp-pdphy: move RX handling to hard IRQ" 2017-12-12 19:00:46 -08:00
Linux Build Service Account
d8a4ce0406 Merge "usb: pd: qpnp-pdphy: Remove rx_busy flag" 2017-12-12 19:00:45 -08:00
Linux Build Service Account
74a7a32d3e Merge "defconfig: msm: Enable CONFIG_INET_LRO" 2017-12-12 19:00:44 -08:00
Blagovest Kolenichev
3bda2b55b4 Merge android-4.4.96 (aed4c54) into msm-4.4
* refs/heads/tmp-aed4c54
  Linux 4.4.96
  Revert "drm: bridge: add DT bindings for TI ths8135"
  ecryptfs: fix dereference of NULL user_key_payload
  x86/microcode/intel: Disable late loading on model 79
  regulator: fan53555: fix I2C device ids
  can: kvaser_usb: Ignore CMD_FLUSH_QUEUE_REPLY messages
  can: kvaser_usb: Correct return value in printout
  can: sun4i: fix loopback mode
  scsi: sg: Re-fix off by one in sg_fill_request_table()
  scsi: zfcp: fix erp_action use-before-initialize in REC action trace
  assoc_array: Fix a buggy node-splitting case
  Input: gtco - fix potential out-of-bound access
  Input: elan_i2c - add ELAN0611 to the ACPI table
  xen/gntdev: avoid out of bounds access in case of partial gntdev_mmap()
  fuse: fix READDIRPLUS skipping an entry
  spi: uapi: spidev: add missing ioctl header
  usb: xhci: Handle error condition in xhci_stop_device()
  ceph: unlock dangling spinlock in try_flush_caps()
  ALSA: hda - fix headset mic problem for Dell machines with alc236
  ALSA: hda/realtek - Add support for ALC236/ALC3204
  workqueue: replace pool->manager_arb mutex with a flag
  sched: EAS: upmigrate misfit current task
  sched: avoid pushing tasks to an offline CPU
  sched: Extend active balance to accept 'push_task' argument
  Revert "sched/core: Warn if ENERGY_AWARE is enabled but data is missing"
  Revert "sched/core: fix have_sched_energy_data build warning"
  FROMLIST: kbuild: clang: fix build failures with sparse check
  Revert "Revert "UPSTREAM: efi/libstub/arm64: Set -fpie when building the EFI stub""
  BACKPORT: efi/libstub: Unify command line param parsing

Conflicts:
	drivers/usb/host/xhci-hub.c
	kernel/sched/core.c
	kernel/sched/fair.c

Change-Id: Ie36ce5de516f02b2d553043009d9afee64e7ff24
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2017-12-12 14:25:27 -08:00
Linux Build Service Account
d3c7ac7bed Merge "ARM: dts: msm: Set values for MDM shutdown and reset on msm8996 CV2X" 2017-12-11 22:33:57 -08:00
Linux Build Service Account
d9c1b8a6cd Merge "defconfig: arm64: fsm: Modify configs for FSM" 2017-12-11 22:33:56 -08:00
Linux Build Service Account
4b6e73e162 Merge "pwm: pwm-qpnp: Enable glitch removal after PWM enabled" 2017-12-11 22:33:54 -08:00
Linux Build Service Account
ffd7c808d4 Merge "clk: msm: Add virtual clock frontend driver" 2017-12-11 22:33:53 -08:00
Linux Build Service Account
f9b45a286f Merge "usb: pd: Send pending VDM message upon entering SNK/SRC_Ready" 2017-12-11 22:33:52 -08:00
Vignesh Kulothungan
8e69145311 msm: Array bounds check for buffer index
Check the ASM buffer index boundary before using it
to access the buffer to avoid out of array bounds error.

CRs-Fixed: 2145996
Change-Id: I97ad482dec0803debd01f19a9aeb531090fc1644
Signed-off-by: vigneshk <vigneshk@codeaurora.org>
2017-12-11 17:48:18 -08:00
Lijuan Gao
25c63fa374 drivers: power: reset: Do cold reset when doing oem reboot
As the IMEM approach to store reset reason is deprecated, so use
the spare register in PMIC power-on peripheral to store the oem
restart reason.

Bit-2 to bit-7 of SOFT_RB_SPARE for hard reset reason, so divide
existing range into regions, value 0 to 31 for common defined features
and 32 to 63 values are for OEMs/ODMs specific features.

Change-Id: Ib8e64d6dd5a335325d0469280e41e9d10ec9b893
Signed-off-by: Lijuan Gao <lijuang@codeaurora.org>
2017-12-11 19:11:18 +08:00
Ashay Jaiswal
379e518573 power: smb-lib: fix OTG enable error handling
Fix OTG enable error path and drop stale votes
on USB_ICL votable.

Change-Id: Ia0fce0ef75bb83ece72cc6a5a8f294b2500a0166
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2017-12-11 00:35:47 -08:00
Swetha Chikkaboraiah
59bea78942 soc: qcom: pil: NULL check before pil_memset_io
In existing implementation if vmap fails device panics for
NULL pointer access while doing pil_memset_io.
Instead check for the NULL pointer.

Change-Id: I1b9fd084a8c168b70f6e01134e4122445e4873b4
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
2017-12-10 06:31:30 -08:00
Subbaraman Narayanamurthy
560b4a9dfb leds: qpnp-flash-v2: Return error code separately during current prediction
Currently when the maximum available current per flash switch is
calculated, it is returned along with the error code. This will
be confusing when a real error occurs. Fix this by returning
error code separately and obtain the current by passing it by
reference.

Change-Id: I9e2a3436e19cc37319316603e6dfa45241df8a49
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-12-08 15:43:09 -08:00
Yasir Malik
5823aba1e3 defconfig: arm64: fsm: Modify configs for FSM
* Enable POSIX message queues
* Disable ANDROID_PARANOID_NETWORK
* Disable IPC_ROUTER_SECURITY
* Disable unnecessary drivers:
  - Graphics
  - Sound
  - Bluetooth
  - Wireless LAN
  - Most input devices

Change-Id: I134e94ad21ed2d9c8f247b5c1523510cdd9ecb0a
CRs-Fixed: 2130054
Acked-by: Jennifer L. Zenner <jzenner@qti.qualcomm.com>
Signed-off-by: Yasir Malik <ymalik@codeaurora.org>
2017-12-08 15:41:25 -05:00
Jack Pham
37800a3576 usb: pd: qpnp-pdphy: move RX handling to hard IRQ
For improved performance, move RX handling from a thread to
a hard IRQ handler. This helps to decrease the chance of missing
incoming back-to-back messages (e.g. Accept -> PS_Ready following
a successful power request) due to the pending RX token in case
the IRQ thread is delayed due to high system load. policy_engine
needs to perform the buffer allocation with the GFP_ATOMIC flag.

Change-Id: Iacb2623280f1ac4de9f483a8abbf5dc055041be7
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2017-12-08 11:03:08 -08:00
Linux Build Service Account
aaf4841e27 Merge "defconfig: Add android-verity support for system" 2017-12-08 02:17:02 -08:00
Linux Build Service Account
31db7c5faa Merge "ARM: dts: msm: Add NTN_CLK_SYNC pin for msm8996 agave and auto cdp board" 2017-12-08 02:17:01 -08:00
Linux Build Service Account
4d55e87218 Merge "ARM: dts: msm: Disable PCIe L1 and L1ss for msm8996 CV2X" 2017-12-08 02:17:00 -08:00
Linux Build Service Account
4611ba9cda Merge "diag: Free the memory in diagfwd_peripheral_exit()" 2017-12-08 02:16:59 -08:00
Zhiqiang Tu
292371d2c1 clk: msm: Add virtual clock frontend driver
It is virtual clock frontend driver which communicates
with host backend clock service/driver over HABMM. It
only supports msm8996 virtual platform currently.

Change-Id: Icfee28c301fa4a583b45e5d364432535643eb9b7
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2017-12-08 15:14:17 +08:00
Jack Pham
4739afbe49 usb: pd: qpnp-pdphy: Remove rx_busy flag
Having this flag was causing PD TX messages to incorrectly
get blocked in the case where the policy engine state machine
worker got scheduled to run in the RX IRQ, but before the
handler exits and clears the flag. This caused false errors
that an RX message is pending. Remove usage of this flag as
it was doing more harm than good.

Change-Id: Iffccfc9ffafac6017192d86d8d97d5534890c7b5
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2017-12-07 22:40:02 -08:00
Jack Pham
37d3ef23d6 usb: pd: Avoid blocking wait in SRC_TRANSITION_TO_DEFAULT
When sending/receiving a hard reset in source mode, the
PE_SRC_TRANSITION_TO_DEFAULT state turns off VBUS/VCONN and
sleeps for 750ms. During this fairly long period any Type-C
event such as cable disconnect or reconnect won't get
processed as the workqueue is blocked by this wait condition.
This can lead to incorrect state handling, for example when
a sink is removed and a source is attached; the state machine
will think a sink is still attached. Fix this by removing
the msleep() and set a timer to restart the state machine
to PE_UNKNOWN which will turn VBUS/VCONN back on and start
again in PE_SRC_STARTUP. This frees up the workqueue to
process any potential incoming events in the meantime.

Change-Id: I282551a58252a672f319d1559eac9f4ad4c3ca8a
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2017-12-07 22:39:30 -08:00
Jack Pham
e5f8604fdb usb: pd: Send pending VDM message upon entering SNK/SRC_Ready
Entering SNK_Ready or SRC_Ready state from usbpd_set_state()
is somewhat terminal as it is the end state of a contract
negotiation. If there was a previous pending VDM message
waiting to be sent, for example the start of a Discovery which
was queued prior to a PR Swap, it would not get sent. Check for
this and enqueue usbpd_sm once again so that it could be sent
out. Otherwise, start the Discovery process in case we are
in DFP mode, and do that for SNK_Ready as well.

Change-Id: I4516ccb0deec8cdabdb62d539d7d2b66dc23f1ee
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2017-12-07 22:38:23 -08:00
Binoy Jayan
7c1908b242 defconfig: Add android-verity support for system
Add android-verity support so that the system image is verified by
the kernel during the boot time. Also set the x509 key file to be
used for verification.

Change-Id: I17ffc2944ef9af556d9fdc05d62734de384dc27c
Signed-off-by: Binoy Jayan <bjayan@codeaurora.org>
2017-12-07 20:23:58 -08:00
Subbaraman Narayanamurthy
54512a7f41 power: qpnp-fg-gen3: Update ESR filter coefficients for low temperature
As per the hardware recommendation, update ESR tight and broad
filter coefficients for low temperature (< 10 C) to 3 %.

CRs-Fixed: 2155610
Change-Id: I7e5a77bcd14ad64459f6bd13f0be0551dcbefdba
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-12-07 19:13:44 -08:00
Manaf Meethalavalappu Pallikunhi
c92c942292 drivers: lmh_dcvsh: Defer cluster cooling register until core comes online
If all cores for a cluster are offline or not brought up during
lmh dcvsh probe, it fails to register cooling device and it leads
to probe failure. If later these cores come online, lmh dcvsh doesn't
re-probe it and eventually that cluster lmh dcvsh is broken.

Register for cpu online notification and register cpu cooling device
in cpu online notification callback context. It makes sure that
both lmh dcvsh probing and cooling device register are proper.

Change-Id: Id5345a578aab920d12bd9d9e2ccf1d5059582de9
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2017-12-08 06:22:35 +05:30
Alex Yakavenka
e6b1de7b75 ARM: dts: msm: Change rh850 interrupt to gpio_122 on auto cdp boards
rh850_2_apq interrupt is connected to gpio_122 on auto cdp boards

CRs-Fixed: 2009305
Change-Id: Id60ec07a7bc4757050ad2a1c39123ec561581082
Signed-off-by: Alex Yakavenka <ayakav@codeaurora.org>
2017-12-07 14:19:46 -08:00
Poddar, Siddarth
5deec16a13 defconfig: msm: Enable CONFIG_INET_LRO
WLAN module supports LRO, so enable CONFIG_INET_LRO for SDM660.
Remove it from defconfig to enable as Kconfig has default set to enable.

Change-Id: I5681c47caa18931ab1a3ea2b09c3a1f9abc38777
CRs-Fixed: 2144533
Signed-off-by: Poddar Siddarth <siddpodd@codeaurora.org>
2017-12-07 05:01:34 -08:00
Zou Shunxiang
92d3ea4649 ARM: dts: msm: Add NTN_CLK_SYNC pin for msm8996 agave and auto cdp board
NTN_CLK_SYNC line should be set low before bringing Neutrino out
of reset for msm8996 agave board and auto CDP board.

Change-Id: I7b213a7dad2dbdedd3fe42a88972dc36cbf2e5b5
Signed-off-by: Zou Shunxiang <shunxian@codeaurora.org>
2017-12-07 01:15:41 -08:00
Linux Build Service Account
7099c46a66 Merge "wcnss: fix the potential buffer overflow in wlan ctrl data process" 2017-12-06 07:00:32 -08:00
Linux Build Service Account
69aa4ae8d7 Merge "icnss: Reject driver reinit request when FW is down" 2017-12-06 07:00:31 -08:00