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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>