This reverts commit 7dcee2dc40.
Delayed core wakeup mess up the cluster genpd sd counter post
late suspend phase. Disallow cpuidle during suspend.
Change-Id: I8f1a06214ee7a05d38c2941550877ae70abcf15c
Signed-off-by: Raghavendra Kakarla <quic_rkakarla@quicinc.com>
Link serdes_loopback_v3_1 function pointer to qcom_serdes_loopback_v3_1
function.
Change-Id: I167dead399f4081272b044563860fb41ac111bac
Signed-off-by: Srinath Pandey <quic_srinpand@quicinc.com>
QCOM camera drivers may allocate dma-bufs from within the kernel, rather
than from userspace.
Change-Id: I461183c8e91fbf683c4e70a52f9dc6e56fb13aa3
Signed-off-by: Patrick Daly <quic_pdaly@quicinc.com>
Add support for camera fw client in niobe SCT table for LLCC driver.
Change-Id: Id9608f538e703d0dffa2c510e5e7567b74a92bc0
Signed-off-by: Amrit Anand <quic_amrianan@quicinc.com>
initialize metainfo with 0 before copying user data into it.
Change-Id: Ib793100a95d0138c70c1b64372039dbfc098c722
Signed-off-by: juzhan <quic_juzhan@quicinc.com>
In isync timeline create, after timeline object is attached into idr and
unlock the isync_timeline_lock, timeline object still is accessed. if
there is a release thread which try to release the same timeline object,
then maybe cause UAF issue.
Move the access operation into lock to avoid.
Change-Id: Ie2ff412b90924acb8f40e182f26c770b1f110a56
Signed-off-by: Kasin Li <quic_donglil@quicinc.com>
Need enable CONFIG_PHY_QCOM_UFS_V4_WAIPIO for UFS PHY driver
to support Lemans LVGVM UFS passthrough.
Change-Id: I8be8b478d84095f04373cc2c8393460cb493136d
Signed-off-by: Zou Shunxiang <quic_shunxian@quicinc.com>
To guarantee PCIe client MSI can wake up APPS while its in LPM,
call enable_irq_wake on the parent MSI, PCIe MSI IRQ. Doing so
will make sure these IRQs are not disabled as part of APPS system
suspend.
Change-Id: Ifdb74068a26eca7028667310d62df8b974e58927
Signed-off-by: Tony Truong <truong@codeaurora.org>
Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com>
Signed-off-by: Yogesh Jadav <quic_yjadav@quicinc.com>
Signed-off-by: Joco Zhang <quic_pingshen@quicinc.com>
The LVS test module is used to verify host link layer compliance, as it
allows for control of specific root hub operations, such as bus power
management. Enable the module in the kernel configuration, as
it should only be used in debug builds for compliance testing.
Change-Id: I3e320ba6bf5b0e0f0c607e4041aa26b2d4d8f697
Signed-off-by: Rajashekar kuruva <quic_kuruva@quicinc.com>
commit 6f8914bb78fa ("usb: misc: lvstest: allow specifying port for
compliance mode") added an incorrect boolean expression to sanitize
the port number from the user. Using an arbitrary port number may result
in an invalid access. Fix this by correcting the boolean expression.
Change-Id: I7d26ace07b41c274fe9f1005c507abdefad9ea07
Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
Signed-off-by: Prashanth K <quic_prashk@quicinc.com>
In the remote subsystem crash scenario with recovery disabled, there is
no mechanism of early SSR notifications. There can be a case where
one of the SSR notifier block gets stuck while contesting for a lock
held by a task which is trying to contact the crashed remote subsystem
via glink. The problem is glink is not yet aware of the crash, and thus
keep on retrying, thus leading to lock not available for SSR notifier,
which leads to SSR notification timeout. To save some time to reboot by
panic in such situations, and avoid SSR timeouts, early notify the
clients, including glink in the recovery disabled case as well.
Change-Id: I67dde7023052ffb5b9932c0ac666f799fa7d0bbe
Signed-off-by: Naman Jain <quic_namajain@quicinc.com>
The below scenario can cause plugging of memory block enter into oom
path thus can cause the dead lock scenario:
1) Plug 'm' memory blocks. Happens sequentially under qvm_lock +
flush(work).
2) Unplug 'n' memory blocks, that can happen once for a bunch as this
get triggered in close(fd) and asynchronously.
3) some blocks from step2 are failed thus the final updated plugged size
is much larger than 'qvm_hint_total'(which effects the requested size
for the next block to be plugged)
4) Now memory pressure triggered the below:
acquire(oom_lock)->qvm_oom_notify->plug memory block. The expectation
here is to plug the memory block but because of step 3, the requested
size will be still below the plugged size thus it takes the unplug
path which again enters into reclaim and stuck on oom_lock.
This can be avoided by serializing the step2 which happens under
qvm_lock and flush(vm->wq). For the blocks that are failed to unplug
will not lead into changing the 'qvm_hint_total' thus not effect the
requested size calculation for the next block.
Change-Id: I14bd05ef21ada9d183f00f30806b1556eb967099
Signed-off-by: Charan Teja Kalla <quic_charante@quicinc.com>
Add entries to support WPSS boot for adrastea in pitti using
rproc.
Change-Id: I059c6fe44176a4bd814335b7934c3b7e5098cdf6
Signed-off-by: Sandeep Singh <quic_sandsing@quicinc.com>
Add ps-hold to secure restart_reason during
power-off & restart.
Change-Id: I62b41ff9da5d61aba11b7ab835785d2c3c7dc849
Signed-off-by: Wasim Nazir <quic_wasimn@quicinc.com>
In panic path, APSS should wake-up SOCCP, so that, SOCCP can execute error
handlers before system goes down to debug issues by retaining the call
stacks as needed. Add panic notifier to send SMP2P to SOCCP from panic
path and wake-up SOCCP during shutdown path to make sure SMP2P gets
handleded in SOCCP.
While at it, add logs in error paths to assist with debug issues.
Change-Id: I0dfec2098ab6091b20a66324830591ccdf15a65f
Signed-off-by: Satya Durga Srinivasu Prabhala <quic_satyap@quicinc.com>
Signed-off-by: Kamati Srinivas <quic_kamasrin@quicinc.com>
This change is for gadget lpm capability only when otg/gadget
mode is supported.
Change-Id: I509f0760bf49a6362b562f0bdfe6012b227462bb
Signed-off-by: Uttkarsh Aggarwal <quic_uaggarwa@quicinc.com>
There are scenarios where DP driver passes the lane information
using dwc3_msm_set_dp_mode() even before dwc3-msm gets the role
notification. This causes the ssphy flags to be incorrectly set,
causing the SSUSB/QMP phy to operate in USB3 only mode instead
of USB3_AND_DP mode. Consider the following case when we connect
a 2 lane monitor to DuT using Type-C-to-C cable during bootup,
1) Role None -> sm_work kicks in and drives device to suspend,
This causes the ss phy set_suspend to be called
& sets USB3 mode using msm_ssphy_qmp_setmode().
2) Role None -> Device (since monitor is self powered, sometimes
ADSP passes Device role since DUT acts
as sink during the power negotiation).
3) dwc3_msm_set_dp_mode() - sets the PHY_USB_DP_CONCURRENT_MODE
flag in ssphy->flags. But since the
DuT is in device mode, ssphy mode is
not initialised properly and still
remains in USB3 mode. This results
in link layer training failures and
aux timeouts in DP layer.
4) Device -> Host - This initialises phy in USB3 and DP mode,
But by this time DP layer is already in
bad state causing DP mirroring to fail.
Fix this allowing DP driver to call dwc3_msm_set_mode() only
after host/XHCI has started and phy is initialised. DP Altmode
driver has retry mechanism if we return -EAGAIN or -EBUSY.
And there is a case where host_notifier might call power down
ssphy using dwc3_msm_host_ss_powerdown() if the monitor has
internal hubs and peripherals like ethernet adaptor. SSPhy gets
powered down if the SS enumeration of these internal peripherals
fails. These peripherals eventually gets enumerated after retry,
and ssphy powerup happens, but there are chances this can cause
the phy to be out of concurrent mode which affects DP mirroring.
So avoid SSphy powerdown if DP mode is enabled.
Change-Id: I358ec630bc4400a4567c2aee2d160b3ba77d6a0f
Signed-off-by: Prashanth K <quic_prashk@quicinc.com>
The below live lock is reported with VM:
Thread Z: holds qvm_lock, waiting for Thread A to finish its work.
Thread A: virtio_mem_run_wq calling alloc_contig_range ->
__alloc_pages_may_oom
Thread B: a random kmalloc() allocation -> __alloc_pages_may_oom
Suppose Thread B acquires oom lock first and calls qvm_oom_notify. Then
it will wait on qvm_lock. Thread A will observe failure from
mutex_trylock(&oom_lock) as called from __alloc_pages_may_oom, and set
*did_some_progress=1 (livelock scenario).
To fix this problem, when the allocation request is from oom notifier,
try to get the qvm_lock, If acquired, other paths will be waiting on
qvm_lock. If failed, just return so that other paths with qvm_lock don't
wait on the oom_lock.
Change-Id: I7b56c79df94c9e6f738629c9e61dd23405dae475
Suggested-by: Pavan Kumar Kondeti <quic_pkondeti@quicinc.com>
Signed-off-by: Charan Teja Kalla <quic_charante@quicinc.com>
Data transfer error was seen over UART.
With frequent switching odd/even parity,
waveforms were observed indicating mismatch.
Uart parity registers updated as per HW doc &
added logic to clear previous setting before new.
Change-Id: I74cdf6f93d73e8f45e443da049961060e31687f3
Signed-off-by: Zahir Shabbir Khan <quic_zshabbir@quicinc.com>
When exporting a dmabuf buffer, the total size of the buffer should
NOT be less than the export size.
Added a sanity check for it and return -EINVAL if detected.
Change-Id: Ib9b03ef37bcc6ef13dca58d131f872332782eb55
Signed-off-by: lixiang <quic_lixian@quicinc.com>
Add tcsrcc, clk-rpmh and cpufreq-hw modules to modules list,
to enable them to load during first stage initialization.
Change-Id: I994e8af0cdc97aaecd40178acf3b114f03cdb943
Signed-off-by: Kalpak Kawadkar <quic_kkawadka@quicinc.com>
Add support to identify ufs device version using sdam nvmem
cell and calibarate ufs phy according to ufs device version.
Change-Id: I90f834b2010ecc5bd684dcf291f4e2996c10267d
Signed-off-by: Ram Prakash Gupta <quic_rampraka@quicinc.com>
Signed-off-by: Manish Pandey <quic_mapa@quicinc.com>