Commit graph

590705 commits

Author SHA1 Message Date
Linux Build Service Account
1d64abeedd Merge "drm/msm: Fix potential buffer overflow issue" 2017-05-31 17:57:57 -07:00
Linux Build Service Account
31069443cb Merge "msm: sde: Reset the iommu_attached flag after detach" 2017-05-31 17:57:56 -07:00
Linux Build Service Account
92526da423 Merge "msm: ais: cpp fix to check zero length ioctl" 2017-05-31 17:57:55 -07:00
Linux Build Service Account
35ca83d6a7 Merge "msm: camera: clean up buffers before detach" 2017-05-31 17:57:55 -07:00
Abhijeet Dharmapurikar
35b0ff80d1 smb-lib: change debounce time to 20mS while in pr_swap
We observe that while PR_SWAP is done from PD stack, the typeC
block could be running its tCC debounce timer. This causes the
driver to prematurely declare that the cable is removed.

Fix this by reducing the tCC debounce time to 20mS while in
PR_SWAP.

Change-Id: Ie8b3628cd6931ff2da92d95c153d0d2c7ddb20b2
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-05-31 17:04:26 -07:00
Prasad Sodagudi
0958ceaaf4 drivers: Warning fixes to disable CC_OPTIMIZE_FOR_SIZE
These are all driver changes needed for disablement of
CONFIG_CC_OPTIMIZE_FOR_SIZE. CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
is enabled by default once CONFIG_CC_OPTIMIZE_FOR_SIZE is disabled.

Change-Id: Ia46a1f24e8a082a29ea6151e41e6d3a85a05fd4f
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Sridhar Parasuram <sridhar@codeaurora.org>
2017-05-31 16:51:47 -07:00
Sushmita Susheelendra
48d9d351eb drm: Remove redundant variable assignment
The variable 'end' is computed twice. Remove the
redundant assignment.

Change-Id: I79802b5f08aa10146b113d14ab40f33f6fefe6dc
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2017-05-31 17:33:11 -06:00
Chris Wilson
ffc435160c drm: Declare that create drm_mm nodes with size 0 is illegal
At a higher level, all objects are created with definite size i.e. 0 is
illegal. In forthcoming patches, this assumption is dependent upon in
the drm_mm range manager, i.e. trying to create a drm_mm node with size
0 will have undefined behaviour. Add a couple of WARNs upon creating the
drm_mm node to prevent later bugs.

Change-Id: Ieb81a8ef5a05a32dd37dfc040ea3f78243b59161
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1470248788-30873-1-git-send-email-chris@chris-wilson.co.uk
Git-commit: aafdcfd3f9aa3c9f77ae4e9385f21bf9ae120d3e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2017-05-31 17:33:10 -06:00
Chris Wilson
e4cf5a0425 drm: Skip initialising the drm_mm_node->hole_stack
As we always add this to the drm_mm->hole_stack as our first operation,
we do not need to initialise the list node.

Change-Id: If2e9e06141bdb9a9411ef875cb83e41a48e5f1a9
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1470236651-678-3-git-send-email-chris@chris-wilson.co.uk
Git-commit: a787900564ffc6eebbcb7086b45e04a0bc3370f0
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2017-05-31 17:33:09 -06:00
Chris Wilson
32d840be56 drm: Track drm_mm nodes with an interval tree
In addition to the last-in/first-out stack for accessing drm_mm nodes,
we occasionally and in the future often want to find a drm_mm_node by an
address. To do so efficiently we need to track the nodes in an interval
tree - lookups for a particular address will then be O(lg(N)), where N
is the number of nodes in the range manager as opposed to O(N).
Insertion however gains an extra O(lg(N)) step for all nodes
irrespective of whether the interval tree is in use. For future i915
patches, eliminating the linear walk is a significant improvement.

v2: Use generic interval-tree template for u64 and faster insertion.

Change-Id: Iddcb7891480ca7d6e0469c8d394fcd1962ed4583
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1470236651-678-1-git-send-email-chris@chris-wilson.co.uk
Git-commit: 202b52b7fbf70858609ec20829c7d69a13ffa351
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2017-05-31 17:33:09 -06:00
Sushmita Susheelendra
9c0d1dc8c0 drm/msm: Separate locking of buffer resources from struct_mutex
Buffer object specific resources like pages, domains, sg list
need not be protected with struct_mutex. They can be protected
with a buffer object level lock. This simplifies locking and
makes it easier to avoid potential recursive locking scenarios
for SVM involving mmap_sem and struct_mutex. This also removes
unnecessary serialization when creating buffer objects, and also
between buffer object creation and GPU command submission.

Change-Id: I40cb437d0186c3d9aac365c9baba0aa4792f0aa1
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2017-05-31 17:33:08 -06:00
Sujeev Dias
66551f19b5 mhi: core: Only allow registration if channel is supported by endpoint.
Not all endpoints support all channels supported by MHI host. Only allow
clients to register if requested channel is supported by endpoint.

CRs-Fixed: 2053250
Change-Id: Ib4bd8d21b8f43d693da30b8fafe2cb9d2e128a17
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
2017-05-31 14:07:31 -07:00
Sujeev Dias
6491d72c2a mhi: core: Fix memory leak in MHI DE_INIT
During MHI INIT, memory is allocated for firmware and
rddm vector table. This memory is not freed when DE_INIT
is called.

CRs-Fixed: 2053206
Change-Id: I85b2644189915dd25d8ac31190f16799f86cbd12
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
2017-05-31 14:07:31 -07:00
Sujeev Dias
fb7523d08f mhi: core: Create dummy MHI APIs to fix compile errors
MHI is not supported by all targets, however many MHI client drivers
have a common driver that include MHI APIs. Create dummy APIs such
that even if MHI not present, does not cause any compile errors.

CRs-Fixed: 2053159
Change-Id: I427d925a658518d230a1d14df0cf27a7b19f207e
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
2017-05-31 14:07:14 -07:00
Sushmita Susheelendra
9f47a21e56 iommu/arm-smmu: Change virtual address size limit to 39 bits
Restrict the virtual address size to 39-bits to allow
a maximum of 3 pagetable levels.

Change-Id: I264f23a2e16cc7599bdad8a161854bcf6e24dd4a
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2017-05-31 12:12:24 -06:00
Sushmita Susheelendra
855e0a4c1c drm/msm: Set the TTBR1 range for a 36-bit address space
Define a 36-bit address space for TTBR1 which is used for
kernel side GPU buffer objects.

Change-Id: I1c4eaee0fd92236793621c7d3dba1700e56fefd2
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2017-05-31 12:00:54 -06:00
Jordan Crouse
b39c609072 iommu/arm-smmu: Correctly calculate and use the TTBR1 pagetable
Due to an egregious misunderstanding of the specification it
was thought that to do the TTBR1 matching correctly the sign
extension bit needed to match the input address space. This
is incorrect - the TTBR1 range is determined by the size of
the TTBR1 space (in our case, the same as the input address
space). For example if the input address size is 36, the
effective range of the pagetables are:

TTBR0: 0x00000000_00000000 - 0x0000000f_ffffffff
TTBR1: 0xfffffff0_00000000 - 0xffffffff_ffffffff

For its part the sign extension bit needs should be set based on
the upstream bus size. If the device has a UBS of 49 then the
sign extension bit is assumed by design to be 48 otherwise
the driver needs to pick the highest available bit and reduce
the input address space by 1.

Because the client driver shouldn't need to know the upstream
bus size, convention is to use a fully sign extended unsigned
long address for TTBR1 mappings. If the sign extension bit is set
lower than the upstream bus size some implementations assume that
bits above the sign extension bit need to be zero and breaks the
convention. Setting the sign extension bit correctly for the
upstream bus size ensures that sign extension always works.

The hardware will match an address to the TTBR1 if all the bits
between the sign extension bit and the input address size are set
to 1. We emulate this behavior in software when looking up a pagetable
for a software operation.

Change-Id: Ic0dedbad80c72f11bc8a7e6792f0e3c2f58bc674
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-05-31 11:56:25 -06:00
Nicholas Troast
841a455179 power: supply: qcom: use typec mode instead of debounce done
When the CC state change IRQ fires on USB removal the debounce done
status may still be high, and the removal cleanup will not be called.
Use the UFP/DFP status bits to determine whether the CC lines are
present or not instead.

While at it cache the CC state so it doesn't have to be derived
everywhere it is needed. The status bits are already cached, so there
should be no functional difference.

Change-Id: Ifb89c78a032ae9d38fbc8c281518698941e131c2
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2017-05-31 10:43:22 -07:00
Jack Pham
ae024ed4f7 usb: pd: Rerun usbpd_sm if RX queue is not empty
Upon receiving a PD message the state machine is queued to
act on it. However, if another message is received quickly
before usbpd_sm is scheduled, it will only process the first
message. Add a check if the RX queue is not empty in order
to drain the messages properly.

Change-Id: Ie9e079a51a5740024c9a1be5ba27b3edacf9b2df
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2017-05-31 10:42:56 -07:00
Arun Kumar Neelakantam
a5e75c2fa7 soc: qcom: glink_smem_native_xprt: recovery from SSR in tasklet only
Checking RX_FIFO allocation status from deferred thread also causes
in_ssr flag reset and reading stale data from FIFO, If the deferred
thread schedules after the execution of ssr() function.

Check RX_FIFO status only after receiving the interrupt from remote
side which happens after remote sub-system recover from SSR.

CRs-Fixed: 2054480
Change-Id: I39269f6b2e1f1cb9aecd25fa40e73c2d6f12dbd5
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2017-05-31 18:34:36 +05:30
Prakash Kamliya
0bcaa07af2 drm/msm: fix leak in failed get_pages
get_pages doesn't keep a reference of the pages allocated
when it fails later in the code path. This can lead to
a memory leak. Keep reference of the allocated pages so
that it can be freed when msm_gem_free_object gets called
later during cleanup.

Change-Id: I44dea20e10c056c1c5e80d01bab0a274ff768b1c
Signed-off-by: Prakash Kamliya <pkamliya@codeaurora.org>
2017-05-31 15:36:34 +05:30
Ray Zhang
05d7bcef3f clk: mdss: fix bugs when parsing mdss regulators
There are two definitions of struct dss_vreg in mdss driver.
One is used during parsing regulators from device tree file,
the other is used when operating regulators. This introduces
different understanding of dss_vreg data in these two places.
Future plan is to have only one definition for these shared
data structure. Currently only make dss_vreg in sync to fix
this issue.

CRs-Fixed: 2054371
Change-Id: I4f16e1409c832432fa1df73b0ae030176b664e58
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-31 17:57:54 +08:00
Wei Li
8e38b06eb0 defconfig: msm: Enable CONFIG_CORESIGHT_SINK_TPIU for msmauto
Enable CONFIG_CORESIGHT_SINK_TPIU for msm-auto defconfig

Change-Id: I719071391df7871ce37d8d262f9dfa363c368027
Signed-off-by: Wei Li <weili@codeaurora.org>
2017-05-31 01:35:17 -07:00
Wei Li
704a40cab4 ARM: dts: msm: Modify coresight device node for msm8996
Modify coresight device node in dts to comply with the
new implementation of coresight driver for msm8996.

Change-Id: I10b236208a1f9e76b4d27a623c024b1f9f6a50ca
Signed-off-by: Wei Li <weili@codeaurora.org>
2017-05-31 16:28:11 +08:00
Yahui Wang
6726b980b6 ARM: dts: msm: control avdd enable gpio for msm8998 QVR/SKUK HDK
Avdd enable gpio is used for msm8998 QVR/SKUK HDK to control
avdd output. This gpio should be enabled/disabled when panel
does unblank/blank once to avoid panel electric leakage.

Change-Id: I73b4cbff81b5ce0c2abdfb2f2a6beafb303fb266
Signed-off-by: Yahui Wang <yahuiw@codeaurora.org>
2017-05-31 16:16:00 +08:00
Lei Chen
82eb4d0791 msm: mdss: Update msm8998 HDMI PHY sequence for bridge chip
Add support for 1.8v external power supply HDMI PHY sequence
which is used by bridge chip.

CRs-Fixed: 1074721
Change-Id: I0ae55cdc9151949b81f6de828238e4b88ceea3df
Signed-off-by: Lei Chen <chenl@codeaurora.org>
Signed-off-by: Yuchao Ma <yuchaom@codeaurora.org>
2017-05-31 14:44:42 +08:00
Animesh Kishore
46f90373e4 ARM: dts: msm: enable null packet on msm8998
Null packet insertion helps keep dsi lanes in HS mode
even when no data is available in between frames sent
from MDP.

Change-Id: Icf95cdf88d934d02a2f3f00a350c1567b774d890
Signed-off-by: Animesh Kishore <animeshk@codeaurora.org>
2017-05-31 11:54:23 +05:30
Linux Build Service Account
a5706c4fda Merge "usb: pd: Re-check for disconnect after PR swap" 2017-05-30 23:09:25 -07:00
Linux Build Service Account
7961b23656 Merge "sched: Remove debug WARN_ONCE messages" 2017-05-30 23:09:24 -07:00
Linux Build Service Account
ff3536c439 Merge "msm: ais: Fix kernel overwrite GET_BUF_BY_IDX ioctl" 2017-05-30 23:09:23 -07:00
Linux Build Service Account
472776516b Merge "ARM: dts: msm : Add neutrino DDR bandwidth voting on 8996 auto platforms" 2017-05-30 23:09:22 -07:00
Linux Build Service Account
467586f025 Merge "soc: qcom: sleepstate: Increase notifier priority" 2017-05-30 23:09:21 -07:00
Gaurav Kohli
497f7511cd soc: qcom: pil: Add trace events for PIL driver
Add trace event support for PIL Module to help in
debugging.

Change-Id: If560e275f3207eca4b084cba5e6384a7c452748c
Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
2017-05-30 22:32:49 -07:00
VijayaKumar T M
4eadca3cc2 msm: camera: Prevent info leak in kernel driver.
-Use %pK for kernel address to avoid the information leak.

(Change-Id: Ib0631d5578aba033510babe4f43e2a63bb959747)

CRs-Fixed: 2009672
Change-Id: Id7e8c41251612ce1a93dba854b5cc03e894c5d09
Signed-off-by: Alok Kediya <kediya@codeaurora.org>
Signed-off-by: VijayaKumar T M <vtmuni@codeaurora.org>
2017-05-30 22:09:15 -07:00
Terence Ho
76e56268ee msm: ais: cpp fix to check zero length ioctl
Port of ioctl validation for zero length ioctl
from camera_v2.

Change-Id: I635522f331d1e18641196ee3101c64ccc285636a
CRs-fixed: 2025367
Signed-off-by: Terence Ho <terenceh@codeaurora.org>
2017-05-31 11:34:34 +08:00
Yahui Wang
41f27c5716 msm: mdss: control avdd enable gpio when doing panel reset
Avdd enable gpio maybe used for AMOLED panel to control avdd
output. This gpio should be enabled/disabled when panel
does unblank/blank once to avoid panel electric leakage.

Change-Id: I18f0f6491f0ff97df5556e74a686a18b262708df
Signed-off-by: Yahui Wang <yahuiw@codeaurora.org>
2017-05-31 11:13:28 +08:00
Pavankumar Kondeti
57fd979fc9 core_ctl: un-isolate BIG CPUs more aggressively
The current algorithm to bring additional BIG CPUs is very
conservative. It works when BIG tasks alone run on BIG
cluster. When co-location and scheduler boost features
are activated, small/medium tasks also run on BIG cluster.
We don't want these tasks to downmigrate, when BIG CPUs are
available but isolated. The following changes are done to
un-isolate CPUs more aggressively.

(1) Round up the big_avg. When the big_avg indicates that
there are 1.5 tasks on an average in the last window, it
indicates that we need 2 BIG CPUs not 1 BIG CPU.

(2) Track the maximum number of running tasks in the last
window on all CPUs. If any of the CPU in a cluster has more
than 4 runnable tasks in the last window, bring an additional
CPU to help out.

Change-Id: Id05d9983af290760cec6d93d1bdc45bc5e924cce
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2017-05-31 08:33:48 +05:30
Pavankumar Kondeti
f37f0680d7 sched: Improve short sleeping tasks detection
When a short sleeping task goes for a long sleep, the task's
avg_sleep_time signal gets boosted. This signal will not go
below short_sleep threshold for a long time time even when the
task run in short bursts. This results in frequent preemption
of other tasks as the short burst tasks are placed on busy CPUs.

The idea behind tracking avg_sleep_time signal is to detect if a
task is short sleeping or not. Limit the sleep time to twice the
short sleep threshold to make avg_sleep_time signal more responsive.
This won't affect regular long sleeping tasks, as the avg_sleep_time
would be higher than threshold.

Change-Id: Ic0838e81ef7f5d83864a58b318553afc42812853
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2017-05-31 08:30:01 +05:30
Kasin Li
a61bcfad32 drm/msm: Fix potential buffer overflow issue
In function submit_create, if nr_cmds or nr_bos is assigned with
negative value, the allocated buffer may be small than intended.
Using this buffer will lead to buffer overflow issue.

Change-Id: I0b61cccffd836e2dd3c859446470af4b6451b9ed
Signed-off-by: Kasin Li <donglil@codeaurora.org>
2017-05-31 10:58:19 +08:00
Linux Build Service Account
6cec3ff5eb Merge "ais: always do clock set_rate after get_rate" 2017-05-30 16:04:33 -07:00
Linux Build Service Account
1ad752ad89 Merge "Perf: ARM: Support 32bit armv8-pmuv3 driver" 2017-05-30 16:04:32 -07:00
Linux Build Service Account
0b63aa5007 Merge "spcom: open channel return EBUSY when channel in use" 2017-05-30 16:04:31 -07:00
Linux Build Service Account
008dfbc55c Merge "f_audio_source: Use f_audiosource as first device name" 2017-05-30 16:04:31 -07:00
Linux Build Service Account
5f638a12ab Merge "diag: dci: Add validity check for dci client's process descriptor" 2017-05-30 16:04:30 -07:00
Linux Build Service Account
28ca6375c7 Merge "adreno_tz: Remove unnecessary devfreq NULL check in tz_handler()" 2017-05-30 16:04:29 -07:00
Linux Build Service Account
a7f31ff804 Merge "wil6210: fix wil->platform_ops.suspend failure handling" 2017-05-30 16:04:28 -07:00
Linux Build Service Account
3903a9f28c Merge "ARM: dts: msm: enable 11AD keep-radio-on-during-sleep on MSM8998" 2017-05-30 16:04:27 -07:00
Linux Build Service Account
103e31feaa Merge "battery: don't wait for aicl rerun" 2017-05-30 16:04:26 -07:00
Linux Build Service Account
6d0b4d37a3 Merge "smb-lib: ignore disconnects during power role swap" 2017-05-30 16:04:25 -07:00
Linux Build Service Account
4cc716041e Merge "iommu/arm-smmu: Optimized IOMMUS property parsing" 2017-05-30 16:04:24 -07:00