Commit graph

899,270 commits

Author SHA1 Message Date
Nitesh Gupta
fa2304691b msm: mhi_dev: Handle potential deadlock situation
With the current logic, MHI driver will hold channel
lock while processing the ring element and triggers
callback for the clients. Some clients are issuing
read requests for the channel in the callback context.
MHI driver will try to acquire the same channel lock
in read api leading to a deadlock situation.

Modify the logic to avoid holding channel lock
while processing the ring elements.

Change-Id: I62ac28d5eb06e3c9b12437f02288cfe1cdb2bea2
Signed-off-by: Nitesh Gupta <nitegupt@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-06-24 23:04:04 -07:00
Subramanian Ananthanarayanan
cdc28c2b3f msm: mhi_dev: Check to prevent in_use_list access
Added a check for accessing in_use_list only in async case.

Change-Id: I842f9b9feb688d75152f7b2639c17c25c3376236
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-06-24 19:33:54 -07:00
Subramanian Ananthanarayanan
e1a0f4d9f1 msm: mhi_dev: Use req_lock spinlock during client release
The change is to use req_lock spinlock during client release
and to use the same spinlock while checking for is_stale
during read/write completion callbacks.

Change-Id: I7ebafecb7503fa8521fa8f849cabf4b82bbc2f53
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-06-24 19:33:21 -07:00
Subramanian Ananthanarayanan
db6c7f0843 msm: mhi_dev: Serialize UCI open and close file node operations
Multiple clients might perform open and close file operations
simultaneously on the same file node created by UCI. To avoid
race conditions which might result in invalid accesses or crashes,
the open and close operations are serialized.

Change-Id: Ic6a290a2c6af25bcd60983a7b531bf1287201821
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-06-24 19:27:01 -07:00
Gauri Joshi
bb1be52e1c msm: mhi: Prevent flush queue if channel is closed
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>
2021-06-24 19:26:00 -07:00
Subramanian Ananthanarayanan
446bace1c8 msm: mhi_dev: Use Ring event lock while sending write completion
Change involes usage of event ring mutex while sending write
channel completion events.

Change-Id: I3817e140551954a732e26d097d53176d573bf7f5
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
2021-06-24 19:20:38 -07:00
Gauri Joshi
bf72f4d92f msm: mhi_dev: stop reading host CH ring when CH is reset
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>
2021-06-24 19:19:11 -07:00
Subramanian Ananthanarayanan
24bf1e88dd msm: mhi: Stop sending event completion, during channel reset
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>
2021-06-24 19:17:07 -07:00
qctecmdr
234c300f15 Merge "irqchip: mpm: Add mpm mapping for Blair" 2021-06-24 07:09:05 -07:00
qctecmdr
fbb7d8a475 Merge "msm: kgsl: Use non-atomic snapshot memory if it is unused" 2021-06-24 02:40:06 -07:00
qctecmdr
8de6709364 Merge "pinctrl: qcom: Add blair tlmm spare registers" 2021-06-23 07:45:25 -07:00
qctecmdr
64c433fac3 Merge "msm: mhi: Send Ch cmd ack in async fashion" 2021-06-23 03:51:22 -07:00
qctecmdr
1d93666c90 Merge "SIP crash: Unregister Net sysctl as part of unloading the module" 2021-06-23 03:51:21 -07:00
qctecmdr
cff2da1a99 Merge "msm: mhi_dev: Poll for ipa_dma_disable during MHI suspend" 2021-06-23 03:51:21 -07:00
Mayank Grover
1711db1ab9 pinctrl: qcom: Add blair tlmm spare registers
Add support to enable access for tlmm spare registers
for blair.

Change-Id: I250c0fd796ca80e019c6d5732394817c7527cc1c
Signed-off-by: Mayank Grover <groverm@codeaurora.org>
2021-06-22 22:07:38 -07:00
Mayank Grover
51d46d049b drivers: pinctrl: Add support to access tlmm spare registers
Add support to read and write SPARE registers in TLMM block.

Change-Id: I6426b86510256983b509c5f48c2ab02f80b48ef8
Signed-off-by: Mayank Grover <groverm@codeaurora.org>
2021-06-22 22:07:20 -07:00
qctecmdr
f1515a9025 Merge "camera: add camera headers into exclude list" 2021-06-22 21:39:12 -07:00
Nitesh Gupta
29c57b487a msm: mhi_dev: Poll for ipa_dma_disable during MHI suspend
Poll for ipa_dma_disable prior to entering mhi suspend, until it returns
success. this is to prevent IPA disable failure in case on
pending transfers.

Change-Id: I38143284447b86ce34c47e100e6fe0c23cf28f0b
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Nitesh Gupta <nitegupt@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-06-22 10:47:08 -07:00
Vijay Patil
7b6c37ada2 icnss2: Enhance debugging information
Print subsystem notify event string for wpss & modem instead of
event code. Print proper file type in log while downloading BDF
and REGDB file. Log the error immediately if request_firmware
API get fail.

Change-Id: I32a07895faf2bce640e0bfe89e348c36b02c5150
Signed-off-by: Vijay Patil <vijaylil@codeaurora.org>
2021-06-22 04:44:26 -07:00
qctecmdr
1afca709b6 Merge "msm: mhi-dev: Add support for AIO write API" 2021-06-21 21:13:27 -07:00
qctecmdr
c45fc80a7b Merge "spi: spi-msm-geni: Unset GSI mode flag if TVM usage is active" 2021-06-21 21:13:26 -07:00
qctecmdr
dab6ccdaf9 Merge "interconnect: qcom: holi: Configure QoS during probe" 2021-06-21 21:13:26 -07:00
qctecmdr
3b7468e324 Merge "msm: kgsl: Keep private intact until last refcount is put" 2021-06-21 21:13:26 -07:00
qctecmdr
ba3fcd9811 Merge "ANDROID: usb: dwc3: gadget: don't cancel the started requests" 2021-06-21 21:13:25 -07:00
Subramanian Ananthanarayanan
98e95994cc msm: mhi: Send Ch cmd ack in async fashion
The CH completion commands are sent in async fashion, whereas the ch
cmd ack event is send in a sync fashion. This can lead to the host
receiving completions post the reset ch ack. These ch completion
events post ch reset would be treated as OOS events.
Making changes to send cmd ack events in async fashion to maintain the
ordering that is being sent to the host.

Change-Id: Ib2d568ea1d69486f3d1ebf4e7b209bba3315eba5
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-06-21 16:46:46 -07:00
Gauri Joshi
8838ca5600 msm: mhi-dev: Add support for AIO write API
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>
2021-06-21 11:07:39 -07:00
Mukesh Kumar Savaliya
8c5382949d spi: spi-msm-geni: Unset GSI mode flag if TVM usage is active
This change overrides the GSI mode flag, as generally for any TVM
usecase we enable la-vm flag. So that should be sufficient to manage
the TVM enabled SE instance.

This way any requirement of the GSI mode should not be conflicting or
impacting TVM or non GSI usecases.

Change-Id: I8c8ab8edb3866139ac07d1af55ddf294807b027b
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
2021-06-21 10:11:24 -07:00
Odelu Kukatla
76db2b8502 interconnect: qcom: holi: Configure QoS during probe
Configure QoS settings during probe for all nodes instead of
each node individually upon first client request.

Change-Id: I66e8776c8c27ca55382bca78e963ca8db1055637
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
2021-06-21 08:10:35 -07:00
Vivek Pernamitta
c1da4dfce4 msm: pci: Configure clkreq gpio wakeup capability at runtime
By default pinctrl driver is disabling wakeup capability for gpios
for which interrupt is not registered. This could cause wakeup from
L1SS sleep not working. Hence fix it by enabling/disabling wakeup
capability for clkreq gpio as part of DRV suspend/resume handling.

Change-Id: If8fcb0a3a638c560bfe1f614aa00b7fd872c6b98
Signed-off-by: Vivek Pernamitta <vpernami@codeaurora.org>
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2021-06-21 07:05:53 -07:00
Mukesh Ojha
84403d23fb camera: add camera headers into exclude list
Currently, header test puts videodev2.h into exclude list,
which avoid its inclusion while performing header test.

There are few camera headers which includes videodev2.h
and fails to compile during header test on some
host machine. Ideally, the headers files which includes
videodev2.h should get excluded from header test as they
eventually becomes incompatible due to videodev2.h .

This patch add camera headers to exclude list.

Change-Id: Ia8b7dc8ec635d568a026b948854448c77aae7770
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
2021-06-21 00:19:36 -07:00
Deepak Kumar
4e0b8d44f6 msm: kgsl: Keep private intact until last refcount is put
Currently, we are partially freeing private once last file is
closed but closing last file doesn't necessarily means that
all refcount on private is also put. This results in having a
partially initialized private struct which is not yet freed
and also can't be re-used. As a result if an application is
just opening and closing kgsl device in a loop we will end up
allocating and initializing a new private every time. This also
allows application to mis-use this and create more than allowed
limit of 200 contexts as they can use newly created private to
create new context every time.

To fix this, keep private intact until last refcount is put.
This ensures we can re-use same private if same pid is doing
kgsl open and close repeatedly and also ensures that an app
can't breach 200 context limit.

Change-Id: Ia1d1071275c7691a3d50bc15477b71387c5806d6
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
2021-06-21 11:00:25 +05:30
qctecmdr
c728c09e3a Merge "FM: Reduce high scan time" 2021-06-20 22:25:24 -07:00
qctecmdr
12ba0a89d4 Merge "msm: Remove IPA offload config for Realtek driver" 2021-06-20 22:25:24 -07:00
qctecmdr
02d63d875a Merge "msm: adsprpc: Handle ramdump collection" 2021-06-20 22:25:24 -07:00
qctecmdr
aaccbd7039 Merge "cpufreq: qcom-cpufreq-hw: Move CPUFreq HW registers entry to sysfs" 2021-06-20 22:25:24 -07:00
qctecmdr
f5872f25fe Merge "cnss2: Assert on FW mem allocation failure" 2021-06-20 22:25:23 -07:00
qctecmdr
7f74bb83a5 Merge "defconfig: sdxlemur: Cleaning up config" 2021-06-20 22:25:23 -07:00
Akshaya Damodaran
fec58e3766 msm: Remove IPA offload config for Realtek driver
Remove IPA offload config as IOSSv1 glue driver has also been
removed for Realtek.

Change-Id: I3007c300a27cac1eda114109a6f085efb4b4abb3
Signed-off-by: Akshaya Damodaran <adamodar@codeaurora.org>
2021-06-18 13:03:34 -07:00
Prateek Raj Singh
398c89ff03 FM: Reduce high scan time
Changed logic to find Lower Band Limit from Search Up from current
channel with Wrap enable to tuning to Lower Band Limit + chan space
and Search Down with Wrap disable.

Change-Id: I79a686238d96db5dd5df9436b346b465435ae4f5
Signed-off-by: Prateek Raj Singh <pratsing@codeaurora.org>
2021-06-18 06:04:47 -07:00
Kamal Agrawal
552f119915 msm: kgsl: Use non-atomic snapshot memory if it is unused
Over time, memory gets fragmented, and eventually, a system that is
up for a long time may have only a few physically contiguous pages.
Hence, there is a chance of atomic snapshot memory allocation failure.
Use non-atomic snapshot memory if it is unused as it is allocated
during probe time.

Change-Id: I725adeb80614a775f92213ebe9768f4f2f1c70a2
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
Signed-off-by: Rohan Sethi <rohsethi@codeaurora.org>
2021-06-18 14:42:55 +05:30
Ray Chi
f02f5b9cdd ANDROID: usb: dwc3: gadget: don't cancel the started requests
Currently, there is an application on Mac that it will send
ClearFeature(halt_ep) request before transfering USB data.

If the device receives the ClearFeature(halt_ep) request, the
started requests would be removed and restart the transfer.
However, userspace services don't know this behavior. The services
will free the requests instead of retry and resend the requests.

It will cause the USB host can't get response so that it will try
to recover by issuing a reset signal.

Finally, it will take the infinite loop.
send reqeust > reset > re-enumeration > send request > reset > ...

To avoid this symptom, this patch will keep the started requests
so that userspace services didn't free the requests.

Bug: 178904115
Bug: 177879761
Signed-off-by: Ray Chi <raychi@google.com>
Change-Id: I52acf48871fd7f86cfcc51fb41c67d21ea895d69
Signed-off-by: Saravana Kannan <saravanak@google.com>
Git-commit: 92de566762db61b138765a26e4afaacc7d7f7816
Git-Repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Udipto Goswami <ugoswami@codeaurora.org>
2021-06-18 01:49:09 -07:00
Jeya R
7987c64862 msm: adsprpc: Handle ramdump collection
Collect the ram dumps when process is
initialized and process is not cleaned
on DSP to fix UAF on init memory.

Change-Id: I3ddae176039efa57e057eca730e7ed1cec706484
Acked-by: Krishnaiah Tadakamalla <ktadakam@qti.qualcomm.com>
Signed-off-by: Jeya R <jeyr@codeaurora.org>
2021-06-17 22:21:47 -07:00
qctecmdr
91a7f066e1 Merge "clk: qcom: gdsc-regulator: Dump consumers of GDSC" 2021-06-17 06:35:09 -07:00
qctecmdr
6cce42a704 Merge "soc: qcom: Add symon_subsystem_stats driver support" 2021-06-17 06:35:08 -07:00
qctecmdr
f08bf88e74 Merge "icnss2: Add support to vote for SMPS" 2021-06-17 06:35:08 -07:00
qctecmdr
ac35aec4d2 Merge "input: qcom-hv-haptics: Add support for non-hboost haptics" 2021-06-17 06:35:08 -07:00
qctecmdr
63edb9bba3 Merge "serial: msm_geni_serial: Log UART RFR and IRQ enable status in IPC" 2021-06-17 06:35:01 -07:00
qctecmdr
de1884e325 Merge "serial: msm_geni_serial: Avoid unclocked access from start_tx" 2021-06-17 06:34:59 -07:00
Yogesh Lal
a214749c01 defconfig: sdxlemur: Cleaning up config
Removing redundant configs not needed by sdxlemur.

Change-Id: Ic7cb73ce578a71e2b1affdbe6b9abd22a3f79136
Signed-off-by: Yogesh Lal <ylal@codeaurora.org>
2021-06-17 17:34:37 +05:30
Sandeep Singh
1d1b0056f9 icnss2: Add support to vote for SMPS
This change will add support to vote for SMPS node if
regulator handle is provided in DTS source.

Change-Id: I7519b6c2b93c85a4f4bf7e26ca0b72ef03df094b
Signed-off-by: Sandeep Singh <sandsing@codeaurora.org>
2021-06-16 04:09:43 -07:00