Commit Graph

1006307 Commits

Author SHA1 Message Date
qctecmdr
82428e9c7a Merge "msm: kgsl: Avoid double SLUMBER entry" 2021-11-18 12:29:24 -08:00
qctecmdr
d23e4be453 Merge "msm: mhi-dev: Add support for AIO write API" 2021-11-18 08:30:27 -08:00
qctecmdr
4df16f3bb6 Merge "usb: repeater: Add USB repeater framework for eUSB2 functionality" 2021-11-18 06:33:14 -08:00
qctecmdr
b344ef8715 Merge "msm: mhi_dev: Process the PM_RST_DEAST event in the caller context" 2021-11-18 06:33:11 -08:00
qctecmdr
3549987819 Merge "qseecom: Handle blocked on listener case while load/unload" 2021-11-18 04:12:57 -08:00
qctecmdr
7f5ec5c19b Merge "msm: mhi_dev: Adding log for channel wakeup" 2021-11-18 04:12:56 -08:00
Hareesh Gundu
9741a3daa5 msm: kgsl: Remove undefined HLSQ register dump to A6xx snapshot
Commit 297883f14279 ("msm: kgsl: Dump HLSQ_DBG_CNTL in snapshot")
added extra register “0xD004” which does not exists. Remove this
register to have only required registers in snapshot dumping.

Change-Id: I6dcdf6b0fdbcc89ac6854bd1b8a7d20cd375f621
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
2021-11-18 16:00:13 +05:30
Nitesh Gupta
a1d3289831 msm: mhi_dev: free allocated memory in reverse order of allocation
Freeing cmd_ctx before ereqs will result into NULL ptr
dereference. Freeing memory in proper order.

Change-Id: Ie999017685574e940685eee3b7c205ebe1672664
Signed-off-by: Nitesh Gupta <nitegupt@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-11-18 15:42:24 +05:30
Can Guo
2afac356ea msm: ep-pcie: Fix icc bus vote and add icc bus unvote
We need to perform icc bus vote when enable endpoint and bus unvote when
disable endpoint. However, icc_path is released during endpoint disable
(by ep_pcie_clk_deinit()). This change fixes icc bus vote and adds icc bus
unvote accordingly.

Change-Id: Iaa4c6e4df5923a325f038dba689ef17bc746bab4
Signed-off-by: Can Guo <cang@codeaurora.org>
2021-11-18 01:34:43 -08:00
Subramanian Ananthanarayanan
ac796f3c71 msm: mhi: Queue pending_ring WQ post channel DB check
Change is to queue pending_ring post updating CH db_pend
variable. This is done to avoid chdb_ctrl_work WQ from getting
pre-empted and pending_ring WQ executing.

Change-Id: I3504c89006c1231251be6efdfebac52b0fd35cc9
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-11-18 14:57:27 +05:30
Veerabhadrarao Badiganti
6a2e24703c msm: ep-pcie: Use threaded irq for PERST de-assertion handling
When the host de-asserts the PERST, ep-pcie driver needs to bring-up
the link as quickly as possible (within 150ms). Otherwise, the host
may fail to detect the link.

In our current design, we are doing the link initialization and
link training in a kworker thread context. In some scenarios
this context is incurring context switches and scheduling  delays
which is resulting in issues like the host fails to detect the link.

To fix this, perform the link initialization and training in the
highest possible priority (threaedIRQ). With this change, PCIe driver
notifies clients in threadedIRQ context and the clients (Eg MHI)
supposed to invoke the link training in the same context.

Change-Id: I04de4a1dfb3a145b947a2824c6961da70215944b
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
2021-11-18 14:54:20 +05:30
Gauri Joshi
432865f098 msm: mhi-dev: Check to avoid null pointer dereference
If mhi is not enabled the channels ring remain uninitialized. The host
might reset mhi which will result in device crash due to
null pointer dereference for the channel ring. Check if the pointer is
NULL before dereferencing it to avoid the crash.

Change-Id: I582f9a8a6c9bdca8d5f57e1800b566cca389b830
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-11-18 14:40:26 +05:30
Sivasri Kumar, Vanka
1297291903 Merge keystone/android12-5.10-keystone-qcom-release.66+ (611d258) into msm-5.10
* refs/heads/tmp-611d258:
  ANDROID: GKI: add allowed list file for xiaomi
  ANDROID: GKI: Update symbol list

Change-Id: I8264332ed3a5410ac00cb18368c71679d6cdb937
Signed-off-by: Sivasri Kumar, Vanka <quic_svanka@quicinc.com>
2021-11-18 14:28:08 +05:30
Veerabhadrarao Badiganti
7fea4c9b12 msm: mhi: Handle PCIe events from the common work queue
A couple of instances are observed in which MHI got D3hot and D0 in
a very short span, but the device processed D0 first and D3hot later.
This is resulting s/w state machine going out of sync with h/w
resulting MHI driver to trigger syserr.

Below is the sequence of events:

1) received: EP_PCIE_PM_D3_HOT_EVENT
2) IPA DMA successfully disabled
3) received: EP_PCIE_PM_D0_EVENT
4) Start handling EP_PCIE_PM_D0_EVENT, Current states M-3, D0
   Nothing to do, already in D0 state
5) Start handling EP_PCIE_PM_D3_HOT_EVENT, Current state M-3, D0
6) Start handling MHI_DEV_EVENT_M0_STATE, Current state M-3 & D3_HOT
   MHI_DEV_EVENT_M0_STATE: illegal in current MHI states: M-3 & D3_HOT

Though both works (from the same work queue) are waiting on the same
mutex lock, somehow the work which is processing D0 got the lock first.
The only possibility is priority inversion.

To avoid this scenario use mhi_sm_wq for PCIe event which ensures one
execution at any given time.

commit <37ea867103f2>("msm: ep-pcie: Use threaded irq for PERST
de-assertion handling"), ensures PERST de-assertion events are handled
at max possible priority. So we don't really need high priority system
work queue for handling other PCIe events.

Change-Id: Id147bf8eae7b09999289c70be87dd98b9f68ba3b
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
2021-11-18 00:13:54 -08:00
Gauri Joshi
d0f375f7a4 msm: mhi: Prevent flush queue if channel is closed
Change is to prevent flush events being queued post channel close and
wait for pending flush event callbacks prior to channel close.

Change-Id: Ic168be0a187b3edcfeccedc565fb02673eaee883
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-11-18 00:10:44 -08:00
Veerabhadrarao Badiganti
aed820cbbb msm: mhi_dev: Process the PM_RST_DEAST event in the caller context
With the commit <37ea867103f2>("msm: ep-pcie: Use threaded irq for
PERST de-assertion handling"), PCIe driver notifies the PM_RST_DEAST
event in threadedIRQ context. Process this event in the same
context so that we can finish link initialization and training as
quickly as possible.

Change-Id: If920fd9b653d6ae82cea599effb2d912a9b08174
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
2021-11-18 13:40:22 +05:30
Subramanian Ananthanarayanan
d1284693c5 msm: mhi_dev: Use Ring event lock while sending write completion
Change involes usage of event ring mutex while sending write
channel completion events.

Change-Id: I3817e140551954a732e26d097d53176d573bf7f5
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
2021-11-18 00:08:11 -08:00
Gauri Joshi
6720389957 msm: mhi-dev: Add support for AIO write API
Diag client uses asynchronous writes for data transfer.
Adding write_iter API in mhi to support the same.

Change-Id: If14ebdd4aa848046abd15ea93d939691c6962fcd
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-11-17 22:32:44 -08:00
Abhinab Abhinab
ddb8b20a7e msm: mhi_dev: Adding log for channel wakeup
Add log for channel details during host wakeup scenario.

Change-Id: I93cf24c46523544414fb6c362d4bc335da4ec4f6
Signed-off-by: Abhinab Abhinab <aabhinab@codeaurora.org>
2021-11-17 22:31:42 -08:00
Gauri Joshi
e2774147dd msm: mhi_dev: stop reading host CH ring when CH is reset
The host can asynchronously reset the channel and this can happen when
there are pending ch interrupts to process on the EP.

The change is to prevent processing the old DB rung by the host by
adding delaying channel reset cmd ack.

Change-Id: I020a9961196867a7cc1ac8e4f309d0a75c38f6f5
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-11-17 21:46:10 -08:00
Subramanian Ananthanarayanan
b708f9ecaa msm: mhi: Stop sending event completion, during channel reset
The change is to prevent sending channel completion events,
post a channel stop or reset command.

Sending a channel completion post reset can cause the RP
to in reset value and hence the completion will be treated
as an out of order event.

Change-Id: I2cdd7a705a001689609ff8fa1f31fe11d61e5ea8
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-11-17 21:44:55 -08:00
Gauri Joshi
694a5bc187 msm: mhi-dev: Send channel state broadcasts for QRTR channels
Set the channel attribute for QRTR channels (MHI_CLIENT_IPCR_OUT
and MHI_CLIENT_IPCR_IN) so that QRTR client gets the uevent
broadcast when the channel state changes. Change the naming
for the structure to mhi_chan_attr_table since kernel clients are
also configured using the same structure.

Change-Id: I40232a09c27d7410d772055448d0354fb0c359b1
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-11-17 21:42:51 -08:00
qctecmdr
39867d7103 Merge "pci: controller: qcom: Register for early SSR notifications" 2021-11-17 18:45:00 -08:00
qctecmdr
2745b60b79 Merge "soc: qcom: logbuf: Fix the buffer overflow in logbuf driver" 2021-11-17 11:17:02 -08:00
qctecmdr
ea0a60dcfe Merge "msm: mhi_dev: Poll for ipa_dma_disable during MHI suspend" 2021-11-17 11:17:01 -08:00
qctecmdr
5b443c3c81 Merge "msm: mhi: Send Ch cmd ack in async fashion" 2021-11-17 11:17:00 -08:00
qctecmdr
7d3bc6ab02 Merge "msm: mhi-dev: Block the adb read when mhi is in suspend" 2021-11-17 11:16:59 -08:00
qctecmdr
f6c30b97b3 Merge "msm: kgsl: Add notifier call for thermal constraints" 2021-11-17 11:16:57 -08:00
Pratham Pratap
94cd9e41cf usb: repeater: Add eUSB2 repeater driver
This change adds eUSB2 repeater driver. This driver
provides reset, initialization and power up/down interfaces
for eUSB2 repeater.

Change-Id: Ifa427f1971e8ebca5da3c12de694499ced7a48aa
Signed-off-by: Pratham Pratap <quic_ppratap@quicinc.com>
2021-11-17 11:12:46 -08:00
Mayank Rana
eea757d3fa usb: phy: Add USB EUSB2 HSPHY driver for USB HS/LS/FS functionality
This change adds SNPS USB eUSB2 PHY driver which is used to reset
and initialize USB eUSB2 PHY for USB HS/LS/FS functionality. As eUSB2
PHY communicates with conneced repeater for USB2 signaling this driver
uses registered repeater to invoke repeater specific reset and
initialization sequence.

Change-Id: I497ad608e19f4b8f61aeb0420e73b69981d0f4a5
Signed-off-by: Mayank Rana <quic_mrana@quicinc.com>
Signed-off-by: Pratham Pratap <quic_ppratap@quicinc.com>
2021-11-17 09:33:07 -08:00
Mayank Rana
904a766e16 usb: repeater: Add USB repeater framework for eUSB2 functionality
eUSB2 PHY needs to communicate with repeater, and can't work
independently for USB2 functionality. Hence this change adds
repeater framework which allows repeater driver to register and
provide supported repeater operations (reset, init, powerup,
powerdown, suspend). It also allows eUSB2 PHY driver to get
reference of connected repeater driver, and invoke required set
of operations to get repeater into functional mode for USB2
functionality.

Change-Id: I2bc6b1dbb958334373d1652205bcc63257130172
Signed-off-by: Mayank Rana <quic_mrana@quicinc.com>
Signed-off-by: Pratham Pratap <quic_ppratap@quicinc.com>
2021-11-17 09:32:42 -08:00
qctecmdr
fcadfff61a Merge "qdss_bridge: handle usb write done event" 2021-11-17 09:21:38 -08:00
qctecmdr
863b21b7af Merge "arm64: defconfig: Enable interconnect driver for Parrot" 2021-11-17 09:21:38 -08:00
qctecmdr
2c18ce1bf8 Merge "msm: adsprpc: Skip ramdump collection" 2021-11-17 09:21:37 -08:00
qctecmdr
637d6c9396 Merge "msm: pci: Add support to set PCIe SNPS controller link speed" 2021-11-17 09:21:35 -08:00
Sushmita Susheelendra
a51a5c37b1 msm: kgsl: Add new tracepoints for command batch ready and done
The new tracepoints adreno_cmdbatch_ready and adreno_cmdbatch_done
provide common begin and end reference points respectively
for comparison between dispatch on GMU and host.
adreno_cmdbatch_ready is logged after the sync dependencies
for a command have been resolved and the command is therefore
ready to be submitted. adreno_cmdbatch_done is logged on
both SW and HW dispatcher threads just before signaling
events for the command.

Change-Id: If9587bae0d4655be93bfc3fee855d6ffbe967e1f
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2021-11-17 11:25:14 -05:00
qctecmdr
fb98460535 Merge "Merge keystone/android12-5.10-keystone-qcom-release.66+ (233f97e) into msm-5.10" 2021-11-17 06:32:54 -08:00
Vivek Pernamitta
a8fd09def9 msm: pci: Add support to set PCIe SNPS controller link speed
Add support to configure pcie max link speed in link capability
register if SW need to program the SNPS controller register
to advertise max speed supported by PHY.

Change-Id: I2d4a93a4fd3ad0c0e5b969dafff8040f213cb097
Signed-off-by: Vivek Pernamitta <vpernami@codeaurora.org>
2021-11-17 19:08:07 +05:30
Jeya R
4640eefb35 msm: adsprpc: Skip ramdump collection
Skip ramdump collection in the first
boot to fix hang issue from ram dump
frame work.

Change-Id: Iee8e0753f1f36ea546fb254a09c7cdb7476d1ae2
Acked-by: Krishnaiah Tadakamalla <ktadakam@qti.qualcomm.com>
Signed-off-by: Jeya R <jeyr@codeaurora.org>
2021-11-17 04:29:11 -08:00
Odelu Kukatla
cd7fb1df48 arm64: defconfig: Enable interconnect driver for Parrot
Enable the interconnect driver so that consumers are
able to obtain their path handles properly.

Change-Id: I7abc2c7d822271470fca387f00eafaff8e2691f6
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
2021-11-17 03:01:28 -08:00
Rohit Agarwal
ea47785060 defconfig: Enable additional configs for compilation
Enable additional configs for compilation dependency.

Change-Id: I475f5e8bfc1178b4dbcf72270bcc5bce2d63e096
Signed-off-by: Rohit Agarwal <rohiagar@codeaurora.org>
2021-11-17 15:01:55 +05:30
Yuanfang Zhang
d3121b1f4b qdss_bridge: handle usb write done event
USB_QDSS_DATA_WRITE_DONE event should be handle in
usb_notifier(), even if drvdata->open != ENABLE.

Change-Id: I7c7e106f03cf819117abfed67f2095e59d90004d
Signed-off-by: Yuanfang Zhang <zhangyuanfang@codeaurora.org>
2021-11-17 10:28:43 +08:00
qctecmdr
f833c40230 Merge "qcom_carveout_heap: Fix TUI failure handling" 2021-11-16 18:10:13 -08:00
qctecmdr
2ee1b1a8e0 Merge "soc: qcom: Register irq stacks with minidump" 2021-11-16 09:17:30 -08:00
qctecmdr
bcbec334f8 Merge "cnss2: Add sysfs support for configuring timer sync interval" 2021-11-16 07:13:28 -08:00
qctecmdr
4661d8304c Merge "remoteproc: spss: Set SPSS data for Cape platform" 2021-11-16 07:13:27 -08:00
qctecmdr
98aaf00a15 Merge "remoteproc: qcom: Register SSR subdevice with the q6v5 IRQ driver" 2021-11-16 07:13:26 -08:00
Anmolpreet Kaur
a85f1b72a2 qseecom: Handle blocked on listener case while load/unload
This change handles QSEOS_RESULT_BLOCKED_ON_LISTENER request
from TZ in case of loading and unloading app.

Change-Id: I87adc3603811612fbc56d4b4b44a041b583d697f
Signed-off-by: Anmolpreet Kaur <anmolpre@codeaurora.org>
2021-11-16 20:24:33 +05:30
qctecmdr
7b1442878f Merge "mmc: sdhci-msm: Update pr_err condition in DLL init path" 2021-11-16 04:53:17 -08:00
qctecmdr
46e35d6cc0 Merge "gunyah: Moving the struct gh_vm_status" 2021-11-16 04:53:16 -08:00