Commit graph

879,583 commits

Author SHA1 Message Date
Vivek Aknurwar
5b2e722764 clk: qcom: gdsc-regulator: Remove regulator voltage level voting
On Lahaina, both VDD_GFX and VDD_MMCX support LowSVS as the minimum
non-OFF level. Therefore regulator_set_voltage() calls are redundant
and can be safely removed.

Commit f8702f9e4a ("regulator: core: Use ww_mutex for regulators
locking") introduced a call to mutex_lock(&regulator_list_mutex)
inside of regulator_lock_dependent(). This additional locking allows
deadlock to occur for regulator devices whose regulator_ops callback
functions internally call consumer regulator framework API functions
(e.g. regulator_enable(), regulator_disable(), or regulator_set_voltage()).

For short term remove all regulator_set_voltage() calls in the
gdsc-regulator driver as a short term partial workaround for regulator
framework deadlock issue.

Change-Id: I36dff589fe51ea4c932c310b7290a45b21f77992
Signed-off-by: Vivek Aknurwar <[email protected]>
2020-03-25 15:08:48 -07:00
Bojun Pan
e060905353 msm: ipa4: new qmap flow control pipe definitions
Add 2 new pipes support for QMAP Flow Control packets.
Those 2 pipes will be used for low latency traffics.

Change-Id: I08d79f3fec6da2a958a1416c4b00781fa84eb156
Signed-off-by: Bojun Pan <[email protected]>
2020-03-25 15:03:17 -07:00
Bojun Pan
4aa37836f1 msm: ipa4: function prototype for new qmap flow control
Add new function prototype for rmnet_ctl module to support new
qmap flow control with new IPA pipes.

Change-Id: I5b2cfa5c7575dc67096cc11fd74402946fb71617
Signed-off-by: Bojun Pan <[email protected]>
2020-03-25 14:25:09 -07:00
Gaurav Kashyap
368be07f84 defconfig: Support for QTI inline encryption
Enable the following flags for variant ops.
1. CONFIG_SCSI_UFS_CRYPTO_QTI.
2. CONFIG_QTI_CRYPTO_COMMON.
3. CONFIG_QTI_HW_KEY_MANAGER.

Change-Id: Id061d551a74e959d643af1c0235a313d70972b6f
Signed-off-by: Gaurav Kashyap <[email protected]>
2020-03-25 10:58:40 -07:00
Gaurav Kashyap
c7b91c4798 soc: qcom: add HWKM driver for FBE
Add hardware key manager driver in the HLOS kernel
to facilitate storage encryption using HWKM.

Change-Id: I3531ab083443e2ef41ee5990386b9052ea69841d
Signed-off-by: Gaurav Kashyap <[email protected]>
2020-03-25 10:58:40 -07:00
Gaurav Kashyap
54905869ef ufs: ice: add variant ops for ICE
Add QTI implementation for variant ops required for inline
encryption with wrapped key support. These include UFS
crypto ops and KSM ops.

Change-Id: Ica930a8a806a78d4c2d074639cbed355b895a459
Signed-off-by: Gaurav Kashyap <[email protected]>
2020-03-25 10:58:30 -07:00
Subbaraman Narayanamurthy
8f7c5d5cb1 power: supply: qti_battery_charger: Allow ICL to be set only for SDP
Input Current Limit (ICL) needs to be set only for SDP and not
for other charger types. Add that logic.

Change-Id: Ib48acf5666ea4190b7a11c27ab9cefbb534632fb
Signed-off-by: Subbaraman Narayanamurthy <[email protected]>
2020-03-25 10:25:07 -07:00
Hemant Kumar
b7dfed82fb mhi: core: Force PM state to M0 while processing BW scaling event
Driver defers processing of BW scaling event if PM state is not in
M0. This delays the BW scaling to take effect. Fix this issue by
resuming the device if it was suspended state and assert wake DB.
After changing the BW of the link de-assert the wake DB.

Change-Id: Ibf827912a4de71d14f461382c28080157c65d6e0
Signed-off-by: Hemant Kumar <[email protected]>
2020-03-24 18:51:57 -07:00
Harshdeep Dhatt
ffc94db8f0 msm: kgsl: Scale hub clock to 150 Mhz
This is a new clock in a660 which needs to be run at
150 Mhz instead of running at 19.2 Mhz by default.

Also, there is no need to store a gmu_clk pointer
so get rid of it too.

Change-Id: If2741c061339e914683ca25565d1bac3ec6ac100
Signed-off-by: Harshdeep Dhatt <[email protected]>
2020-03-24 15:30:20 -06:00
Raghu Ananya Arabolu
803861c144 msm: kgsl: LPAC is using incorrect pagetable
We are incorrectly using the default pagetable for LPAC when per-process
page tables are disabled. Create a separate pagetable for LPAC.

Change-Id: I93b9c764fe91260b8b27c9b2d847429d1595a839
Signed-off-by: Raghu Ananya Arabolu <[email protected]>
2020-03-24 11:55:26 -07:00
qctecmdr
3a82802e7b Merge "mhi: core: handle pm error state transition within fast suspend/resume" 2020-03-24 05:33:16 -07:00
Harshdeep Dhatt
47d025c33d msm: kgsl: Don't send same bus vote repeatedly
Currently, we keep sending the same bus vote endlessly. Fix that,
so that a bus vote is sent only if it was different than previous.

Change-Id: I93cd052daaee6d4e11c3c2f7cfe13ae23b3b3f44
Signed-off-by: Harshdeep Dhatt <[email protected]>
2020-03-24 04:04:08 -06:00
qctecmdr
7b19902e1e Merge "bus: mhi_netdev: Free background memory pool during memory free" 2020-03-24 01:37:30 -07:00
qctecmdr
238ae416ca Merge "mhi: core: Synchronize time sync operation and removal" 2020-03-24 01:37:29 -07:00
qctecmdr
876ef7a93a Merge "mhi: core: fix fast forward recycling of event rings" 2020-03-24 01:37:29 -07:00
qctecmdr
bccba79c9f Merge "fbdev: core: Initialise structure to prevent kernel information leak" 2020-03-24 01:37:28 -07:00
Satya Rama Aditya Pinapala
f5c1a1c3e4 drivers: input: touchscreen: defer probe if panel not found
In many cases display panel information may not be available when the touch
driver is being probed. This change defers the probe if the panel is not
found to ensure that the correct touch driver is probed.

Change-Id: I12d1dd3678a85baa468b332d61be4ba9ce81db43
Signed-off-by: Satya Rama Aditya Pinapala <[email protected]>
2020-03-23 19:54:04 -07:00
Hemant Kumar
b99432af45 mhi: core: Add range check for channel id received in event ring
The mhi_process_cmd_completion function reads cmd channel id from
cmd_pkt using MHI_TRE_GET_CHID, the value is under the control of MHI
devices and can be any value between 0 and 255. However the max channel
is defined in device tree file and it is usually smaller than 255. This
can cause out of bound access to the channel array. Fix this by checking
the channel id received in cmd ring against the max channel allowed on
target.

Change-Id: Ib6faf67c7eae67186b3a44e6b1612deff6bf05fa
Signed-off-by: Hemant Kumar <[email protected]>
2020-03-23 18:36:26 -07:00
Tony Truong
551af1de35 msm: pcie: correct PCIe1 and PCIe2 clock order
PCIe1 and PCIe2 default clock structure needs to have same
clock order as PCIe0. Update the order of PCIe1 and PCIe2
to be the same as PCIe0.

Change-Id: Icefb0f85e301cb3ba9ee4c07d01cf4110137d489
Signed-off-by: Tony Truong <[email protected]>
2020-03-23 17:41:09 -07:00
Hemant Kumar
34c9ed3cc4 mhi: core: Finish pending reg writes before entering suspend
It is possible that the write offload worker gets a chance to
run after PCIe link is handed off to DRV subsystem. DRV
subsystem can enter L1SS sleep while work handler is trying to
access MHI register. This results into NOC error. Fix this
issue by flushing work before handing off PCIe link to DRV
subsystem or link enters D3 cold.

Change-Id: I83e33b3753b62bf13a7f50af52c951b7a09a32e7
Signed-off-by: Hemant Kumar <[email protected]>
2020-03-23 17:27:43 -07:00
Hemant Kumar
d167ac3bf6 mhi: core: Add support to offload MHI register write to worker thread
When PCIe endpoint enters L1SS sleep and mhi client on Host tries to
queue a transfer request endpoint takes more than 6ms to come back to
L0 state. This can cause CPU stall if MHI register write is followed
by a write memory barrier. This can cause other tasks to get blocked.
In order to prevent this add register write offload API
mhi_write_reg_offload() which would queue the write and handle write
request from worker thread in AMSS execution environment.

Change-Id: I0a8b06d2ba96d9beb32fa31564aa0cbb26c885e6
Signed-off-by: Hemant Kumar <[email protected]>
2020-03-23 17:27:43 -07:00
Hemant Kumar
52aee5bca7 mhi: core: Add write_reg call back for mhi controller
This allows to make a decision if different write call
back needs to be called.

Change-Id: I888da16e15e30ac1a7cb58d9272d6041b4d30ec7
Signed-off-by: Hemant Kumar <[email protected]>
2020-03-23 17:26:54 -07:00
Hemant Kumar
8edb589abf mhi: core: Treat MHI_ASSERT as fatal error
Currently MHI_ASSERT causes kernel panic in debug mode.
In performance mode it just prints warning and continues.
This can cause memory over-read, out of bound memory read.
All the places driver is asserting need to result into a
kernel panic to root cause the issue and prevent unwanted
memory access.

Change-Id: Ica8e1fec7be916621398cd4c5f8bfa6718c33d72
Signed-off-by: Hemant Kumar <[email protected]>
2020-03-23 17:17:38 -07:00
Raghavendra Rao Ananta
9f6494a615 defconfig: arm64: Enable EUD driver for GKI
Enable the Embedded USB debug driver as a module on GKI
builds for Lahaina platform.

Change-Id: I8cd9e94153c08848c4afeb2fb5e24f0ffc81e3e6
Signed-off-by: Raghavendra Rao Ananta <[email protected]>
2020-03-23 17:10:34 -07:00
Sathish Ambley
b30ed4d29d arm64: defconfig: Enable QVR HID driver on Lahaina
Enable QVR HID driver on Lahaina.

Change-Id: Iee185906c39c7358445af60711176a3f32af7536
Signed-off-by: Sathish Ambley <[email protected]>
2020-03-23 16:24:12 -07:00
rbandi
50dd94483d HID: Adding new id for hid-qvr support
Adding new vendor id and product id to
support additional hardware.

Change-Id: I777568f1a68b15345695e09d2ad89e9230508886
Signed-off-by: rbandi <[email protected]>
2020-03-23 16:24:05 -07:00
rbandi
57c2cc05e2 HID: Adding new vendor id for QVR support
Adding new vendor id to support additional hardware.

Change-Id: I9b37b4dfe0c205428d235ffe1e5f8d8ebe918998
Signed-off-by: rbandi <[email protected]>
2020-03-23 16:22:48 -07:00
Raghavendra Rao Ananta
79e79ca0d5 arm64: defconfig: Enable hung tasks detection
Enable hung task detection for Lahaina platform to detect the
tasks that are stuck in uninterruptible "D" state indefinitely.

Change-Id: Ieb18c8452b3643c57d11ba697a359d5beb7d7255
Signed-off-by: Raghavendra Rao Ananta <[email protected]>
2020-03-23 15:45:07 -07:00
Imran Khan
df5442d862 hung task: check specific tasks for long uninterruptible sleep state
khungtask by default monitors all tasks for long unterruptible sleep.
This change introduces a sysctl option, /proc/sys/kernel/
hung_task_selective_monitoring, to enable monitoring selected tasks.
If this sysctl option is enabled then only the tasks with
/proc/$PID/hang_detection_enabled set are to be monitored,
otherwise all tasks are monitored as default case.

Some tasks may intentionally moves to uninterruptable sleep state,
which shouldn't leads to khungtask panics, as those are recoverable
hungs. So to avoid false hung reports, add an option to select tasks
to be monitored and report/panic them only.
By default, enable the feature always to monitor selected tasks.

Change-Id: I48cd8cfe73dbe2b577541fe9607190eac5556bb2
Signed-off-by: Imran Khan <[email protected]>
Signed-off-by: Lingutla Chandrasekhar <[email protected]>
[sramana: Resolved minor merge conflict]
Signed-off-by: Srinivas Ramana <[email protected]>
[rananta: Resolved compilation errors]
Signed-off-by: Raghavendra Rao Ananta <[email protected]>
2020-03-23 15:44:56 -07:00
qctecmdr
f7f07211e0 Merge "dwc3-msm: Check usb role switch status" 2020-03-23 15:12:36 -07:00
qctecmdr
8537059a43 Merge "mhi: core: Add NULL check in debugfs show callback" 2020-03-23 15:12:35 -07:00
Isaac J. Manjarres
609444d0d7 staging: ion: Allow for attach and detach ops to be overridden
The ION core is supposed to allow for all of the dma-buf ops
to be overridden by a heap's dma-buf ops. However, the
attach and detach ops are not overridable, which doesn't make
much sense, as the other dma-buf ops assume that the attachment
structure that they operate on was allocated by their attach
callbacks, which aren't being invoked. Thus, allow for the dma-buf
attach and detach ops to be overridable.

Change-Id: I8e9cbccac6df8810a85eff8c153a18ab76d275fb
Signed-off-by: Isaac J. Manjarres <[email protected]>
2020-03-23 14:57:51 -07:00
Hemant Kumar
e25d6582a3 mhi: core: Read transfer length from an event properly
When MHI Driver receives an EOT event, it reads xfer_len from the
event in the last TRE. The value is under control of the MHI device
and never validated by Host MHI driver. The value should never be
larger than the real size of the buffer but a malicious device can
set the value 0xFFFF as maximum. This causes device to memory
overflow (both read or write). Fix this issue by reading minimum of
transfer length from event and the buffer length provided.

Change-Id: I1ff21ed504acc901ec334b402362915ca2a7d4c4
Signed-off-by: Hemant Kumar <[email protected]>
2020-03-23 14:54:10 -07:00
Hemant Kumar
c427eba1c5 mhi: core: Dump more logs when invalid cookie is received
Dump event ring element, cookie value and bug_ring length
when invalid cookie is received.

Change-Id: I831f10f6e894326b17cb3a405b498cae8111b11d
Signed-off-by: Hemant Kumar <[email protected]>
2020-03-23 14:54:10 -07:00
Hemant Kumar
72f7f413c1 mhi: core: Skip handling MSI0 if MHI register access is not allowed
Driver continues handling of MSI0 interrupt even if MHI register access
is not allowed. By doing so it calls the status call back and performs
early notification for the MHI client. This is not needed when MHI register
access is not allowed. Hence skip the handling in this case and return.

Change-Id: I4639cedfd45166f28379539bccb25acd383faca5
Signed-off-by: Hemant Kumar <[email protected]>
2020-03-23 13:32:12 -07:00
Bhaumik Bhatt
6f55f77a77 mhi: core: handle pm error state transition within fast suspend/resume
During fast suspend/resume, the power management states in MHI
can change to any error state. Allow for it by re-checking and
handling it such that pm states are not lost or over-written in
the process.

Change-Id: I264ae096d20b9752837624dc3a4b3ea6131ad9a6
Signed-off-by: Bhaumik Bhatt <[email protected]>
2020-03-23 13:29:32 -07:00
Bhaumik Bhatt
c83054cce3 mhi: cntrl: qcom: notify DRV suspend if device wake is set
Host can do a DRV handoff when device wake is set preventing
the device to go to low power modes. Notify DRV processor of
the same so it has device state awareness and acts accordingly
in order to prevent host from attempting low power modes.

Change-Id: I8e3a95b208cce6fed668fa666ac3d338590f9a96
Signed-off-by: Bhaumik Bhatt <[email protected]>
2020-03-23 13:12:53 -07:00
Bhaumik Bhatt
d0a4940862 mhi: core: fix fast forward recycling of event rings
Some low priority event rings operate on a fast forwarding
mechanism where only the latest event is processed and the rest
are skipped. The recycle API only handles updating the
context write pointer in sequence which causes an out of bounds
doorbell issued to the device due to mismatched values. Add
another API to support handling updates for context write
pointer separately with the fast forwarding use case.

Change-Id: If628b49e063d14920fe734ebd113c9c4c733204b
Signed-off-by: Bhaumik Bhatt <[email protected]>
2020-03-23 12:58:23 -07:00
Bhaumik Bhatt
cf2a299dea mhi: cntrl: qcom: disable boot logger after forced suspend
Prioritize handling of forced suspend/resume cycle at mission
mode entry and disable boot logger channel after the cycle has
completed to avoid race conditions.

Change-Id: Iddc3d560fa687399434cc8ad51c08509ddfadf70
Signed-off-by: Bhaumik Bhatt <[email protected]>
2020-03-23 12:56:24 -07:00
Bhaumik Bhatt
fc22a3ea18 bus: mhi_netdev: Free background memory pool during memory free
Fix freeing the background memory pool to avoid kmemleak as
part of freeing the memory pool.

Change-Id: I29c9d972295900bd0b97c8ab8ee73d668e05a59f
Signed-off-by: Bhaumik Bhatt <[email protected]>
2020-03-23 12:53:03 -07:00
Hemant Kumar
1092885dc8 mhi: core: Add NULL check in debugfs show callback
Upon external soc power down mhi controller context pointer
is set to NULL. If debugfs query is issued at that time it
results into NULL pointer dereference. Fix the issue by adding
a NULL check in debugfs show callback for event and channel.

Change-Id: I8c947bc6c42e80c625bf06c17e73368d2195a2bb
Signed-off-by: Hemant Kumar <[email protected]>
2020-03-23 12:47:06 -07:00
Hemant Kumar
ad557197eb mhi: core: Synchronize time sync operation and removal
If time sync is requested by user space when endpoint is shutting
down dev_wake count gets incremented. This is causing assert when
shutdown API checks the dev_wake count and it is still non-zero.
Fix this issue by protecting time sync API and removal of time sync
under tsync_mutex. This helps to take care of a race condition when
time sync is requested while time sync remove in progress and also
makes sure that dev_wake count becomes zero when time sync remove
is done to prevent assert condition.

Change-Id: I4e758611613e541537dd900306aa81dd3b4a9f3a
Signed-off-by: Hemant Kumar <[email protected]>
2020-03-23 12:43:16 -07:00
George Shen
8deb5e715e msm: cvp: A fix of cvp issue in camera
Fix the wrong synx array index use.

Change-Id: I0f4847fb2e14221319b07efa211428e98dc16b81
Signed-off-by: George Shen <[email protected]>
2020-03-23 11:27:05 -07:00
Mayank Rana
0d9ddf2e82 dwc3-msm: Check usb role switch status
If extcon handler is present and dpdm regulator is absent, current
code starts USB state machine without checking usb role switch status.
This results into USB PHY being reset while ADSP firmware is performing
charger detection. This may result into wrong/invalid charger detection
instead of SDP causing no USB enumeration. Fix this issue by checking
usb role switch status before kicking USB state machine.

Change-Id: Ic25083a74ac867eeb3869588c3060e6bf05e4007
Signed-off-by: Mayank Rana <[email protected]>
2020-03-23 10:44:22 -07:00
qctecmdr
d548095fbb Merge "defconfig: lahaina: Enable PRIORITIZE_OOM_TASKS" 2020-03-23 09:48:51 -07:00
qctecmdr
96cd181257 Merge "arm64: defconfig: Enable Atmel touchscreen on Lahaina" 2020-03-23 06:12:36 -07:00
qctecmdr
71f2d78136 Merge "msm: ipa: remove ipa and gsi from kernel" 2020-03-23 06:12:36 -07:00
qctecmdr
4a1a3d75a4 Merge "radio: RTC6226: correctly cleanup videodev" 2020-03-23 06:12:36 -07:00
qctecmdr
b7cf7a3061 Merge "arm64: defconfig: enable QPNP AMOLED regulator driver on Lahaina" 2020-03-23 06:12:35 -07:00
qctecmdr
14e3df3b94 Merge "msm: kgsl: use correct load bit value for rbbm perf counter" 2020-03-23 06:12:35 -07:00