Commit graph

580577 commits

Author SHA1 Message Date
Manikanta Sivapala
0124613ef0 defconfig: msm: compile video drivers as builtins
Video kernel modules as LKM make the T32 debugging difficult.
So, make video drivers as part of boot image.

Change-Id: I229eba78f883d7656ac1bd64487dccc70bb0d43c
Signed-off-by: Manikanta Sivapala <msivap@codeaurora.org>
Signed-off-by: Deepak Kushwah <dkushwah@codeaurora.org>
2017-01-06 22:37:56 -08:00
Siddartha Mohanadoss
c5fd9dbe9d thermal: tsens: Switch from usleep_range() to msleep
On certain cases we have seen usleep_range() return before
the intended minimum time parameter passed to this function.
There is no protection against wakeups and we may return
early. msleep() already has code to handle this cases since
it loops as long as there is still time.

Change-Id: I3cf1e2d7f61f5a6d42d66afb86ae3b3fe141a9e7
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2017-01-06 16:04:55 -08:00
David Collins
07f2f9952c input: move qpnp-power-on driver into input/misc directory
Move the qpnp-power-on driver from the drivers/input directory
into the drivers/input/misc directory.  This is the standard
location where other power key drivers are kept.

Also make a small fix to use octal instead of symbolic
permissions for the ship_mode_en module parameter.

Change-Id: I4d80c2ca0f161bd443dbfe0fcef822459c9fe44b
Signed-off-by: David Collins <collinsd@codeaurora.org>
2017-01-06 10:52:46 -08:00
Linux Build Service Account
e4e95be265 Merge "ARM: dts: msm: Add an entry to the Silver memlat table for msm8998" 2017-01-06 08:11:50 -08:00
Abhijeet Dharmapurikar
2d7e48a4b3 qpnp-qnovo: Remove dependency on adapter current limit
Currently enabling of Qnovo isn't allowed unless a charger with
minimum 1A current limit is detected. This is not required.

Allow enabling of Qnovo regardless of the charger current limit.

Change-Id: I1726423d3bc31725c162f09b907683d6e63ac6b5
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-01-05 21:41:39 -08:00
Taniya Das
ef366c8b57 ARM: dts: msm: Add support for pwr/perf supply for sdm660
OSM cpu clocks would require the supply rails on which power and perf
clusters are connected, so add the same.

Change-Id: Ie5e50dff1c3c5b06585d03abb45ff493779f029d
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2017-01-05 19:37:20 -08:00
cyizhao
cadfa62c08 ARM: dts: msm: Enable volume up key for qrd sdm660
GPIO7 is used for volume up key on qrd sdm660 device.
Configure it to input and pull-up and add gpio-keys device to
enable the key detection.

CRs-Fixed: 1108198
Change-Id: I9ef323088e478aa2fd35858d256edb041da6f385
Signed-off-by: cyizhao <cyizhao@codeaurora.org>
2017-01-05 19:30:12 -08:00
cyizhao
21f6344cfe ARM: dts: msm: Add FG battery profile/JEITA property for qrd sdm660
Add battery profile for qrd sdm660 to make sure FG could load it
and work as expected.

Disable soft hot jeita threshold according to the battery vendor's and
hardware team's suggestion to make sure the battery could sustain at 1C
charging current longer.

CRs-Fixed: 1108198
Change-Id: Ifebeadae1590813ad785d25a399011efb447746d
Signed-off-by: cyizhao <cyizhao@codeaurora.org>
2017-01-06 11:29:15 +08:00
Douglas Anderson
e489bf2659 timers: Fix documentation for schedule_timeout() and similar
The documentation for schedule_timeout(), schedule_hrtimeout(), and
schedule_hrtimeout_range() all claim that the routines couldn't possibly
return early if the task state was TASK_UNINTERRUPTIBLE. This is simply
not true since wake_up_process() will cause those routines to exit early.

We cannot make schedule_[hr]timeout() loop until the timeout expires if the
task state is uninterruptible because we have users which rely on the
existing and designed behaviour.

Make the documentation match the (correct) implementation.

schedule_hrtimeout() returns -EINTR even when a uninterruptible task was
woken up. This might look strange, but making the return code depend on the
state is too much of an effort as it would affect all the call sites. There
is no value in doing so, but we spell it out clearly in the documentation.

Change-Id: I3e9bf91e7d285abcac134e32b02131b999d79f40
Suggested-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Cc: huangtao@rock-chips.com
Cc: heiko@sntech.de
Cc: broonie@kernel.org
Cc: briannorris@chromium.org
Cc: Andreas Mohr <andi@lisas.de>
Cc: linux-rockchip@lists.infradead.org
Cc: tony.xie@rock-chips.com
Cc: John Stultz <john.stultz@linaro.org>
Cc: linux@roeck-us.net
Cc: tskd08@gmail.com
Link: http://lkml.kernel.org/r/1477065531-30342-2-git-send-email-dianders@chromium.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Git-commit: 4b7e9cf9c84b09adc428e0433cd376b91f9c52a7
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
2017-01-05 17:29:10 -08:00
Douglas Anderson
c51fd6364e timers: Fix usleep_range() in the context of wake_up_process()
Users of usleep_range() expect that it will _never_ return in less time
than the minimum passed parameter. However, nothing in the code ensures
this, when the sleeping task is woken by wake_up_process() or any other
mechanism which can wake a task from uninterruptible state.

Neither usleep_range() nor schedule_hrtimeout_range*() have any protection
against wakeups. schedule_hrtimeout_range*() is designed this way despite
the fact that the API documentation does not mention it.

msleep() already has code to handle this case since it will loop as long
as there was still time left.  usleep_range() has no such loop, add it.

Presumably this problem was not detected before because usleep_range() is
only used in a few places and the function is mostly used in contexts which
are not exposed to wakeups of any form.

An effort was made to look for users relying on the old behavior by
looking for usleep_range() in the same file as wake_up_process().
No problems were found by this search, though it is conceivable that
someone could have put the sleep and wakeup in two different files.

An effort was made to ask several upstream maintainers if they were aware
of people relying on wake_up_process() to wake up usleep_range(). No
maintainers were aware of that but they were aware of many people relying
on usleep_range() never returning before the minimum.

Change-Id: Ia403f0dc9cac711c8a4b6fcc4cf0094ad1358ed7
Reported-by: Tao Huang <huangtao@rock-chips.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Cc: heiko@sntech.de
Cc: broonie@kernel.org
Cc: briannorris@chromium.org
Cc: Andreas Mohr <andi@lisas.de>
Cc: linux-rockchip@lists.infradead.org
Cc: tony.xie@rock-chips.com
Cc: John Stultz <john.stultz@linaro.org>
Cc: djkurtz@chromium.org
Cc: linux@roeck-us.net
Cc: tskd08@gmail.com
Link: http://lkml.kernel.org/r/1477065531-30342-1-git-send-email-dianders@chromium.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Git-commit: 6c5e9059692567740a4ee51530dffe51a4b9584d
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
2017-01-05 17:28:28 -08:00
Thomas Gleixner
8965291e3d timers: Plug locking race vs. timer migration
Linus noticed that lock_timer_base() lacks a READ_ONCE() for accessing the
timer flags. As a consequence the compiler is allowed to reload the flags
between the initial check for TIMER_MIGRATION and the following timer base
computation and the spin lock of the base.

While this has not been observed (yet), we need to make sure that it never
happens.

Change-Id: I577327e02ab77b6de951ac2aa936cb5d5a4f477a
Fixes: 0eeda71bc3 ("timer: Replace timer base by a cpu index")
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1610241711220.4983@nanos
Cc: stable@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Git-commit: b831275a3553c32091222ac619cfddd73a5553fb
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[runminw@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
2017-01-05 17:27:10 -08:00
David Dai
2669ae7f24 clk: msm: clock-gcc-8998: keep gcc_bimc_gfx_clk on
Keep gcc_bimc_gfx_clk always on to prevent a stall during BIMC
redirection handshake that occurs as part of a transition between
different CCI power modes. The stall causes momentary bandwidth drops
for the display ports and creates display buffer underflows.

Change-Id: Ie7de487fbe16c7e6b1234a96c1208d54daa5a9bb
Signed-off-by: David Dai <daidavid1@codeaurora.org>
2017-01-05 16:43:26 -08:00
Rohit Gupta
e4434f152e ARM: dts: msm: Add an entry to the Silver memlat table for msm8998
Add a level at the lower end of the memlat table for the Silver
cluster so that the memlat driver votes for at least 200MHz
when the CPU's effective frequency is at most 300MHz for latency
bound workloads.

Change-Id: I2695d2d115d925ac8b274d93e59b2be6578f3001
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
2017-01-05 10:20:51 -08:00
Amir Samuelov
1039ef6124 spcom: free all SKP ION buffers on SSR
Free all the SKP ION buffers that were locked for SPSS app swapping,
when remote subsystem reset.

Change-Id: I5230152cc7c3e721b1ebb01b663b9fd14bd2d6c9
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2017-01-05 18:40:45 +02:00
Manoj Prabhu B
87e224427f ARM: dts: msm: Allocate memory for diag client for SDM630
This patch enables allocation of 5MB for new diag client
of memshare.

CRs-Fixed: 1107794
Change-Id: Ibfbd9c2fc13860b647c1411e6c60f4a543683993
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
2017-01-05 18:16:06 +05:30
Meera Gande
4c59120d7b msm: camera: isp: Update UB Size for SDM660
The UB size has been updated to 64KB for
SDM660.

Change-Id: I6493574b17f7ad458476f6e25a8aef19c0befdae
Signed-off-by: Meera Gande <mgande@codeaurora.org>
2017-01-05 16:57:56 +05:30
Linux Build Service Account
2116b44bd3 Merge "ARM: dts: msm: Add APC0/1 CPR instances for sdm660" 2017-01-05 02:09:06 -08:00
Linux Build Service Account
ed4ef900e9 Merge "sched: Delete heavy task heuristics in prediction code" 2017-01-05 02:09:05 -08:00
Linux Build Service Account
54aaf0328a Merge "thermal: tsens: Remove calibration functions" 2017-01-05 02:09:04 -08:00
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
AnilKumar Chimata
ecbe2e6f80 qseecom: Rename clock handle names
Rename clock handles as per de-initialization sequence,
which is required to avoid the dangling pointers.

Change-Id: I9e0715e2a47f318acc414605ce8e624c432d6665
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
2017-01-05 15:27:00 +05:30
Srinivas Rao L
21047b3dc2 lpm-levels: Do not consider cluster residency in suspend
If cluster deepest low power mode is disabled in idle path, the
residencies are recalculated and the max_residency for the shallower
mode becomes ~0 even if deepest mode is not disabled in suspend path.
Because of this while the cluster mode is selected during suspend,
it selects shallower mode instead of deepest mode available.

During suspend ignore the residency to select the cluster level
low power mode.

Change-Id: I812e33ad45e563b88c478d5d70296d5bd488438f
Signed-off-by: Srinivas Rao L <lsrao@codeaurora.org>
2017-01-05 15:26:23 +05:30
Harry Yang
a154041d04 qcom-charger: Fix crash due to null ptr access of pl psy
pl psy access is guarded by pl_disable_votable, disabled in PMI
probe. Accessing parallel psy before it is available will cause
crash.

Fix this by allowing access to parallel psy only after all the
initial votes have been cast on pl_disable_votable in probe.

CRs-Fixed: 1101600
Change-Id: Idd289229f45c31cf8fd234339b6738bd241283bd
Signed-off-by: Harry Yang <harryy@codeaurora.org>
2017-01-04 22:59:39 -08:00
Veerabhadrarao Badiganti
b1d2009d04 mmc: core: Enable HS mode first in the device and then in the host
While switching to HS mode, high speed mode timing should be selected
in the device before changing the clock frequency in the host.

But present driver first updates the frequency in host and then selects
HS mode in device while selecting HS400 mode. This is a spec violation.
Updated the sequence to comply with spec.

Change-Id: I5b2c1f724d820daf9c0bca8651cf85bd0ff67655
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
2017-01-05 12:28:52 +05:30
Harry Yang
d9a8a3b2e1 qcom-charger: typec legacy cable detection
Currently the legacy cable bit is always asserted during off mode
PON via USBIN. This causes PD to be disallowed even when a
non-legacy cable is attached in off mode.

Fix this by always allowing PD upon USBIN attach PON, but keep the
normal legacy detection flow for all subsequent insertions.

CRs-Fixed: 1107607
Change-Id: I20acd75643955b6d2144389159a0dad41f01a532
Signed-off-by: Harry Yang <harryy@codeaurora.org>
2017-01-04 22:57:17 -08:00
Udaya Bhaskara Reddy Mallavarapu
15d83b644a media: dvb-core: Fix for dvb_ringbuffer merge conflict
resolve the dvb_ringbuffer merge conflicts due to
v4.4-16.09-android-tmp branch merging.

CRs-Fixed: 1086706
Change-Id: Ic5ec87d48e86fd9504fed7232286cf81b46c4035
Signed-off-by: Udaya Bhaskara Reddy Mallavarapu <udaym@codeaurora.org>
2017-01-05 11:25:26 +05:30
Taniya Das
103f5f9265 clk: qcom: osm: remove ioremaps from panic callback
Calling ioremap() in clk_osm_panic_callback() can result in
BUG() when the kernel is panic-ing. It is not safe to use
ioremap() in atomic context. Map the debug registers at probe
time instead.

Change-Id: I4009ea6e10df2dc8649cf0b0c1a5b6398d3c689e
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2017-01-05 11:20:14 +05:30
Osvaldo Banuelos
3da98b2c15 clk: msm: clock-osm: remove ioremaps from panic callback
Calling ioremap() in clk_osm_panic_callback() can result in
BUG() when the kernel is panic-ing. It is not safe to use
ioremap() in atomic context. Map the debug registers at probe
time instead.

CRs-Fixed: 1086427
Change-Id: Ie14be6ee9ffbcb09009d5d05235e20f6ac215fa0
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
2017-01-05 10:09:01 +05:30
Abhijeet Dharmapurikar
9c3c098aa2 pmic-voter: Allow forcing a value via debug interface
Forcing a certain value on the result of the votable is a very
desireable feature to speed up debugging.

For this create a debugfs dir per votable and implement following debugfs
files
- status : This is the same as the earlier one which dumps clients and
	 their values and results.
- force_val : The value of the vote to force. This will be an integer
		value for min/max votables and should be a boolean value
		for set_any votables.
- force_active: This flag activates or deactives the force mode.

Note that writing to the force active flags always invokes the callback
when present even if the same value is being set. When activated the
callback is called with the result set to force_val and the client set to
"DEBUG_FORCE_CLIENT".

While activated, other clients are allowed to vote, their votes are
noted and the effective values tracked internally are updated. Only the
callback is skipped. This internal tracking of the effective values help
in switching back quickly to the voted results once the force mode is
deactivated IOW  When deactivated the callback is called with the result
and client set to the effective ones which could have been the same as
the ones prior to force activation or could have been updated by
the calls to vote() while force was activte.

Also, note that while force is activated, the calls to
get_effective_result and get_effective_client return the force_val
and "FORCE_DEBUG_CLIENT" instead of the internal effective values. This
provides consistency with callback values.

Change-Id: Id9eb5b27675e3ed53176175c13e0d654783bcf08
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-01-04 18:52:44 -08:00