Commit Graph

1020403 Commits

Author SHA1 Message Date
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
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
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
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
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
Nitin LNU
1ab5482c8e smcinvoke: Call object release sync once before adding to entry to queue
Calling object release in sync once if fails with ebusy or enomem
to a queue.

Change-Id: I10a998cd2bc5f8ad803f56dc372b76b98f763336
Signed-off-by: Nitin LNU <quic_nlakra@quicinc.com>
2023-03-09 01:09:26 +05:30
qctecmdr
efa6fdc50c Merge "Merge keystone/android12-5.10-keystone-qcom-release.149+ (d7eb21e) into msm-5.10" 2023-03-08 08:11:01 -08:00
qctecmdr
c1ea83ef3a Merge "power: supply: qti_battery_charger: Update IDT FW version offset" 2023-03-08 04:07:36 -08:00
Anjelique Melendez
896166096d power: supply: qti_battery_charger: Update IDT FW version offset
IDT FW version offset has been changed in IDT9415 and above. Update the
offset value accordingly.

Change-Id: Ic8b8c0d3af4c6587e85f1f87bcdf9ac2ea806eae
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
2023-03-07 14:00:41 -08:00
Raviteja Laggyshetty
b5178e2da7 interconnect: qcom: waipio: 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: I123baed132efcc37daf0d7a01298308d9e664c81
Signed-off-by: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com>
2023-03-07 14:26:14 +05:30
Raviteja Laggyshetty
4dc2073a71 interconnect: qcom: bcm-voter: Fix KASAN Use-After-Free
With unload of dispcc driver, disp_bcm_voter is getting unloaded.
But the interconnect driver keeps committing the votes on both
apps and disp bcm voters causing UAF.
Added remove function to capture the unloaded bcm voter details
and updated the bcm voters list by removing the unloaded bcm voter
from the list.

Added checks under add, commit and clear functions to check if the
voter exists in the bcm voters list. If requested bcm voter is not
present under voter list then returning ENODEV.

Change-Id: I7c4007a23f17a205ef24c9622e10bc4a46c5b67b
Signed-off-by: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com>
2023-03-07 13:17:31 +05:30
Jishnu Prakash
a7fd4ba331 regulator: rpmh-regulator: Add PBS peripheral voting support
For some PMICs, there may be a requirement to enable some regulators
through the HW enable control instead of the usual SW voting. In these
cases, there is a PBS RPMh resource exposed to all subsystems and
voting on this will write to a register on PSTM, which triggers a
PBS sequence that toggles the enable state of the required regulator
through HW enable control.

Add support for voting for regulator enable state through the PBS
RPMh resource.

Change-Id: I23b174a7965243e6406b15905bff3b4d9671de3b
Signed-off-by: Jishnu Prakash <quic_jprakash@quicinc.com>
2023-03-06 21:52:20 -08:00
qctecmdr
d733ac8c62 Merge "rpmsg: glink: Handle ENODEV error in RX path" 2023-03-06 21:17:19 -08:00
Kishore Kumar Ravi
557240aedf rpmsg: glink: Handle ENODEV error in RX path
Glink interrupt handler exits due to -ENODEV error
return from the RX data path. So, failed to
read left-over data from FIFO.

Handle ENODEV error in qcom_glink_rx_data will process left
over data properly.

Change-Id: I7ebfd47b0daf077d8b5399df03464c4e8afdb347
Signed-off-by: Kishore Kumar Ravi <quic_kiskum@quicinc.com>
2023-03-06 03:09:45 -08:00
qctecmdr
ac5dcd590f Merge "msm: kgsl: Move kgsl MMU and CBs to a component device" 2023-03-06 03:07:04 -08:00