Commit Graph

1020413 Commits

Author SHA1 Message Date
qctecmdr
8ba16b0c72 Merge "msm: kgsl: Add cx gdsc notifier for rgmu and non-gmu targets" 2023-03-16 06:23:18 -07:00
qctecmdr
1f06c5fefd Merge "mmc: sdhci-msm: Fix NULL pointer dereference warnings" 2023-03-16 06:23:17 -07:00
qctecmdr
54c880f0d9 Merge "icnss2: Check for SSR before SOC Wake request" 2023-03-16 06:23:17 -07:00
qctecmdr
fef2c366e3 Merge "Assign channel pointer to NULL after free" 2023-03-15 10:24:06 -07:00
qctecmdr
f4e0eb8964 Merge "msm: kgsl: Check jiffies before SLUMBER entry" 2023-03-15 06:43:23 -07:00
qctecmdr
ecb9dd7d19 Merge "smcinvoke: Handle suspend and resume issues in smcinvoke driver" 2023-03-15 03:51:14 -07:00
qctecmdr
fed0481dc6 Merge "defconfig: Enable simple governor for parrot" 2023-03-15 03:51:14 -07:00
qctecmdr
3ac7a09c37 Merge "pci: msm: Unlock the recovery_lock in case of return in failure" 2023-03-15 03:51:13 -07:00
qctecmdr
5f9b3a7dfe Merge "msm: pcie: Restore irq when doing spin unlock" 2023-03-15 03:51:13 -07:00
qctecmdr
01d4ec9459 Merge "net: qrtr: Change port allocation to use cyclic xa" 2023-03-15 03:51:12 -07:00
qctecmdr
47792562b8 Merge "remoteproc: helios: Fix subdevice add order" 2023-03-15 03:51:12 -07:00
qctecmdr
04d18f368e Merge "drivers: thermal: qmi_cooling: Add support for extended device list" 2023-03-15 03:51:10 -07:00
Satish Kumar Kodishala
69a92c0a8a Assign channel pointer to NULL after free
Assign channel pointer to NULL after free

Change-Id: I23cc90c8df7124cde577ad751db9b83b6f7eee91
Signed-off-by: Satish Kumar Kodishala <quic_skodisha@quicinc.com>
2023-03-15 00:05:48 -07:00
Priyansh Jain
7a5a3a4e79 drivers: thermal: qmi_cooling: Add support for extended device list
The QMI TMD get device list supports maximum 32 devices. But there
are targets that support more than 32 QMI TMD devices. To add more
devices support as well as to make sure backward compatibility with
legacy device list, add new optional extended device list variable
in QMI TMD interface. The first 32 devices will be filled in legacy
device list variable and all other devices will be filled with new
extended device list variable.

Add support to qmi cooling device driver to get extended device
list if any.

Change-Id: I530669a9f89f8c9da7bbcc7d486dde76f0a7f3ea
Signed-off-by: Manaf Meethalavalappu Pallikunhi <quic_manafm@quicinc.com>
Signed-off-by: Priyansh Jain <quic_priyjain@quicinc.com>
2023-03-14 21:55:13 +05:30
Sachin Gupta
c6c9f20411 mmc: sdhci-msm: Fix NULL pointer dereference warnings
Fix null pointer dereference warnings in the clk scaling functions.

Change-Id: Ib33cb3be43a1d2981b9803f9c7f0880de7f17583
Signed-off-by: Sachin Gupta <quic_sachgupt@quicinc.com>
2023-03-14 17:58:21 +05:30
Sarannya S
ca36a6668a net: qrtr: Change port allocation to use cyclic xa
There is a race for clients that open sockets before the control port
is bound. If a client gets an idr that was allocated before the control
port is bound, there is a chance the previous address owner sent lookup
packets to the control port. The new address owner will get residual
responses to these lookup packets.

Change the xa_alloc to xa_alloc_cyclic so new ids are allocated
instead of trying to reuse the freed ids.
Call the xa_alloc_cyclic function with GFP_ATOMIC.

Change-Id: Ie1bda7a818309503f80542e739bac646327296f7
Signed-off-by: Chris Lew <clew@codeaurora.org>
Signed-off-by: Sarannya S <quic_sarannya@quicinc.com>
2023-03-14 15:18:59 +05:30
qctecmdr
946b7c4c0e Merge "Revert "msm: kgsl: Call dma_buf_unmap_attachment() early"" 2023-03-14 01:51:47 -07:00
qctecmdr
e5847a0b53 Merge "usb: dwc3-msm: Rectify 64 bit dma address programming for GSI" 2023-03-14 01:51:47 -07:00
Raghavendra Kakarla
d42b7da004 defconfig: Enable simple governor for parrot
This patch enable simple governor.

Change-Id: Ib03a760d5b165f85cf4058dd7c28ccca195727b6
Signed-off-by: Raghavendra Kakarla <quic_rkakarla@quicinc.com>
2023-03-14 13:55:48 +05:30
Mukesh Ojha
8ad6f876bc remoteproc: helios: Fix subdevice add order
The subdevice list should be populated in a particular order as
the state notifications have a priority. This change re-orders
the subdevice add calls to ensure higher priority subdevices are
present at the start of the list.

This change is inline with
commit c9f2092072 ("remoteproc: qcom: pas: Fix subdevice add order").

Change-Id: I94e0e7af3fe634d5354e0f58f0a818071c3ff918
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
2023-03-13 23:31:05 -07:00
qctecmdr
bce435f0b1 Merge "interconnect: qcom: ravelin: fix UAF under remove function" 2023-03-13 23:15:44 -07:00
qctecmdr
508ab50fb7 Merge "defconfig : Add support for USB configs" 2023-03-13 23:15:44 -07:00
qctecmdr
291764b2f1 Merge "interconnect: qcom: waipio: fix UAF under remove function" 2023-03-13 20:18:00 -07:00
qctecmdr
ce875d73ce Merge "regulator: rpmh-regulator: Add PBS peripheral voting support" 2023-03-13 20:17:59 -07:00
qctecmdr
e6b4dc1810 Merge "smcinvoke: Call object release sync once before adding to queue" 2023-03-13 20:17:59 -07:00
qctecmdr
26d68a318e Merge "interconnect: qcom: bcm-voter: Fix KASAN Use-After-Free" 2023-03-13 20:17:54 -07:00
Raviteja Laggyshetty
20bf1a4d28 interconnect: qcom: ravelin: fix UAF under remove function
UAF is observed while unloading the interconnect driver.
Interconnect is core to the system and should not
be unloaded once it is probed. Marking the driver as
permanent by removing the module_exit function.

Change-Id: Ia3b1eee450760596ca6a3ea50daa4fe595a70158
Signed-off-by: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com>
2023-03-14 07:24:02 +05:30
Naman Padhiar
547b823e06 icnss2: Check for SSR before SOC Wake request
There are scenarios when WLAN Host request for
SOC Wake during SSR. If WLAN FW receives the request
before FW_READY it ASSERT.
Avoid sending SOC Wake request to FW during SSR.

Change-Id: Ia42cc17149de7a33da0161a280c79d5dfce0f4c8
Signed-off-by: Naman Padhiar <quic_npadhiar@quicinc.com>
2023-03-13 17:37:31 +05:30
Guisen Yang
4e09b15315 msm: pcie: Restore irq when doing spin unlock
Irq is saved but not restored when deregistering pcie event. Restore irq
so that might_sleep will not report error when removing cnss2 module.

Change-Id: I7d75334afe960b25d3cc218a80bae8c06fec5455
CRs-Fixed: 3377281
Signed-off-by: Guisen Yang <quic_guiseny@quicinc.com>
Signed-off-by: Naga Rashmi Ayiluri <quic_nayiluri@quicinc.com>
2023-03-13 17:36:03 +05:30
Pankaj Gupta
65b68a3dcb Revert "msm: kgsl: Call dma_buf_unmap_attachment() early"
This reverts commit b84bd97e37.

Warnings for direct dma clients during cache operations are now being
handled by dma-buf driver. Instead of doing dma_buf_unmap_attachment
early if we do it in destroy path, it helps in saving cycles and
improving performance during app launch.

Change-Id: Ic66dd3b66136318abf59685f95fee17890377fd4
Signed-off-by: Pankaj Gupta <quic_gpankaj@quicinc.com>
2023-03-13 16:29:02 +05:30
Uttkarsh Aggarwal
88548ca290 defconfig : Add support for USB configs
Update defconfig to enable usb audio for anorak.

Change-Id: I19b28ec4951636754b7a4d434df54691cab8d379
Signed-off-by: Uttkarsh Aggarwal <quic_uaggarwa@quicinc.com>
2023-03-13 03:00:55 -07:00
Harshdeep Dhatt
37798d1966 msm: kgsl: Check jiffies before SLUMBER entry
There is a race condition where the idle timer executes right after
when dispatcher decrements the active count to 0, without waiting for
80 ms(which is the current idle timer duration). Race condition:
Say, everything is idle for 80 ms, and the idle timer gets
scheduled to be executed. At the same time, a new submission comes
in, gets submitted and retired, and at the same time the idle timer
function also starts executing and waits for device mutex. Now, as
soon as the dispatcher decrements the active count and unlocks device
mutex, the idle timer gets the mutex and attempts SLUMBER. However, it
finds GMU isn't idle(busy with TS_RETIRE, or IFPC sequence) and
triggers snapshot/recovery. Fix this by making sure that idle timer
function honors the latest idle_jiffies value before triggering SLUMBER
entry.

Change-Id: Iee0743b41afa616d8a0d1df19f9ae365748d06ce
Signed-off-by: Harshdeep Dhatt <quic_hdhatt@quicinc.com>
Signed-off-by: Kamal Agrawal <quic_kamaagra@quicinc.com>
2023-03-13 12:53:01 +05:30
Kamal Agrawal
1718d48a44 msm: kgsl: Add cx gdsc notifier for rgmu and non-gmu targets
Extend cx gdsc notifier support to rgmu and non-gmu targets. With this,
KGSL waits for cx collapse notifier event instead of polling for gdsc
state. This helps to remove the CPU cycles spent for polling. Also, it
addresses the corner case scenario where cx gdsc collapse event can get
missed due to sleep operation during polling.

Change-Id: Ie92c77d10768376c0267fffad6d745530c645d58
Signed-off-by: Kamal Agrawal <quic_kamaagra@quicinc.com>
Signed-off-by: Harshitha Sai Neelati <quic_hsaineel@quicinc.com>
2023-03-13 12:36:14 +05:30
Prashanth K
083837b68f usb: phy: Set USB charger type to unknown after cable disconnect
Currently after cable disconnect, USB power_supply_type remains
unchanged until next cable connect. Hence add handle to set the
charger type to POWER_SUPPLY_TYPE_UNKNOWN after plug-out.

Change-Id: I8ca4a46684ba095b54563d2148a8fb6276c97f5e
Signed-off-by: Prashanth K <quic_prashk@quicinc.com>
2023-03-12 22:07:44 -07:00
qctecmdr
2fc09dee11 Merge "interconnect: qcom: Update ICC tags under RPM target" 2023-03-12 18:38:17 -07:00
Divisha Bisht
83d98926cb smcinvoke: Handle suspend and resume issues in smcinvoke driver
This change makes changes to smcinvoke driver to handle suspend and resume
scenarios. If the accept thread gets interrupted, do not set the server
state as defunct if the thread is in freezing state, i.e. if the thread
is going in suspend. In such cases, increase timeout of that server so
that invoke thread waits indefinitely for response from userspace until
the system resumes back.

Also,if the accept thread has invalid cbtxn, start waiting
for new requests instead of going to userspace and then coming
back.

Tests: validated with smcinvoke sampleclient cmds.

Change-Id: I96db9112d3e7dda552de37176c2b8a76c32cf47a
Signed-off-by: Divisha Bisht <quic_divibish@quicinc.com>
2023-03-12 09:35:37 -07:00
Salendarsingh Gaud
2988d53422 Revert "usb: gadget: qdss: Ensure PM runtime usage count is properly balanced"
This reverts commit 2fa1c2e46c.

Change-Id: I3692168c1b49bb60eedf8fc369826b873881ffe5
Signed-off-by: Salendarsingh Gaud <quic_sgaud@quicinc.com>
2023-03-11 09:38:44 +05:30
qctecmdr
65e6adcd14 Merge "serial: msm_geni_serial: Check for wakeup byte after suspend" 2023-03-09 14:22:47 -08:00
qctecmdr
50381d0d69 Merge "msm: kgsl: Fix buffer overflow while capturing memory entries" 2023-03-09 11:27:45 -08:00
Raviteja Laggyshetty
332e036963 interconnect: qcom: Update ICC tags under RPM target
All the client drivers irrespective of RPMh or RPM based target,
are using RPMh based ICC tags for setting the flags.
Updating the interconnect code under RPM target to set the flags
according to the RPMh flags sent by the client driver.

if QCOM_ICC_TAG_ALWAYS is passed by client driver then both
RPM_SLEEP_CXT and RPM_ACTIVE_CXT are set.
if QCOM_ICC_TAG_ACTIVE_ONLY is passsed then RPM_ACTIVE_CXT is set.

Perf flags are always ignored under RPM based targets.

Change-Id: I90e0edb8dc6e983d455896b3e9ea04c6b61fac3b
Signed-off-by: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com>
2023-03-09 20:16:28 +05:30
qctecmdr
a1e79e2ac4 Merge "arm64: config: Disable following configs for waipio_le" 2023-03-09 02:58:30 -08:00
qctecmdr
5541405f1b Merge "msm: kgsl: Ensure all TCS are idle during suspend sequence" 2023-03-09 02:58:28 -08:00
qctecmdr
0ca573bdde Merge "usb: gadget: qdss: Ensure PM runtime usage count is properly balanced" 2023-03-09 00:23:54 -08:00
qctecmdr
e68a13e95a Merge "soc: qcom: Update SCT table for Ukee" 2023-03-09 00:23:53 -08:00
qctecmdr
2fc940e880 Merge "serial: msm_geni_serial: Stop RX sequencer during shutdown path" 2023-03-09 00:23:53 -08:00
qctecmdr
31d34740f9 Merge "serial: msm_geni_serial: race between port_close and wakeup bytes" 2023-03-09 00:23:53 -08:00
Prasanna S
32c6b4f78e serial: msm_geni_serial: Check for wakeup byte after suspend
As part of commit '2d390a26b7695 ("serial: msm_geni_serial:
Check for wakeup byte after suspend")', wakeup byte is not
being checked as part of suspend resulting in failure.

Enable the check for wakeup byte after suspend, so that
wakeup isr function handles it.

Change-Id: Ibb3276b3e8584b0ef79d5809158f2cbba4e283c1
Signed-off-by: Prasanna S <quic_prass@quicinc.com>
2023-03-09 12:27:09 +05:30
Rakesh Naidu Bhaviripudi
8b9f6b32c2 msm: kgsl: Fix buffer overflow while capturing memory entries
We calculate the number of memory entries of a process first
to make sure we have enough memory. When saving the entries,
we use the ID of the entry as an array index. This can result
into array out of bound access as ID can be greater than
the number of memory entries calculated earlier.
Fix this by using the right array index.

Change-Id: I915e565330c21a2604354a05592ae15d62991617
Signed-off-by: Rakesh Naidu Bhaviripudi <quic_rakeshb@quicinc.com>
2023-03-09 09:00:25 +05:30
Krishna Kurapati
2fa1c2e46c usb: gadget: qdss: Ensure PM runtime usage count is properly balanced
QDSS currently increments the usage count for the DWC3 core when a
set_alt() is received, and connect_w is queued.  The expectation is that
when qdss_disable() is received, it will schedule disconnect_w to run,
so that the usage count is decremented.
However, there are opportunities for the disconnect_w to be cancelled by
usb_qdss_connect_work().  If a disconnect event is received before
connect_w is run, the usb_connected flag is set to 0, and disconnect_w is
scheduled.  Since qdss->wq is a serialized WQ, the connect_w runs first,
and evaluates that usb_connected is 0.  If this is the case, it cancels the
disconnect_w routine, and exits.  This leaves a hanging vote, and leads to
the DWC3 core not being able to enter runtime suspend.
Fix this by decrementing the usage count in the scenario where disconnect_w
is cancelled.

Change-Id: I40ccb95f6b248dd4d647ba2b4b11f94c0834d760
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
2023-03-09 08:43:57 +05:30
Nitin LNU
9becd82447 smcinvoke: Call object release sync once before adding to queue
call release tz object in sync manner only in case of EBUSY add
object in to post process list, so that we can retry and process
it later in a seprate kthread.

Change-Id: I6ae44857db0870709db17f8658a0d32cf77c9646
Signed-off-by: Nitin LNU <quic_nlakra@quicinc.com>
2023-03-09 01:11:07 +05:30