Commit graph

589639 commits

Author SHA1 Message Date
Linux Build Service Account
932034e5a1 Merge "diag: Validate memory device client's process descriptor" 2017-05-04 17:44:32 -07:00
Linux Build Service Account
96a33ee792 Merge "net: pppolac/pppopns: Add back the msg_flags" 2017-05-04 17:44:31 -07:00
Linux Build Service Account
06d9001dc4 Merge "msm: ipa: Add a support to retry uC send command" 2017-05-04 17:44:30 -07:00
Trishansh Bhardwaj
50f424f032 msm: camera: Do not pass kptr in copy_from_user
Do not call copy_from_user in ioctl handler if CONFIG_COMPAT
is defined.
In 64 bit kernel and 32 bit userspace, ioctl call invokes
compat_ioctl. First copy_from_user is done in compat_ioctl then
pointer is passed to unlocked_ioctl for actual processing. In
unlocked_ioctl again copy_from_user is called on kernel pointer.

Change-Id: I2334379f48e30b58757f0fe5e238e8df5753eea8
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2017-05-05 02:32:23 +05:30
Amit Pundir
3c72862e8f ANDROID: arm64: suspend: Restore the UAO state
Upstream commit d08544127d9f ("arm64: suspend: Reconfigure PSTATE
after resume from idle") when cherry-picked on LTS linux-4.4.y
removed UAO reset code because UAO is not supported in linux-4.4.y.

But common/android-4.4 has UAO support, added in Change-Id:
I1a6a74a1f33b92d54368bd99387b55cf62930903 ("UPSTREAM: arm64: kernel:
Add support for User Access Override").

This patch pick up the UAO specific changes of upstream commit
dropped in LTS cherry-pick.

Fixes: LTS commit 71710cd35a ("arm64: suspend: Reconfigure PSTATE after resume from idle")
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2017-05-05 01:54:39 +05:30
Dedy Lansky
a51470bcae wil6210: fix array out of bounds access in pmc
Array index 'i' is used before limits check.
Fix this by doing limits check first.

Change-Id: I9a3d6f3165b3a0ba41dec3707d7c193a26ec6eb2
Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 98a830a98dab6d474190bec72c4a4ad0f7f9bf75
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-05-04 23:07:36 +03:00
Hamad Kadmany
f427d2ba1b wil6210: fix check for sparrow D0 FW file
Driver fails to load FW for sparrow D0 devices in some cases.
Fix this by returning correct value from wil_fw_verify_file_exists
when D0 FW file is not detected for any reason.

Change-Id: I11f4e63c70f0f269372e780b3659d981924c8963
Signed-off-by: Hamad Kadmany <qca_hkadmany@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 4d4f8132f72b78d1260ec9afa94c3b44deb12adf
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-05-04 23:07:35 +03:00
Lior David
f2fac4fbfb wil6210: support 8KB RX buffers
The 11ad spec requires 11ad devices to be able to receive 8KB
packets over the air. Currently this is only possible by
loading the driver with mtu_max=7912 but this also forces
a smaller block ACK window size which reduces performance
for stations which transmit normal sized packets (<2KB).
Fix this problem as follows:
1. Add a module parameter rx_large_buf that when set,
will allocate 8KB RX buffers regardless of mtu_max
setting.
2. When receiving block ACK request agree to any window
size not above our maximum, regardless of the mtu_max setting.
This means if the other side transmits small packets (2KB)
it can still set up block ACK with a large window size,
and get better performance.

Change-Id: I8d18d9306d2546b54125b77df82c984878d0f84f
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 52a457020a89158f4eb886544165dc162ca9a35e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-05-04 23:07:34 +03:00
Jordan Crouse
c0cdf12705 drm/msm: Allocate secure buffer objects
Allow the user to allocate and use secured buffer objects. Secured
buffer objects are suitable for use as a write target while the GPU
is in secure mode. They work exactly like regular buffers except
Secure buffers cannot be mmap()ed.

Change-Id: Ic0dedbadd8135fd8472b38ddf61e2bc70983b12f
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-05-04 14:07:07 -06:00
Jordan Crouse
f3cb10780a drm/msm: Support importing secure buffers
Check to see if an imported buffer is an Ion secure buffer and mark
it as such so that it can be used for secure rendering.

Change-Id: Ic0dedbadb414dcbb11d70785d61481a1b7bd4e19
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-05-04 14:07:06 -06:00
Jordan Crouse
90dbea373e ion: Add ion_dma_buf_is_secure() to query buffer type
Outside clients (such as the display or GPU) may import a dmabuf
and need to figure out if it is secure so that it can be handled
accordingly. In an ideal world this would be part of the generic
dma-buf structure but until then we can assume that the only outside
source of dmabuf-ified secure buffers is Ion so add a function to
directly query the status of the buffer from Ion.

ion_dma_buf_is_secure() returns true if the dmabuf was created
by Ion and was created from a secure heap.

Change-Id: Ic0dedbad5e5a4464c6948f05bb7e0e3e94cd4cc2
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-05-04 14:07:06 -06:00
Jordan Crouse
b2fd7c67bc drm/msm: Support secure rendering for A5XX targets
A5XX targets support GPU rendering on secured surfaces by going
into a special secure mode to execute the commands.  In secure mode
GPU rendering can only write to secure buffers that have been mapped
in an appropriately secured pagetable. In secure mode the GPU can read
both secure and unsecure buffers and the CP engine can only access
unsecured buffers (so commands do not need to be secure).

Secure buffers virtual addresses must fall into a specific range; this
is the clue to the GPU that it should use the secure pagetable
instead of the regular one.  For A5XX targets that range will start
at 0xC0000000 and be 256MB in size. All secure buffers in all processes
share the same pagetable.

Add a secure address space for A5XX targets and automatically trigger
into secure mode if any buffer in the submission is marked as secure.

Change-Id: Ic0dedbad8f7168711d10928cd1894b98f908425f
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-05-04 14:07:05 -06:00
Lazar Alexei
6cb6d7e6ed wil6210: restore power save state after internal FW reset
The power save profile is set to default state in case of FW reset,
regardless of the state before the reset took place.
Fix this by saving the current power save profile and restore it
in case of FW reset.

Change-Id: I9bcf8c4a60b72851631e25bf33a8335cffb2644f
Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 8b068c032a5cbe6f80168e0ecf2c9625c8d14d90
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
[merez@codeaurora.org: fix trivial merge conflicts]
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-05-04 23:06:57 +03:00
Blagovest Kolenichev
78cf4322e2 Merge branch 'android-4.4@24ac44d' into branch 'msm-4.4'
* refs/heads/tmp-24ac44d
  Linux 4.4.66
  ftrace/x86: Fix triple fault with graph tracing and suspend-to-ram
  ARCv2: save r30 on kernel entry as gcc uses it for code-gen
  nfsd: check for oversized NFSv2/v3 arguments
  Input: i8042 - add Clevo P650RS to the i8042 reset list
  p9_client_readdir() fix
  MIPS: Avoid BUG warning in arch_check_elf
  MIPS: KGDB: Use kernel context for sleeping threads
  ALSA: seq: Don't break snd_use_lock_sync() loop by timeout
  ALSA: firewire-lib: fix inappropriate assignment between signed/unsigned type
  ipv6: check raw payload size correctly in ioctl
  ipv6: check skb->protocol before lookup for nexthop
  macvlan: Fix device ref leak when purging bc_queue
  ip6mr: fix notification device destruction
  netpoll: Check for skb->queue_mapping
  net: ipv6: RTF_PCPU should not be settable from userspace
  dp83640: don't recieve time stamps twice
  tcp: clear saved_syn in tcp_disconnect()
  sctp: listen on the sock only when it's state is listening or closed
  net: ipv4: fix multipath RTM_GETROUTE behavior when iif is given
  l2tp: fix PPP pseudo-wire auto-loading
  l2tp: take reference on sessions being dumped
  net/packet: fix overflow in check for tp_reserve
  net/packet: fix overflow in check for tp_frame_nr
  l2tp: purge socket queues in the .destruct() callback
  net: phy: handle state correctly in phy_stop_machine
  net: neigh: guard against NULL solicit() method
  sparc64: Fix kernel panic due to erroneous #ifdef surrounding pmd_write()
  sparc64: kern_addr_valid regression
  xen/x86: don't lose event interrupts
  usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize
  regulator: core: Clear the supply pointer if enabling fails
  RDS: Fix the atomicity for congestion map update
  net_sched: close another race condition in tcf_mirred_release()
  net: cavium: liquidio: Avoid dma_unmap_single on uninitialized ndata
  MIPS: Fix crash registers on non-crashing CPUs
  md:raid1: fix a dead loop when read from a WriteMostly disk
  ext4: check if in-inode xattr is corrupted in ext4_expand_extra_isize_ea()
  drm/amdgpu: fix array out of bounds
  crypto: testmgr - fix out of bound read in __test_aead()
  clk: sunxi: Add apb0 gates for H3
  ARM: OMAP2+: timer: add probe for clocksources
  xc2028: unlock on error in xc2028_set_config()
  f2fs: do more integrity verification for superblock
  net: pppolac/pppopns: Add back the msg_flags

Conflicts:
	drivers/regulator/core.c

Change-Id: I8e7b279efa442a0338ee735d27ff3ebe866a8dee
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2017-05-04 13:06:18 -07:00
Hamad Kadmany
60e1252f7d wil6210: fix sequence for scan-abort during reset
Communication with FW must be done before wil->status
is initialized in order to properly handle cases where
communication with FW halts during reset sequence.

Change-Id: Ia9b74143b45ae3c83a36a7c2f18b16794e5a2c57
Signed-off-by: Hamad Kadmany <qca_hkadmany@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 82e9f646555442d63e47155171592ee790275ea3
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-05-04 22:38:13 +03:00
Harsh Sahu
663e995012 msm: mdss: fix null pointer dereferencing
Current driver checks if the address of start pointer is zero. But
in cases when start pointer is NULL this check will result in null
pointer dereferencing. This change adds an additioanl check on the
start pointer to avoid null pointer dereferencing.

CRs-fixed: 2035100
Change-Id: Ic86c9e73cd676cbf8680f5b7266ee3829f4ccbd2
Signed-off-by: Harsh Sahu <hsahu@codeaurora.org>
2017-05-04 11:21:11 -07:00
Rajkumar Subbiah
9cf8bad48b msm: mdss: Relocate timing flush for avr vtotal setup
The AVR vtotal setup is done during ctl start. Since the slave
ctl is not yet setup, currently the master and slave controls
get flushed independently even though it is a split display
setup. Instead, just set a flag and then do the actual flush
as part of commit when the controls are properly setup.

Change-Id: I8eb1693c9a3a6404d28a82cab9a9f0ce58d1bb03
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2017-05-04 10:32:25 -07:00
Tony Truong
821a04092d msm: pcie: move PCIe enumerate sysfs init
PCIe enumerate sysfs initialization should be
done after all other resources are setup.

Change-Id: I33b43e39453eeee9ac9e22bd1a5463af9eb1fd05
Signed-off-by: Tony Truong <truong@codeaurora.org>
2017-05-04 10:17:39 -07:00
Linux Build Service Account
baf0fa8f1e Merge "wil6210: add option to ignore OTA regulatory hints" 2017-05-04 08:45:27 -07:00
Linux Build Service Account
da84e26540 Merge "ion:synchronize debugfs callback and ion_client_destroy" 2017-05-04 08:45:26 -07:00
Linux Build Service Account
303fb8a3ac Merge "btfm: Program multi channel registers in wcn3990 for Tx/Rx" 2017-05-04 08:45:25 -07:00
Linux Build Service Account
2cba763104 Merge "regulator: onsemi-ncp6335d: Add is_enabled API support" 2017-05-04 08:45:24 -07:00
Linux Build Service Account
a18fb0347b Merge "drm/msm: Fix the SNAPSHOT_HEADER macro" 2017-05-04 08:45:23 -07:00
Linux Build Service Account
66e4265f1d Merge "fs/mbcache: fix use after free issue in mb_cache_shrink_scan()" 2017-05-04 08:45:21 -07:00
Linux Build Service Account
6b10165796 Merge "ARM: dts: msm: Add batt_therm coefficients for QRD SDM660/630" 2017-05-04 08:45:20 -07:00
Linux Build Service Account
34c8633819 Merge "qbt1000: Initialize drvdata structure before usage" 2017-05-04 08:45:19 -07:00
Linux Build Service Account
b1abf6c73c Merge "qbt1000: Validate FP app name before qseecom_start_app" 2017-05-04 08:45:18 -07:00
Linux Build Service Account
8a82f9c18a Merge "msm: mdss: Add plane_count range check in mdss WFD" 2017-05-04 08:45:11 -07:00
Linux Build Service Account
af19d5218d Merge "msm: mdss: Add plane_count limit check for mdss_rotator buffer" 2017-05-04 08:45:10 -07:00
Linux Build Service Account
0e19770cb1 Merge "ARM: dts: msm: enable SMMU stage1 for 11AD devices on msm8998" 2017-05-04 08:45:09 -07:00
Linux Build Service Account
2fa5ce1a0a Merge "ASoC: msm: qdsp6v2: Add routing controls for fm over mi2s" 2017-05-04 08:45:08 -07:00
Linux Build Service Account
64b33916d2 Merge "ASoC: sdm660_cdc: Avoid unclocked register access to digital codec" 2017-05-04 08:45:07 -07:00
Linux Build Service Account
17178c9391 Merge "msm: ipa3: configure WLAN resource group on connect" 2017-05-04 08:45:05 -07:00
Gopikrishna Mogasati
b18e24a6f4 diag: Validate memory device client's process descriptor
This fix checks for valid process descriptor of a
memory device client before exporting information
from diag driver to memory device client's read buffer
for reliable data transfer.

CRs-Fixed: 2016396
Change-Id: I45aeb8fc9e2f6a678d48bbfcbb77c501adbbfce0
Signed-off-by: Gopikrishna Mogasati <gmogas@codeaurora.org>
2017-05-04 20:46:47 +05:30
Utkarsh Saxena
8a834f9977 msm: ipa: Add a support to retry uC send command
For the status IPA_HW_2_CPU_WDI_RX_FSM_TRANSITION_ERROR,
receive from the uC, add a logic to retry sending the same
command for maximum of 10 retires.

Change-Id: I4b241311e0699aea0e24b3a279622a8a1aaa737d
Acked-by: Mohammed Javid <mjavid@qti.qualcomm.com>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
2017-05-04 16:27:52 +05:30
Abhishek Kondaveeti
687c848007 msm: isp: Fix isp recovery mechanism
Check for overflow error in pagefault handler and
proceed with recovery if pagaefault is the result
of the overflow.

Change-Id: Ib57777151d48c78ca8dc9984b4b823e62a621db8
Signed-off-by: Abhishek Kondaveeti <akondave@codeaurora.org>
2017-05-04 03:54:54 -07:00
Manish Dewangan
c6911c81c2 ASoC: msm: qdspv2: Add mixer controls for drift query
Add mixer control to query drift avtimer vs device(speaker,
headset, BT) drift.

CRs-Fixed: 2036899
Change-Id: I1cd8d2faf278faabaa9861953027ceb38eda4d25
Signed-off-by: Manish Dewangan <manish@codeaurora.org>
2017-05-04 03:12:48 -07:00
Satish Kodishala
413d2ae9fe btfm: Program multi channel registers in wcn3990 for Tx/Rx
For A2DP/SCO Rx, SCO/FM Tx use cases, we need to program
multi channel registers. Without this there would be
glitches and random silence during A2DP playback.

While at it, add the function name to the debug print macro.

CRs-Fixed: 2027268
Change-Id: Ia8e5fde48bb94e97346fe323e92dc32ed60b0e65
Signed-off-by: Satish Kodishala <skodisha@codeaurora.org>
2017-05-04 02:19:39 -07:00
Neil Zhang
2136b67dc6 ion:synchronize debugfs callback and ion_client_destroy
There are race condition B/T ion_client_destroy and debugfs callbacks.
Let's use a mutex to synchronize them.

Change-Id: I3373dc1dbb551b615105a485cc2d3c4bcc0e5e99
Signed-off-by: Neil Zhang <neilzhang1123@hotmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 948c4db4ee10d85fe78ed3755dcaeb85cd37a148
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[guptap@codeaurora.org: resolve trivial merge conflicts and
 change usage of %p with %pK]
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
2017-05-04 14:45:01 +05:30
Prakash Gupta
026cbd8d2a ion: revert downstream fix for debugfs synchronization
revert msm specific changes conflicting with commit I3373dc1dbb5
("ion:synchronize debugfs callback and ion_client_destroy")

- revert commit I7bc7562400d ("ion: destroy ion handles under
  client->lock")
- revert commit Ic4c2f9dff90 ("ion: validate ion client in
  ion_debug_client_show() and extract data")
- revert dev->lock usage in ion_debug_heap_show.

Change-Id: Iba5f527b57f39d628b8cd833f627481cc56f6617
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
2017-05-04 14:45:01 +05:30
Sachin Bhayare
c25dba2a0b msm: mdss: add support for mdss throttle clock handling
Update mdss throttle clock status based on status of display.

Change-Id: Ife21df0c570240c075f039b8d49514bb323021da
Signed-off-by: Sachin Bhayare <sachin.bhayare@codeaurora.org>
2017-05-04 02:07:22 -07:00
Sachin Bhayare
e0fa41a434 ARM: dts: msm: add mdss throttle clock for SDM660 and SDM630
Add mmss_throttle_mdss_axi clock in MDSS clock list
for SDM660 and SDM630.

Change-Id: Iadc58ab163101bce81c255646742f27d3e848cda
Signed-off-by: Sachin Bhayare <sachin.bhayare@codeaurora.org>
2017-05-04 02:06:36 -07:00
Kiran Gunda
8f48ec6a5a regulator: onsemi-ncp6335d: Add is_enabled API support
Without is_enabled function support, regualtor framework treats
it as an always on regulator and does not invoke the regulator enable
function call. Hence, add support for it.

Also, define a parent supply ("vin") for the regulator. This parent
can be used to pin-control the regulator. While at it, change the initcall
level to subsys_init. so that the driver registers after the parent supply
("vin" - provided by fixed-regualtor).

Change-Id: I93e870d2e4b89f7874c3e17be91bc417dadf1777
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2017-05-04 14:33:41 +05:30
Xiaojun Sang
87cac622d8 ASoC: msm: enhance ADSP Stream Callback
Implement FIFO queue for multiple callback events. Events are
cleaned at stream close.

Change-Id: Id738326a20613d2f939e45204b2d46448a5b4759
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2017-05-04 15:21:27 +08:00
Abhishek Kondaveeti
07869d3af8 msm: isp: Fix pdaf buffer drop
Use common data accessible to both ISPs to
store pdaf buffer index

Change-Id: I27d33eaa8bc517250503bdb0e9267e94180a99f0
Signed-off-by: Abhishek Kondaveeti <akondave@codeaurora.org>
2017-05-03 23:32:30 -07:00
Linux Build Service Account
2db428de0b Merge "drm/msm: Add preemption records to QTI GPU snapshot" 2017-05-03 23:32:11 -07:00
Linux Build Service Account
48a0c93e1d Merge "msm: camera: ispif: extend interface with line width" 2017-05-03 23:32:10 -07:00
Linux Build Service Account
6669dae7d1 Merge "msm: camera: Allow driver file to be opend only once." 2017-05-03 23:32:08 -07:00
Linux Build Service Account
a1e1d01429 Merge "msm: camera2: cpp: Fix out-of-bounds frame or command buffer access" 2017-05-03 23:32:06 -07:00
Linux Build Service Account
9d0c2b4690 Merge "iommu/iommu-debug: Add validation support for per-buffer coherent mappings" 2017-05-03 23:32:05 -07:00