Commit graph

903,781 commits

Author SHA1 Message Date
Veerabhadrarao Badiganti
0ec602298e msm: mhi_dev: Fail start command if fails to allocate reqs
Fail the start command if we fails to allocate buffer for event
requests.

Change-Id: I05e9acb093f53f1675a4f711182730ab420e0e5a
Signed-off-by: Veerabhadrarao Badiganti <quic_vbadigan@quicinc.com>
2021-11-19 22:31:45 +05:30
Veerabhadrarao Badiganti
eb29f2d763 msm: mhi_dev: Ensure event buffer size reflects the right size
We are setting event buffer size with the requested size and then
allocating the buffer for event requests (ereqs). But if the memory
allocation for ereq buffer fails, the event-buffer-size variable
is not getting set to zero.

Due to this, if a client calls open channel multiple times,
our logic proceeded without really allocating the buffer for ereqs.
And while processing completion events, we are observing null pointer
dereference issues.

Change-Id: I10bee8428d178ef5a7f0fe5fcd93fcce8dcbe27d
Signed-off-by: Veerabhadrarao Badiganti <quic_vbadigan@quicinc.com>
2021-11-19 22:31:21 +05:30
qctecmdr
3c9afc139b Merge "msm: ipa3: Define socksv5 function in ipa_fmwk" 2021-11-15 04:54:36 -08:00
qctecmdr
8824baad32 Merge "config: enable default cpufreq governors for sdxnightjar target" 2021-11-15 04:54:36 -08:00
qctecmdr
7bdf76449c Merge "msm: kgsl: check for number of commands in kgsl_ioctl_gpu_aux_command" 2021-11-15 04:54:35 -08:00
Gopala Krishna Nuthaki
d4f65badf3 drivers: thermal: Update a variable type in QMI encode logic
Change a variable type in QMI encode logic to avoid
buffer overflow scenario.

Change-Id: I11b10cce0e9ab5b02738b2ba13e637df979e9310
Signed-off-by: Gopala Krishna Nuthaki <gnuthaki@codeaurora.org>
2021-11-14 21:50:41 -08:00
Pranav Patel
ade36fe563 msm: kgsl: check for number of commands in kgsl_ioctl_gpu_aux_command
kgsl_ioctl_gpu_aux_command creates a separate drawobj for each command
in numcmds sent from userspace. All drawbojs created will have same
timestamp. We can not queue more than one drawobj with same timestamp.
Each new drawobj must have timestamp greater than previously queued
drawobjs. This results in failure of kgsl_ioctl_gpu_aux_command.
Add proper check and return early when numcmds is invalid.

Change-Id: I06413c16b0a21abcffb121b2e332752eb71e6be0
Signed-off-by: Pranav Patel <pranavp@codeaurora.org>
Signed-off-by: Akhil P Oommen <akhilpo@codeaurora.org>
2021-11-11 21:44:42 -08:00
qctecmdr
756bbb2594 Merge "usb: host: Fix unclocked access in xhci_suspend in case of pm suspend" 2021-11-11 08:32:57 -08:00
Pooja Kumari
0cabdeed70 msm: ipa3: Define socksv5 function in ipa_fmwk
Define socksv5 function in ipa_fmwk.

Change-Id: I8f1126632f0e2c61a8b2abf55ce29737527eeecb
Signed-off-by: Pooja Kumari <quic_kumarip@quicinc.com>
2021-11-11 01:45:51 -08:00
qctecmdr
1b9ba19839 Merge "usb: dwc3: Resume the controller before setting device active in sm_work" 2021-11-11 01:45:01 -08:00
qctecmdr
520c82a4cf Merge "msm: kgsl: Update the IFPC power up reglist" 2021-11-11 01:45:01 -08:00
qctecmdr
27ce3c2545 Merge "msm: ep_pcie: Send pme from panic/reboot handler while in D3hot" 2021-11-11 01:45:00 -08:00
Rohith Kollalsi
8c54875c34 usb: host: Fix unclocked access in xhci_suspend in case of pm suspend
When runtime suspend occurs xhci_suspend is called and now all the
clocks are turned off. Now if pm_suspend happens xhci_suspend is again
called which leads to unclocked access of registers in function
xhci_disable_hub_port_wake. Fix this by considering second
call of xhci_suspend due to pm_suspend as no-op.

Change-Id: Ic053636ac1d6c54150b40e5477b5eb373fcdbeb3
Signed-off-by: Rohith Kollalsi <quic_rkollals@quicinc.com>
2021-11-11 14:47:06 +05:30
Santosh Mardi
e84b1ba30e config: enable default cpufreq governors for sdxnightjar target
Enable the default available cpufreq governor used to scale
cpu frequency based on the load for sdxnightjar perf config.

Change-Id: I93aeb27350562fe1c488c22d5ac24b80b4a9fdf4
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2021-11-10 05:36:16 -08:00
Priyansh Jain
79b770a9a4 drivers: thermal: qmi_cooling: update modem cdev names for waipio
update modem cdev names for waipio as per
latest recommendation.

Change-Id: I32ef91f258791b43d6d31c325f7e42bbae111e0e
Signed-off-by: Priyansh Jain <priyjain@codeaurora.org>
2021-11-10 05:10:23 -08:00
Rohith Kollalsi
66a28a886a usb: dwc3: Resume the controller before setting device active in sm_work
Driver core invokes runtime PM idle after the device is probed. When the
runtime idle callback returns 0, platform bus proceed to runtime suspend.
If this races with state machine work which marks the runtime state as
active and enables runtime PM, there is a possibility that the runtime
PM thinks device is suspended. Because the runtime PM suspend patch
returns simply because in_lpm is true. Now, state machine work calls
dwc3_msm_resume() which sets WAIT_FOR_LPM flag hoping that it would be
cleared while runtime suspend happens via pm_runtime_put_sync(). Though
the device is in resume state, runtime PM core thinks it is suspended
due to the race mentioned above. The fact that WAIT_FOR_LPM is set,
state machine for ever stuck in DRD_STATE_IDLE waiting for this flag to
be cleared.

Fix this by calling dwc3_msm_resume before setting device as active so
that the corresponding pm_runtime_put_sync operation happens correctly.

Change-Id: I3ee58ca01d2afdf169b1f52816d7d4d448cbf8e6
Signed-off-by: Rohith Kollalsi <quic_rkollals@quicinc.com>
2021-11-10 04:33:42 -08:00
qctecmdr
70d4bf5f0c Merge "input: qcom-hv-haptics: use OL_TLRA if getting CL_TLRA failed" 2021-11-09 04:04:06 -08:00
qctecmdr
938b49e74b Merge "i2c: i2c-msm-geni: WAR to halt cancel if IOS not in good state" 2021-11-09 04:04:06 -08:00
Fenglin Wu
b09f20aa36 input: qcom-hv-haptics: use OL_TLRA if getting CL_TLRA failed
If getting close-loop TLRA failed in driver probe, such as if there
is no valid value in SDAM register for CAL_TLRA_CL_STS because of the
bootloader had not run the frequency calibration successfully. Use
open-loop TLRA to program the hardware so the vibrator can still be
functional but just lose some efficiency because of unadjusted
frequency.

Change-Id: I8b8dd0906aa6b3fa882e2044cdbe579c746714a3
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2021-11-09 14:15:21 +08:00
Fenglin Wu
e51738b0a8 input: qcom-hv-haptics: try with vmalloc() if allocate custom data failed
Reallocate memory using vmalloc() for custom FIFO data if the memory
allocation using kcalloc() is failed. This may happen if the vibrator
HAL is passing down a vibration effect with a very big chunk of FIFO
data and system is running out of memory.

Change-Id: I3612208df42e46a44ca0fd43ec9b4c6ca862620e
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2021-11-09 14:13:43 +08:00
Yuanfang Zhang
12d07c9ed6 coresight-tmc-etr: use sysfs_buf in tmc_sg_get_rwp_offset()
When usb bypass start, etr_buf may be null. If etr disable hw is
called at the same time. Use sysfs_buf in tmc_sg_get_rwp_offset to
avoid this issue.

Change-Id: Id1e45269d08f61413d385de7aa46df4cc3d8c44d
Signed-off-by: Yuanfang Zhang <zhangyuanfang@codeaurora.org>
2021-11-08 00:35:01 -08:00
qctecmdr
a0e35cc38e Merge "msm: kgsl: Update register protection config" 2021-11-05 08:58:25 -07:00
urevanth
684cdc265f dm verity: Add an optional arg to wait for target devices
Adding new argument "device_wait"

Change-Id: I025855c8930415e7f02145b8f0309b8c2fbe2121
Signed-off-by: urevanth <quic_urevanth@quicinc.com>
2021-11-05 01:28:56 -07:00
qctecmdr
b670ccd79c Merge "sched/walt: eval_need code and trace cleanup" 2021-11-04 18:56:29 -07:00
Akhil P Oommen
0c778c3a85
msm: kgsl: Update the IFPC power up reglist
Update the IFPC power up reglist to include all the CP Protect
registers.

Change-Id: I1b43420c466b8a228892afac8ecf05b11b5a80e6
Signed-off-by: Akhil P Oommen <akhilpo@codeaurora.org>
2021-11-04 10:13:48 +05:30
Akhil P Oommen
0eb8808edc
msm: kgsl: Update register protection config
Update the register protection configurations as per the latest
recommendation.

Change-Id: I70365268e8e4c7ee4ff28538f22e970822e4edf0
Signed-off-by: Akhil P Oommen <akhilpo@codeaurora.org>
2021-11-04 10:09:26 +05:30
qctecmdr
64a2546eea Merge "Revert "scsi: ufs-qcom: Abort phy power on sequence if clks are off"" 2021-11-03 03:08:10 -07:00
Ram Prakash Gupta
843130f36b Revert "scsi: ufs-qcom: Abort phy power on sequence if clks are off"
This reverts commit 767358cd96.

Revert as this change causing cx pc failure.

Change-Id: Ic2ee49b4420132dd7b118cd06689a875ff578928
Signed-off-by: Ram Prakash Gupta <rampraka@codeaurora.org>
2021-11-02 19:48:56 +05:30
qctecmdr
1dadeefb1f Merge "usb: dwc3: Prevent deadlock when wakeup happens through pwr event irq" 2021-11-02 06:52:49 -07:00
Stephen Dickey
40770d9b70 sched/walt: eval_need code and trace cleanup
Improve the naming and types of variables in eval_need,
reduce computation and adjust the tracepoint to reflect
the new names of variables.

Change-Id: Ifc19bc802bbc8382577b0e4ed4b4c9be77ffe99e
Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
Signed-off-by: Tengfei Fan <tengfeif@codeaurora.org>
2021-11-01 20:48:36 -07:00
Stephen Dickey
e185ebca55 sched/walt: Improve the scheduler
Improve core_ctl tracing such that the necessary flags for
debugging eval_need are present in the trace, and so that
all returns go through the same tracepoint, unlocking, and
return functionality.

Change-Id: I61d5ab86ba7650bea77e4416b0ffa9a07869bbf3
Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
Signed-off-by: Tengfei Fan <tengfeif@codeaurora.org>
2021-11-01 20:48:23 -07:00
Abhijeet Dharmapurikar
208b88eff2 sched/walt: Improve the scheduler
This change is for general scheduler improvement.

Change-Id: I42edf6c6df05f0bf72e4c57ee701916860773428
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Tengfei Fan <tengfeif@codeaurora.org>
2021-11-01 20:48:07 -07:00
Abhijeet Dharmapurikar
ebbfc8d0bf sched/walt: Improve the scheduler
This change is for general scheduler improvement.

Change-Id: I17cca453e5a4e6bbf4d0b55440d9f776dc2583cb
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Tengfei Fan <tengfeif@codeaurora.org>
2021-11-01 20:47:50 -07:00
Maria Yu
ad5c648756 sched/walt: Check if necessary for sched_boost modify
Check if necessary to do exit and next_boost enter
oprations instead of doing it regardlessly.
Core control boost refcounts has been wrong if doing
current sched_boost exit and next_boost enter by mistake.

Change-Id: Ie40ebf0be0e1b99291d07d160ebef5964d44ba16
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
Signed-off-by: Tengfei Fan <tengfeif@codeaurora.org>
2021-11-01 20:47:27 -07:00
Veerabhadrarao Badiganti
9bc84cff6e msm: ep_pcie: Send pme from panic/reboot handler while in D3hot
Send pme from panic/reboot handler if the device is in D3hot to
bring device state back to D0. This helps PBL to take retrain
the link gracefully as PBL didn't have ability to bring the device
our of D3hot state. Also send MHI to syserr, so that MHI host
wont timeout on M0ack.

Change-Id: I3de45cab30caa332bd00abe8b1ed1487d7889d5f
Signed-off-by: Veerabhadrarao Badiganti <quic_vbadigan@quicinc.com>
2021-11-01 20:51:11 +05:30
Sai Chaitanya Kaveti
53efbbd8bc msm: ep_pcie: Avoid unwanted string literal in log
Removing unwanted string format specifier in a log API to avoid
potential kernel panic.

Change-Id: Iceb2ae7a0d08946685bdd922c7e52800ed3c65a5
Signed-off-by: Sai Chaitanya Kaveti <skaveti@codeaurora.org>
2021-11-01 01:59:24 -07:00
Rohith Kollalsi
2d52dbe730 usb: dwc3: Prevent deadlock when wakeup happens through pwr event irq
Consider a scenario when a device which supports auto suspend is
connected to DUT and auto suspend happened. Now, as the device is
disconnected to DUT. Resume_work is called due to extcon notification
of disconnect and then again suspend is expected to schedule. As
a part of disconnect, power event irq and DP_HS_PHY_IRQ also got
triggered and now since usb is in lpm, resume work got scheduled
twice. This resume work flushed sm_work which is stuck because
disable_irq call is waiting for pwr_irq call which called resume_work
to complete. This is clearly a circular dependency because
resume work will flush sm_work which is waiting for pwr_irq_thread
to be complete because disable_irq in msm_suspend waits for
pwr_irq_handler to complete.

Solve this by replacing disable_irq api with disable_irq_nosync
so that it doesn't block control suspend.

Below are the sequence of events.

	usb is auto suspended with device connected to DUT.

	Now device is disconnected from DUT and hence resume
	hanppens first and then suspend.

	dwc3_resume_work is called due to extcon as a part of
	disconnect then suspend will be scheduled.

	When dwc3 is still in lpm, i.e dwc3_resume_work did
	not take effect yet.

	Now power event irq is fired because of which resume
	work runs.

	This resume work flushes sm work. Which is currently
	executing msm_suspend where disable_irq is waiting
	for power_irq call to finish which is waiting for
	sm_work to finish.

Change-Id: Ibf6e73663d4acaf997291e7eff6577adeaad6e8a
Signed-off-by: Rohith Kollalsi <quic_rkollals@quicinc.com>
2021-11-01 01:41:55 -07:00
qctecmdr
a37620903a Merge "cnss: Don't set pci max link speed for pcie switch platform" 2021-10-31 16:47:37 -07:00
qctecmdr
7a5b5f4b4b Merge "Defconfig: Enable generic serial driver on sdxnightjar" 2021-10-29 17:16:57 -07:00
qctecmdr
f056a10a70 Merge "scsi: ufs-qcom: Abort phy power on sequence if clks are off" 2021-10-29 17:16:57 -07:00
qctecmdr
55d9b9d21d Merge "Bluetooth: Fix BT_EN not made high in specific usecase" 2021-10-29 17:16:57 -07:00
qctecmdr
27c59eee88 Merge "Bluetooth: Add format specifier" 2021-10-29 17:16:56 -07:00
qctecmdr
14ce2c67d6 Merge "cnss2: Update bound checks for sbl reg dumps to SRAM mem range" 2021-10-29 17:16:56 -07:00
qctecmdr
6797d3ad33 Merge "events: Reuse value read using READ_ONCE instead of re-reading it" 2021-10-29 08:18:32 -07:00
Wu Gao
f109ca39fd cnss: Don't set pci max link speed for pcie switch platform
The API - cnss_pci_set_max_link_speed sets max pcie link speed based
RC number, and affect other endpoints for PCIe switch platform. So,
don't set max link speed if dtsi configuration - "default_gen_speed"
is invalid.

Change-Id: I2b9263fb6c0b45dcb19cdc112fb04767648016f4
Signed-off-by: Wu Gao <wugao@codeaurora.org>
2021-10-29 15:37:42 +08:00
qctecmdr
9503f53c47 Merge "Revert "pci:switch: Implement PM ops for QPS615 support"" 2021-10-28 21:16:57 -07:00
qctecmdr
5759de5ab4 Merge "Revert "config: sdxlemur: enable Switch driver"" 2021-10-28 21:16:57 -07:00
Balakrishna Godavarthi
37ae7bd9b4 Bluetooth: Add format specifier
This patch adds format specifier corresponding to arguments
passed to print debug logs.

Change-Id: Iff586dd827037cca3419e1c3c9822d2637ef94aa
Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
2021-10-28 06:59:18 -07:00
Balakrishna Godavarthi
49bdeeb29b Bluetooth: Fix BT_EN not made high in specific usecase
Usecase:
  1) WLAN ON triggered first and then immediately BT
     ON triggered.
  2) As WLAN ON triggered first, before pulling WL_EN to high
     it will wait for 100ms as BT_EN is low.
  3) WLAN timed out first and pulls WL_EN to high and
     in mean time BT_EN is checking WL_EN status to pull BT_EN to high.

Expected behavior: BT_EN must pull high before sending version command.

Observed behavior: BT_EN is not pulled high as WL_EN state changes
from low to high. While BT_EN checking the WL_EN state.

Fix: Check BT_EN status and pull it to high if it not set to high
Change-Id: I13e209ac4e1523d377f252aa5c0d243abeb86af4
Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
2021-10-28 05:53:39 -07:00
Mukesh Kumar Savaliya
052480e3e5 i2c: i2c-msm-geni: WAR to halt cancel if IOS not in good state
This change halts cancel command operation if IOS lines not in
good state for i2c due to Power or slave side issue. Perform cancel
once IO lines comes to good state. Till that i2c transfer will not
be servied.

This is a workaround fix if the abort is failing after cancel and
never recovers.

Change-Id: Icca5904d0d3df7432b948343ef9396cb25d93cd0
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
2021-10-28 02:30:11 -07:00