Commit graph

580014 commits

Author SHA1 Message Date
Linux Build Service Account
4f1cebc120 Merge "soc: qcom: pil: Use NULL check of resource pointer for restart register" 2016-12-09 19:59:13 -08:00
Linux Build Service Account
018082dd1b Merge "ARM: dts: msm: Add pinctrl configuration for PMFALCOM L6/9/19" 2016-12-09 19:59:12 -08:00
Linux Build Service Account
de5d70ba03 Merge "ARM: dts: msm: Add missing properties for USB node for msmfalcon" 2016-12-09 19:59:11 -08:00
Linux Build Service Account
7483dccc26 Merge "defconfig: Add missing features for HW Encryption support" 2016-12-09 19:59:10 -08:00
Linux Build Service Account
d18f96a5e1 Merge "defconfig: msm: msm8998: enable LCDB driver" 2016-12-09 19:59:09 -08:00
Linux Build Service Account
54a480de41 Merge "media: dvb-core: Add feed state check before stop dvbdemux feed" 2016-12-09 19:59:09 -08:00
Linux Build Service Account
5fd499075e Merge "ARM: dts: msm: Add VOL_UP node for MSMFALCON and interposer" 2016-12-09 19:59:08 -08:00
Linux Build Service Account
9743dc9288 Merge "ARM: dts: msm: Enable core hang detect feature on msmfalcon" 2016-12-09 19:59:07 -08:00
Linux Build Service Account
e9b171cb47 Merge "phy: qcom-ufs: Modify the vdd-phy min-max range" 2016-12-09 19:59:06 -08:00
Linux Build Service Account
a541a81870 Merge "ARM: dts: msm: Specify the WLED interrupts properly for pmi8998/pm2falcon" 2016-12-09 19:59:05 -08:00
Linux Build Service Account
250b1c4028 Merge "ARM: dts: msm: Add PM support for msmfalcon" 2016-12-09 19:59:04 -08:00
Linux Build Service Account
06a6328b57 Merge "ARM: dts: msm: Update clock mmss node for MSMfalcon/Triton" 2016-12-09 19:59:03 -08:00
Linux Build Service Account
98a2f941e2 Merge "msm-core: use get_user() API to read userspace data/settings" 2016-12-09 19:59:02 -08:00
Linux Build Service Account
301af28cab Merge "ARM: dts: msm: Modify QRD interposer dts file for msm8998" 2016-12-09 19:59:02 -08:00
Linux Build Service Account
3160351d53 Merge "ASoc: msm: Add changes to support multiple meta key value pairs" 2016-12-09 19:59:01 -08:00
Linux Build Service Account
65c54e155a Merge "iommu: io-pgtable-arm: Use correct bitmask for pgd entry" 2016-12-09 19:59:00 -08:00
Linux Build Service Account
fc284a8972 Merge "iommu: iommu-debug: Allow full dma_addr_t sized address for atos" 2016-12-09 19:58:59 -08:00
Ajay Singh Parmar
26df7153d6 msm: mdss: hdcp_1x: do not fail if no cp_irq for R0
HDCP 1.x protocol fetches data called R0' from sink as
part of authentication protocol. When this data is available,
sink issues CP_IRQ following which source can fetch this
data from sink. In case CP_IRQ is not received on time, do not
fail the authentication as R0' may still be available and
valid. Fetch R0' and check if it is valid before failing
the authentication to avoid false hdcp authentication failures.

Also, enable hpd irq in case downstream is a repeater so that
it can report any link failure.

Change-Id: I28fa1a06f5acf0b6fbe988db5d95a4c1a781a9f9
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2016-12-09 19:28:56 -08:00
Hemant Kumar
bf2d967e5d ARM: dts: msm: Configure MPM for qusb2phy_dpse_hv for msm8998
In host mode upon XO shutdown high speed and full speed device
connection is not getting detected because mpm is not configured
to monitor for Dp line state change.

Change-Id: I34e3f586b99b6ff1af1d2323d4f272ee3cca7fa2
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-12-09 18:57:31 -08:00
Linus Torvalds
b40f046740 mm: remove gup_flags FOLL_WRITE games from __get_user_pages()
This is an ancient bug that was actually attempted to be fixed once
(badly) by me eleven years ago in commit 4ceb5db975 ("Fix
get_user_pages() race for write access") but that was then undone due to
problems on s390 by commit f33ea7f404 ("fix get_user_pages bug").

In the meantime, the s390 situation has long been fixed, and we can now
fix it by checking the pte_dirty() bit properly (and do it better).  The
s390 dirty bit was implemented in abf09bed3c ("s390/mm: implement
software dirty bits") which made it into v3.9.  Earlier kernels will
have to look at the page state itself.

Also, the VM has become more scalable, and what used a purely
theoretical race back then has become easier to trigger.

To fix it, we introduce a new internal FOLL_COW flag to mark the "yes,
we already did a COW" rather than play racy games with FOLL_WRITE that
is very fundamental, and then use the pte dirty flag to validate that
the FOLL_COW flag is still valid.

Change-Id: I42e448ecacad4781b460c4c989026307169ba1b5
Reported-and-tested-by: Phil "not Paul" Oester <kernel@linuxace.com>
Acked-by: Hugh Dickins <hughd@google.com>
Reviewed-by: Michal Hocko <mhocko@suse.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Willy Tarreau <w@1wt.eu>
Cc: Nick Piggin <npiggin@gmail.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-repo: https://chromium.googlesource.com/chromiumos/third_party/kernel.git
Git-commit: 19be0eaffa3ac7d8eb6784ad9bdbc7d67ed8e619
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
2016-12-09 17:43:44 -08:00
Venkat Gopalakrishnan
61e6a9f4b8 scsi: ufs: fix irq return code
Return IRQ_HANDLED only if the irq is really handled, this will
help in catching spurious interrupts that go unhandled.

Change-Id: Icc2a373f3f4599887c4f86632107ed11e0525153
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-12-09 17:23:17 -08:00
Karthikeyan Mani
48809d97c1 ASoC: wcd934x: Add missing INT0 interpolator path
Add missing path for codec interpolator 0 (INT0)
in wcd934x audio routing. This will cause playback
mute through INT0 mixing path. Change info logs to
dbg at instances of default value assignment.

CRs-fixed: 1099759
Change-Id: I3332d7e3bd0b310b486d273b7f9884410509ce25
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2016-12-09 16:48:49 -08:00
David Collins
e25600294b ARM: dts: msm: disable VDD_APC0/1 CPR aging adjustments on MSM8998v2
Disable VDD_APC0 and VDD_APC1 CPR aging measurement and
adjustments for all local CPR fusing revisions.  It is unknown
which future revision will have the initial aging sensor
difference fuse blown.  Software must not attempt to perform an
aging measurement unless this fuse is blown.  Therefore, disable
aging measurements on all future revisions.

Modify the open-loop and closed-loop voltage adjustments
accordingly so that the maximum 15 mV aging margin is present
for all CPR revisions.

Change-Id: I4546a7994fc0442bf82d36ca0a404a57be8c7dd3
CRs-Fixed: 1097587
Signed-off-by: David Collins <collinsd@codeaurora.org>
2016-12-09 15:58:42 -08:00
Subbaraman Narayanamurthy
7b232891df qpnp-fg-gen3: Use the correct property name to get fastcharge current
Currently GEN3 FG driver reads "qcom,nom-batt-capacity-mah"
property from the battery profile device node to use that for
notifying fastcharge current to the charger driver. Change that
to use "qcom,fastchg-current-ma" property which seems to be more
appropriate. Update all the battery profiles that are used with
GEN3 FG to follow that.

Change-Id: I119e6af297b37a06a227475f712f938367fb65bc
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-12-09 15:33:59 -08:00
Subbaraman Narayanamurthy
688a4e14e1 ARM: dts: msm: rename battery profile used for msm8998 QRD
To match with other battery profiles used for GEN3 fuel gauge,
rename the battery profile used for msm8998 QRD platform.

Change-Id: I9a12ac11b6bd303eb32b4e03e116281bca664d06
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-12-09 15:33:52 -08:00
Venkat Gopalakrishnan
de3c9e7c78 scsi: ufs: make sure all interrupts are processed
As multiple requests are submitted to the ufs host controller in
parallel there could be instances where the command completion
interrupt arrives later for a request that is already processed
earlier as the corresponding doorbell was cleared when handling
the previous interrupt. Read the interrupt status in a loop after
processing the received interrupt to catch such interrupts and
handle it.

Change-Id: I91c1ba3360592f258a2c3c4e902394c3ddc77bca
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-12-09 15:21:34 -08:00
Syed Rameez Mustafa
6e24ba90a2 sched: Ensure proper task migration when a CPU is isolated
migrate_tasks() migrates all tasks of a CPU by using pick_next_task().
This works in the hotplug case as we force migrate every single task
allowing pick_next_task() to return a new task on every loop iteration.
In the case of isolation, however, task migration is not guaranteed
which causes pick_next_task() to keep returning the same task over and
over again until we terminate the loop without having migrated all the
tasks that were supposed to migrated.

Fix the above problem by temporarily dequeuing tasks that are pinned
and marking them with TASK_ON_RQ_MIGRATING. This not only allows
pick_next_task() to properly walk the runqueue but also prevents any
migrations or changes in affinity for the dequeued tasks. Once we are
done with migrating all possible tasks, we re-enqueue all the dequeued
tasks.

While at it, ensure consistent ordering between task de-activation and
setting the TASK_ON_RQ_MIGRATING flag across all scheduling classes.

Change-Id: Id06151a8e34edab49ac76b4bffd50c132f0b792f
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
2016-12-09 14:30:41 -08:00
Subbaraman Narayanamurthy
ecc5d1b433 ARM: dts: msm: Disable WLED staggering for pmi8998 and pm2falcon
Disable WLED current staggering in pmi8998 and pm2falcon to fix
audible WLED issue of sound generation when WLED is turned on in
hybrid mode.

CRs-Fixed: 1099709
Change-Id: Id0d3385cf3f29379e2df4f2c1657c4b661548721
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-12-09 13:52:20 -08:00
Olav Haugan
8cf404403a sched/core: Fix race condition in clearing hmp request
There is a race condition between clearing an HMP request for active
migration and the actual active migration. Active migration can he
half-way through doing the migration when the HMP request can be cleared
by another core. Move clearing of HMP request to the stopper thread to
avoid this.

Change-Id: I6d73b8f246ae3754ab60984af198333fd284ae16
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2016-12-09 13:45:42 -08:00
Olav Haugan
584d38f189 sched/core: Prevent (user) space tasks from affining to isolated cpus
We don't want user space tasks to run on isolated cpus. If the affinity
mask that the user space task is trying to set only includes online
cpus that are isolated return error.

Also ensure that tasks do not get stuck on isolated cores. We are not
properly updating the mask that we check against the current CPU so we
might end up thinking we can run on the current CPU. Fix this.

Change-Id: I078d01e63860d1fc60fc96eb0c739c0f680ae983
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2016-12-09 13:45:42 -08:00
Subbaraman Narayanamurthy
cf1d50169a leds: qpnp-wled: Reconfigure SWIRE_AVDD default voltage selectively
In certain PMICs, when WLED is configured for AMOLED panels, AVDD
default voltage configured for SWIRE mode has to be reconfigured
every time WLED module is disabled and enabled. Otherwise, AVDD
voltage can stay at the previous voltage level configured through
SWIRE pulses. Add support for it.

CRs-Fixed: 1071936
Change-Id: I938ce65f42eebe31be27151281d7e8502ba29f6e
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-12-09 13:03:02 -08:00
Maheshwar Ajja
28b53604a0 msm: vidc: fix issue when video session opening failed
There is null pointer access occurring when video session
opening failed and power collapse thread sending sys_error
to all opened sessions in parallel. Fix the issue by doing
v4l2_fh_exit() afer removing new session from core->instances
list.

CRs-Fixed: 1088562
Change-Id: I2523a46487a03ade40afeddd394a4572283d91a2
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2016-12-09 11:30:24 -08:00
Jack Pham
a3e98f0134 usb: phy: qmp: Select usb3 phy mode before initializing PHY
Make sure the USB3/DP PHY mode selection is switched back to
USB3 mode before proceeding with PHY initialization. This fixes
a bug when DisplayPort previously uses the PHY and does not
switch it back which causes the POWER_DOWN_CONTROL register write
to not take effect and results in USB3 PHY initialization failure.

Change-Id: Idad0f80eda6192ccae9e824f1f76c7071806ffec
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-12-09 11:24:01 -08:00
Abhijit Kulkarni
64a567c18a mdss: mdp: unmap buffers before secure transition
This change adds unmapping the buffers from the previous commit
before transitioning to the secure state. This is required so that
driver does not have any buffers mapped before we detach from the secure
and unsecure context banks.

Change-Id: I4dcf3d794c0e7e111a86e72d26bed8de7e3329a1
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2016-12-09 11:02:00 -08:00
Siena Richard
dd764997fa msm: qdsp6v2: extend media format provided to voice driver
Extend the media format options passed to the voice driver to
include sample rate, bits per sample, and channel mapping in
addition to port ID and the number of channels. Additional media type
information is provide to help avoid additional buffers required in
case of non-fractional sample rate for post processing voice data.

CRs-Fixed: 1065881
Change-Id: Ib69b57dc677b87fecfd689df7f8fc7ec8b4bc59f
Signed-off-by: Siena Richard <sienar@codeaurora.org>
2016-12-09 10:59:54 -08:00
Manaf Meethalavalappu Pallikunhi
c2ec16b9e1 power: bcl: Add frequency mitigation as an optional property for BCL
For targets with LMH DCVSh hardware and OSM, BCL software frequency
mitigation is not required. Since hardware is doing the frequency
mitigation, there is no need for the HLOS BCL frequency mitigation.
So make the properties "qcom,mitigation-freq-khz" and
"qcom,thermal-handle" as optional properties.

Change-Id: I0062f3b39f00ff2f0e74affcffbcf1afd89d3b2f
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2016-12-09 19:48:33 +05:30
Manaf Meethalavalappu Pallikunhi
54fb4f8396 ARM: dts: msm: Add BCL peripheral configs for pmfalcon
Add pmfalcon BCL peripheral related configs to enable the BCL
peripheral driver. Add configs like vbat interrupt, ibat interrupt,
vbat polling delay, ibat polling delay, etc.

Change-Id: I9d7cc82c50c1b09610f5a4eac86af4617389f23f
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2016-12-09 19:45:56 +05:30
Ashwanth Goli
d9db5fe079 defconfig: Enable config INET_DIAG_DESTROY
Enable config INET_DIAG_DESTROY for msm_falcon 32-bit

Change-Id: I39c5ac30070ff8555ed712a99796b9405717b072
Signed-off-by: Ashwanth Goli <ashwanth@codeaurora.org>
2016-12-09 18:06:01 +05:30
Srinivas Ramana
fa50fc268b time: sched_clock: record cycle count in suspend and resume
Record cycle count and kernel time in ns while entering suspend
and while resuming. This will help in matching up the kernel time
with external subsystems and in recording suspend time in cycles.

Change-Id: If22d9880103c7d54087d0faf4c992259e6b97f08
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2016-12-09 17:50:42 +05:30
Amey Telawane
eae5dd568b ARM: dts: msm: add qdss node support for msmtriton
Add support to enable qdss components on
msmtriton. Reuse msmfalcon coresight nodes
for msmtriton.

CRs-fixed: 1094175
Change-Id: I34a3ad2da7f8e267f0d570c0329ac9b73a43309e
Signed-off-by: Amey Telawane <ameyt@codeaurora.org>
2016-12-09 17:48:03 +05:30
Shankar Ravi
73a0fc96c4 ARM: dts: msm: Enable camera flash on msmfalcon interposer
Enable flash nodes for front and rear camera.

Change-Id: I4e14ef9177dcf06c6cab5fb5b32d817fbbaa8478
Signed-off-by: Shankar Ravi <rshankar@codeaurora.org>
2016-12-09 16:15:28 +05:30
Gaurav Singhal
41b99b48c5 NFC: Inform CLF whenever eSE is powered off
When the eSE is powered off, the “system” needs to give
8ms to the capacitor connected on the SVDD line to discharge.

We should inform the FW we just powered off the eSE.

Change-Id: I864fd8f75ded6ab8c42ea36bcdadcdbe924e927d
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
2016-12-09 15:43:21 +05:30
Taniya Das
151d532101 clk: qcom: Add support for debugfs measure clock
Introduce clk_debug_mux which would support clocks to be allowed to measure
clock frequency from debugfs.

Change-Id: I81c32a876b33f5a7773485a76897ff9cbed45a76
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-12-09 15:04:41 +05:30
Gopikrishna Mogasati
587917bd0b diag: Null pointer check to avoid kernel panic
When accessing diag master table we need a check for
null pointer while iterating over the circular list.
Without this check there is a possibility of kernel panic.

CRs-Fixed: 1087738
Change-Id: I73ee708f2df6e1cd6b56fc40296ede490824f194
Signed-off-by: Gopikrishna Mogasati <gmogas@codeaurora.org>
2016-12-09 13:11:54 +05:30
Yuanyuan Liu
93a83d1592 icnss: Remove hardware reset sequence
Remove WLAN hardware reset sequence from ICNSS platform as it
will be taken care by WLAN FW.

CRs-Fixed: 1089686
Change-Id: I363ee028eeb360ef998fd90c1ff94bb09c4ac8b4
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
2016-12-08 23:03:54 -08:00
Vijayavardhan Vennapusa
61f63921e5 ARM: dts: msm: Add qcom,msm-imem-diag-dload node on msmfalcon/msmtriton
The diag dload memory region is part of IMEM. USB Diag driver
queries this device node for the memory address to access and update
USB PID and serial number. Hence add qcom,msm-imem-diag-dload node
on msmfalcon and msmtriton.

Change-Id: Ib283941037469833786b793c1e31e69e1c95d45d
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2016-12-08 21:19:52 -08:00
Hemant Kumar
47b27b4d0f usb: qusb2: De-assert TCSR_QUSB2PHY_CLAMP_DIG_N_1P8 upon boot up
This prevents leakage on 1p8 power rail upon boot up when usb cable
is not connect.

Change-Id: I28a4f495293863361843eb30b2d20f1f57889f95
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-12-08 20:30:52 -08:00
Ajay Singh Parmar
50e8d0fdeb msm: mdss: hdcp_1x: read contiguous data in a single read call
HDCP needs to read data from sink during authentication protocol.
Currently, hdcp reads the data one by one based on the addresses
provided in the hdcp specification. Optimize this by reading whole
data in one read call if the data lay contiguously in memory at
sink to avoid unnecessary delay which may affect hdcp compliance.

Change-Id: Icbeeb9b11a9bbe6808eb5c84b2561d6c74696522
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2016-12-08 18:36:57 -08:00
Puja Gupta
02871aa947 ARM: dts: msm: Move boot_rom_ahb_clk to proxy voted for msm8998
Proxy vote for gcc_boot_rom_ahb_clk for modem pil on msm8998 instead
of keeping the vote until the modem was shutdown.

Change-Id: Ib32d40351179a687eca38228c4503e4a9a88c28d
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
2016-12-08 17:03:10 -08:00
Aravind Venkateswaran
1bd7966d14 msm: mdss: fix handling of audio for DVI sinks
Certain sinks (such as DVI monitors) do not support audio
which can be identified using the sink's EDID. For such sinks,
ensure that audio is not routed over the external display.

Change-Id: I1c1a634bf096392094b5fd868a87385764657e6b
CRs-Fixed: 1093442
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-12-08 15:47:13 -08:00