Commit graph

590705 commits

Author SHA1 Message Date
David Collins
4544adae4c regulator: rpm-smd-regulator: add support for load based mode control
Add support to request PWM or AUTO mode for BoB and SMPS type
regulators based upon the aggregated consumer load current.  This can
be used in cases where a consumer needs to force PWM mode operation.

CRs-Fixed: 2054771
Change-Id: Iaf4353fb60468c91f958a968d844b3c1c012e54c
Signed-off-by: David Collins <collinsd@codeaurora.org>
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
2017-06-05 11:38:34 +05:30
Jaiju Yesudasan
24e54bcbce ARM: dts: msm: Disable neutrino reset GPIO at bootup on msm8996
Neutrino reset GPIO need to be be disabled at bootup.
It will be enabled by driver in its probe.

CRs-Fixed: 1072096
Change-Id: Ie4a0428523b0764e0234f0ae51a90c250166cca9
Signed-off-by: Jaiju Yesudasan <cjaijuy@codeaurora.org>
2017-06-04 22:35:16 -07:00
Prakash Gupta
65f095ea8f iommu/arm-smmu: Add support for regulator deferred disable
In case of unmap call, regulator is enabled/disabled. This may introduce
additional delay. For clients who do not detach, it's not possible to keep
regulator vote while smmu is attached.
Add support for regulator deferred disable. The time delay for deferred
disable can be set using dt property qcom,deferred-regulator-disable-delay
in ms.

Change-Id: I462e1999bd81f6332169b24749632d7b247c75c5
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
2017-06-05 10:42:56 +05:30
Linux Build Service Account
6666999e8a Merge "defconfig: msm8996: Use RCU_NOCB for RCU subsystem" 2017-06-04 21:32:07 -07:00
Venu Yeshala
a4491e8271 msm: camera: isp: Disable SMMU stall upon VFE page fault
Terminate fault transaction and don't stall SMMU for VFE.

CRs-Fixed: 2048270
Change-Id: I357d7b92c7c066bf2ba157bb35b4e350bcbebdda
Signed-off-by: Venu Yeshala <vyeshala@codeaurora.org>
2017-06-04 20:10:22 -07:00
Wei Li
43b5712520 defconfig: msm8996: Use RCU_NOCB for RCU subsystem
Use per CPU NOCB threads to process RCU callbacks, rather than processing
the callbacks in softirq context. Processing large number of callbacks
in softirq context may result in delayed execution of other softirqs, so
remove processing of callbacks from softirq context.

Change-Id: I90d070ad824d2df0f3e1ee29da1b48ae2887b64b
Signed-off-by: Wei Li <weili@codeaurora.org>
2017-06-04 18:54:38 -07:00
Abhijeet Dharmapurikar
e4bb6b0e53 battery: remove 20ms delay for running AICL
The driver waits 20mS after setting ICL to a step lower
than settled value before increasing it back to the effective
value. That 20mS delay is not required and causes PR_SWAP compliance
tests to fail. Remove it.

Change-Id: I8bd43a885c554df3590499ddf2a219e816e28734
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-06-04 13:04:39 -07:00
Linux Build Service Account
a62f42964d Merge "qcom: smb1351: add support for reporting INPUT_SUSPEND property" 2017-06-04 12:55:40 -07:00
Linux Build Service Account
e3ca3ef7a1 Merge "ARM: dts: msm: Early mount of vendor partition for msm8998" 2017-06-04 05:59:07 -07:00
Maya Erez
02e1658224 wil6210: support devices with different PCIe bar size
wil6210 devices can have different PCIe bar size, hence get the
bar size from PCIe device instead of using a constant bar size.

Change-Id: I02fe3f05e184b141c9a5519dd97c3f2d2eb99baf
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: d86d47164b227f01c3ec34c3f5a1613977d563eb
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-06-04 09:57:39 +03:00
Lior David
3f08f268ce wil6210: low level RF sector API
Added vendor commands for low level control over
RF sectors. It allows user space a fine-grained control
over RF characteristics for TX and RX, such as direction
and gain of TX/RX. Main usages are debugging and diagnostics,
but also operational use cases.
API includes getting/setting a specific RF sector
configuration, as well as getting/setting the selected
sector which is used to communicate with a station.

Change-Id: I2b1f2bab4f0fdc3d0177b19b7072c19f9ffa78bd
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: 0216a895946fa683ea51b842501e66106c0f1017
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
[merez@codeaurora.org: fixed merge conflicts]
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-06-04 09:57:33 +03:00
Linux Build Service Account
c5eb66bf52 Merge "soc: qcom: pil: Add trace events for PIL driver" 2017-06-03 22:36:47 -07:00
Linux Build Service Account
be36af2b20 Merge "drm/msm: fix leak in failed get_pages" 2017-06-03 22:36:46 -07:00
Linux Build Service Account
0a3cd753f4 Merge "input: synaptics_dsx: remove unused synaptics touch screen driver files" 2017-06-03 22:36:45 -07:00
Sujeev Dias
22cd52fbe8 mhi: core: Using usleep_range instead of msleep for sleep
msleep is not accurate for small delays.  Use usleep_range
for accuracy.

CRs-Fixed: 1117121
Change-Id: I9a076f843875bd83a21c96d4e4ea0510e82ce352
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
2017-06-03 18:08:44 -07:00
Runmin Wang
3fa7574984 defconfig: msmcortex_mediabox: Disable MODULE_SIG
Disable the module_sig for apq8098 target.

Change-Id: Ifd5927321bd2a5e8a55f6bae887ee86645889b6c
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
2017-06-03 11:35:54 -07:00
Ray Zhang
4de0a80827 ARM: dts: msm: add CEC device for msm8998
Add CEC device which provides HDMI CEC support for msm8998.
CEC is a protocol that provides high-level control functions
for the communication between various audiovisual devices.

CRs-Fixed: 2041335
Change-Id: If65798efa28e4b1eaeff5b6fa9b6f92318e7c91f
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-06-03 16:42:06 +08:00
Ray Zhang
1188a3afd2 msm: cec: Add CEC adapter driver for SDE hardware
This CEC adapter driver using CEC framework provides CEC
support for SDE hardware. CEC is a protocol that provides
high-level control functions between various audiovisual
products. This adapter is the hardware implementation of
CEC protocol, and its major functionality is to send and
to receive CEC messages.

CRs-Fixed: 2041335
Change-Id: I73bc9c63b78d61f5449a37cadcfeda976d5456b0
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-06-03 16:42:05 +08:00
Linux Build Service Account
d9f7e741f3 Merge "ARM: dts: msm: assign virtual planes on msm8996 auto platform" 2017-06-02 22:27:57 -07:00
Sushmita Susheelendra
d9b394c7c2 drm/msm: Fix drm_mm bottom_up search
The bottom up search of drm_mm hole nodes is
currently broken. It does not correctly look
for the first hole (smallest address) that fits
the allocation from the bottom up. Use an RB tree
to record hole nodes with their address as key,
so that the hole with the smallest address that
satisfies the request can be looked up.

Change-Id: Ie3020cb4e8b6db13a35d0fe5caaa8781cb6ced9f
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2017-06-02 15:48:46 -06:00
Sushmita Susheelendra
1f1dbe35f7 drm/msm: Use mmu notifiers to track SVM range invalidations
SVM buffer objects share the same virtual address on
both the CPU and GPU. Register for notifications when
SVM address ranges are unmapped on the CPU. When such
a notification is received, unmap the corresponding
SVM objects from the SMMU, after waiting on the most
recent fence that uses them. The notifier struct is
reference counted starting with the creation of the
first SVM bo in the process and is released when the
last SVM bo is freed.

Change-Id: I01f590d21fd1d146f5324539e5041f03653f858a
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2017-06-02 15:48:45 -06:00
Sushmita Susheelendra
0a367f63c1 drm/msm: Fix error path clean-up for buffer object creation
The reference count on a buffer object was being
decremented before it was initialized. Fix the
error path clean-up to put the reference only
after the kref has been initialized. Also, avoid
passing the object by reference when possible.

Change-Id: Ifbb1874deb5db9ae3fb2fbd40a58162998284e96
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2017-06-02 15:48:44 -06:00
Sushmita Susheelendra
f677e9604d drm/msm: Implement shared virtual memory ioctl
Shared virtual memory allows the CPU and GPU to use
the same virtual address for a buffer. This change
implements an ioctl to allow creation of SVM buffer
objects.

Change-Id: I0d929a2e37a9eeef948dc2a37250c1eb9adf6fc7
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2017-06-02 15:48:43 -06:00
Nicholas Troast
dfe3d45c65 power: qcom: smb-lib: check for USB removal after legacy WA
If the USB Type-C cable is removed while the legacy workaround is
running the IRQ will be ignored and the removal will not be detected.

Check for USB Type-C removal by manually triggering the IRQ when the
legacy workaround finishes.

Change-Id: Ie2e399915da88a9d7fc480767e4fad8abf23024d
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2017-06-02 14:45:39 -07:00
Linux Build Service Account
8254bed4a9 Merge "ARM: dts: msm: Modify coresight replicator device for msm8996" 2017-06-02 14:30:17 -07:00
Linux Build Service Account
d65465f57c Merge "ARM: dts: msm: enable HDMI & DSI displays on 8996 auto CDP platform" 2017-06-02 14:30:16 -07:00
Veerabhadrarao Badiganti
1cc23bd6d0 mmc: core: Initialize the devfreq table with default frequencies
Initialize the clock scaling frequency table with the platform specific
frequencies while preparing it. So that the frequencies supported by
the card can be compared against the frequencies supported by the
platform and then the table can be updated with the optimal frequencies
to match with both card and platform.

Without resetting these values to default values, this table contains
the frequencies updated for the last used card. These old values would
be used instead of platform-specific values to compare against the
frequencies of the newly inserted card. This can result in limiting
the max frequency to a lower frequency than what actually card can support.
Say if an high-speed card is used first and then a ultra-high-speed card,
the max scaling frequency would get set to the max of high-speed card
instead of max of the ultra-high-speed card.

Change-Id: I09a36e36c189e1d1fc317d798a0e3ff899f4e560
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
2017-06-02 23:20:33 +05:30
Veerabhadrarao Badiganti
70bc2b791f mmc: sdhci-msm: Store clock scaling frequencies in a dedicated table
Use a separate table to store the platform specific clock-scaling
frequencies.

The generic table where these frequencies used to be stored, would
get updated (in some cases) during clock scaling initialization.
But when a new card is inserted (In the case of a removable card),
the frequencies supported by the card should be compared against the
platform specific frequencies.

By storing these values in a separate table, these values would
remain intact and this table can be used for initializing the
generic table during clock-scaling initialization.

Change-Id: I5729f18a975f849bc2965a946473a9cdbd81e94a
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
2017-06-02 23:14:56 +05:30
Jack Pham
f447dd3d32 usb: xhci: Free leaked command in case xhci_queue_stop_endpoint fails
commit e3020f3887 ("xhci-hub: Handle error condition with
xhci_stop_device") added error checking to xhci_stop_device()
if xhci_queue_stop_endpoint() returns an error. However, the
command structure allocated was not getting freed in that case.
Fix the leak.

Change-Id: Ibc28e32c9e2d402db0c47bfe759dd442d3ab184f
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2017-06-02 09:59:15 -07:00
Jack Pham
a4253a4598 usb: xhci: Avoid accessing dangling virt_dev in xhci_stop_device
In xhci_stop_device() the virt_dev pointer is assigned from the
device slot prior to acquiring xhci->lock and disabling IRQs.
This is an opportunity for a TRB_DISABLE_SLOT command to have
completed (e.g. in case the device was disconnected, or the port
was disabled) which would have called xhci_free_virt_device()
and freed the slot's pointer in IRQ context. Then after the
lock is acquired virt_dev may now be pointing to freed memory
and results in a panic.

Avoid this by moving the assignment

	virt_dev = xhci->devs[slot_id];

and NULL pointer check to after the lock is taken to ensure that
we don't race against xhci IRQ handler.

Change-Id: I4ac23fbfd3def0ad93967316b62c0c0cd19ca33f
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2017-06-02 09:59:15 -07:00
Linux Build Service Account
28bf2d8b6b Merge "msm: smmu: add re-route calling for specified iova." 2017-06-01 23:49:13 -07:00
Linux Build Service Account
defde44926 Merge "power: qcom: smb138x-charger: do not enable parallel thermal regulation" 2017-06-01 23:49:13 -07:00
Linux Build Service Account
985d03300d Merge "qpnp-fg-gen3: configure ESR timers dynamically based on charge termination" 2017-06-01 23:49:12 -07:00
Linux Build Service Account
99beece72f Merge "ARM: dts: msm: update PCIe PHY sigdet settings" 2017-06-01 23:49:11 -07:00
Linux Build Service Account
6093e6dfe7 Merge "usb: pd: policy_engine: Handle spec revision properly" 2017-06-01 23:49:10 -07:00
Linux Build Service Account
09f613d5b5 Merge "core_ctl: Add sysfs node to disable core_ctl" 2017-06-01 23:49:00 -07:00
Thomas (Wonyoung) Yun
67ba46e02c ARM: dts: msm: assign virtual planes on msm8996 auto platform
The virtual planes are used to support wider HDMI display. Enable
them on msm8996 auto platforms in order to support 4K HDMI display.

Change-Id: I61bf00975ffac73c37f66dbc47dcc11b31df45df
Signed-off-by: Thomas (Wonyoung) Yun <wyun@codeaurora.org>
2017-06-01 22:22:40 -04:00
Guchun Chen
ae94b477af msm: smmu: add re-route calling for specified iova.
When calling smmu mapping, if iova is specified directly by user, not
allocated dynamically in dma-mapping.c, smmu driver needs to provide
support for this. This is needed in early display case. In this scenario,
LK has set physical memory to display hardware for fetching, so if iova
is not explicitly specified in kernel, but instead dynamically produced
by "alloc_iova" in dma-mapping.c, display hardware has no chance to know
this new iova, then smmu fault will happen if enabling the iommu stage-1
translation.
To fix this smmu fault problem, add re-routing to the right path when
iova specified by user is not 0 in smmu map/unmap function.

Change-Id: I062b04d7eec65af1c106a5caa09ec787b5d26d0d
Signed-off-by: Guchun Chen <guchunc@codeaurora.org>
2017-06-02 09:50:41 +08:00
Sujeev Dias
b5a2b57e74 mhi: mhi_uci: Create char dev only after PCIe device ID is known
MHI host may not have PCIe device info during channel
registration. Defer creation of char device until
PCIe bus enumeration is completed.

CRs-Fixed: 2040899
Change-Id: I6372523bd6a758f29dad09d207b86c3f87e2f2cc
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
2017-06-01 18:44:28 -07:00
Linux Build Service Account
7b2906163b Merge "clk: msm: clock-local2: Remove checks for display RCG re-configuration" 2017-06-01 16:56:02 -07:00
Linux Build Service Account
e0b49f46ed Merge "msm: kgsl: Use per page cache operation instead of bulk cache operation" 2017-06-01 16:56:02 -07:00
Linux Build Service Account
d1cf82998e Merge "ARM: dts: msm: Enable support for audio on guest virtual platform" 2017-06-01 16:56:01 -07:00
Linux Build Service Account
8db82e3c1d Merge "iommu: iommu-debug: limit memory address exposure" 2017-06-01 16:56:00 -07:00
Linux Build Service Account
2ce111aca6 Merge "diag: Add support for mhi shutdown notification" 2017-06-01 16:55:59 -07:00
Zhen Kong
465314f803 qseecom: fix listener unregistration issue
When listener unregister thread wakes up due to some system signals,
but not because ioctl_cnt <=1, it should return directly, instead of
continuing to remove listener list entry, which will lead kernel panic
when another listener receive thread accesses this freed entry.

Change-Id: I6ff97c56867d008232d7c50b22b372b0856c8dff
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2017-06-01 16:04:19 -07:00
Nicholas Troast
0337983597 power: qcom: smb138x-charger: do not enable parallel thermal regulation
USB connector HW based thermal regulation is active which will throttle
the input current on USBIN-USBIN configurations. This was enabled for
MID-MID configurations to enable the comparator output for USB connector
temperature mitigation, but since the input is bypassed it does not
throttle the input current. The comparator output is no longer used
since the ADC values are used directly, so neither configuration needs
this HW feature to be enabled.

Remove the write to enable this HW feature.

Change-Id: Ia7f6b3812ae222fbd8233d07dd6daa67e65ce08b
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2017-06-01 15:20:08 -07:00
Hemant Kumar
6577867741 usb: pd: policy_engine: Handle spec revision properly
As per USB PD 3.0 specification the 2-bit Specification Revision field
of a GoodCRC Message does not carry any meaning and Shall be considered
as don't care by the recipient of the Message. Hence set spec revision
to USBPD_REV_20 for GoodCRC message. PD protocol message header defaults
to USBPD_REV_20 which gets updated USBPD_REV_30 if PD 3.0 source capabale
of programmable power supply.

Change-Id: I5209bb00c437f3c959d093a972f1ac75233cbcf9
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2017-06-01 13:51:13 -07:00
Tony Truong
d74538ee29 ARM: dts: msm: update PCIe PHY sigdet settings
Sigdet under low power (LP) mode will use a less accurate local reference
generation, which is expected to have a little more variation than a
precise reference (normal mode). Update PCIe PHY sigdet to use normal
mode instead of LP to increase accuracy and make sigdet more robust.

Change-Id: If9cad9ac9b5a6a736e3af653ac3b3b5e30cfefb4
Signed-off-by: Tony Truong <truong@codeaurora.org>
2017-06-01 11:28:03 -07:00
Derek Chen
1c8d4daf2e ARM: dts: msm: move tdm common prop to parent node for msm8996 auto
Move tdm common properties from child node to parent
for msm8996 automotive hypervisor platform.

Change-Id: Idb94587d0e5bc35a2ddc6e398af795e956f18583
CRs-fixed: 2034655
Signed-off-by: Derek Chen <chenche@codeaurora.org>
2017-06-01 11:24:58 -07:00
King Tam
5acecf5e08 ARM: dts: msm: Enable support for audio on guest virtual platform
Update device tree nodes to support audio on guest virtual machine.

Change-Id: Id2e12b466cff43d8ddcb5c01ecd7bb1a7f0ba04c
CRs-fixed: 2047317
Signed-off-by: King Tam <kingt@codeaurora.org>
2017-06-01 11:24:42 -07:00