Commit graph

906,022 commits

Author SHA1 Message Date
Fenglin Wu
b3a8a1b143 input: qcom-hv-haptics: config open-loop drive when hBoost is enabled
With commit 8c194abb0e ("input: qcom-hv-haptics: delay hBoost turning
off"), the hBoost would be kept as enabled in the 2 seconds after stopping
play. If a new play is triggered in that 2 seconds, the hBoost will be
considered as working in open-loop mode so configure haptics open-loop
drive in such case.

Change-Id: Ibfa533f23a52bd609e2a8564f859ca8835a8fd67
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-03-14 14:46:30 +08:00
qctecmdr
bb300e0c64 Merge "ubi: Use UBI_MAX_VOLUME_NAME for printing ubi volume names" 2022-03-10 06:59:34 -08:00
qctecmdr
1379f4d5e4 Merge "msm: kgsl: Zap performance counters across context switches" 2022-03-10 00:45:44 -08:00
Pradeep P V K
dfe4a47b7e ubi: Use UBI_MAX_VOLUME_NAME for printing ubi volume names
Use UBI_MAX_VOLUME_NAME length for printing ubi volume names
to avoid truncation of ubi volume name fields.

Change-Id: I0ab4577dcc1e4bb93d2bcef1b8e52da98f13ff15
Signed-off-by: Pradeep P V K <quic_pragalla@quicinc.com>
2022-03-09 21:23:56 -08:00
qctecmdr
c33437e770 Merge "Merge android11-5.4.161+ (5d7a491) into msm-5.4" 2022-03-09 20:19:55 -08:00
Sandeep Singh
90bd82d3f8 icnss2: Add code to pass device configs to wlan driver
Add code to pass device configs to wlan driver.

Change-Id: I977fc564914f9fbdabc0004eff4c5c2f14a1fc7c
Signed-off-by: Sandeep Singh <quic_sandsing@quicinc.com>
2022-03-09 20:16:22 +05:30
Mohammed Mirza Mandayappurath Manzoor
72fc4d2415 msm: kgsl: Zap performance counters across context switches
Performance counter values need not be retained across contexts unless
specifically requested for debug. Zap the counters by initialising
perfcounter SRAM with 0's using GPU_RBBM_PERFCTR_SRAM_INIT_CMD.

Add pm4 packets during context switches and add a KMD postamble packet to
clear the counters during preemption. Do not enable perfcounter save and
restore unless requested.

Change-Id: I371779ce659c07a1cc664327f5ecdcf0374201d8
Signed-off-by: Mohammed Mirza Mandayappurath Manzoor <quic_mmandaya@quicinc.com>
Signed-off-by: Harshitha Sai Neelati <quic_hsaineel@quicinc.com>
2022-03-09 11:58:35 +05:30
qctecmdr
23e4f0e331 Merge "arm64: defconfig: cleanup the holi_GKI.config" 2022-03-08 21:49:11 -08:00
qctecmdr
be836c5a4b Merge "usb: dwc3: Disable USB2 internal retry for USB3.1 cores v1.70a and above" 2022-03-08 21:49:11 -08:00
qctecmdr
f8d1c17b3f Merge "msm: mhi_dev: Changing the GFP flag in alloc_skb()" 2022-03-08 04:52:38 -08:00
qctecmdr
f1bbfdbeea Merge "ANDROID: usb: gadget: f_accessory: update SS/SSP descriptors" 2022-03-08 00:10:39 -08:00
Ajay Agarwal
080a6e25a3 usb: dwc3: Disable USB2 internal retry for USB3.1 cores v1.70a and above
STAR 9001346572 affects dwc_usb3.1 versions 1.70a and above.
Disable USB2 internal retry for the same.

Change-Id: Id476220130518c0fd740d9be5d6db1e712529112
Signed-off-by: Ajay Agarwal <quic_ajaya@quicinc.com>
Signed-off-by: Udipto Goswami <quic_ugoswami@quicinc.com>
2022-03-08 09:52:11 +05:30
Jilai Wang
c1b9e196cb msm: npu: Avoid buffer overflow when handling get_property packet
If packet size is set to invalid value by firmware, when driver
tries to copy property content to memory, it could cause buffer
overflow. To avoid this, packet size needs to be checked to make
sure it's valid.

Change-Id: Ic549f840db998385323e89b3f3dbe2e4349b932e
Signed-off-by: Jilai Wang <quic_jilaiw@quicinc.com>
2022-03-07 06:42:35 -08:00
Ray Chi
fb338f982c ANDROID: usb: gadget: f_accessory: update SS/SSP descriptors
Currently, only HS descriptors will be updated with endpoint address
during binding process. According to current max_speed in configfs,
this patch will also update SS/SSP descriptors with endpoint address.

Bug: 162562782
Signed-off-by: Ray Chi <raychi@google.com>
Change-Id: I67983ef47df7ac567ec1d3af80921c39c98a545d
Git-commit: 41fe558317e9ffdc07326e8ef9ca6ea596d9a518
Git-Repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Pratham Pratap <ppratap@codeaurora.org>
2022-03-07 13:32:11 +05:30
taehyun.cho
3ec6ac1cd2 ANDROID: USB: gadget: f_accessory: add support for SuperSpeed Plus
Adds the necessary SuperSpeed Plus support for f_accessory.

[Not upstream as this file is not upstream].

Bug: 170925797
Signed-off-by: taehyun.cho <taehyun.cho@samsung.com>
Change-Id: Ia2a5f4a6cefac2418f8f29bf1a56355b96d80fc0
(cherry picked from commit 00572be28ec474d7953f1b9dd681cc2dd290d9bf)
[willmcvicker: only cherry-pick f_accessory from original patch]
Signed-off-by: Will McVicker <willmcvicker@google.com>
(cherry picked from commit 4d7ced0819d3f30acbde46991393249049cefa05)
Signed-off-by: Will McVicker <willmcvicker@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Git-commit: 9acdbad022c88c958ba69ab3f021f2e8a07cfc45
Git-Repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Pratham Pratap <ppratap@codeaurora.org>
2022-03-07 13:32:11 +05:30
qctecmdr
a341edbce8 Merge "msm: kgsl: Add a sysfs node to control performance counter reads" 2022-03-04 21:47:54 -08:00
qctecmdr
fdfd658ea9 Merge "msm_perf: check cpu_possible to improve stability" 2022-03-04 16:17:57 -08:00
Rohith Kollalsi
7acc156970 usb: u_qdss: Add proper error handling for map failure of iova
dma_map_resource() API returns DMA_MAPPING_ERROR i.e -1 upon error.
The current code checks against NULL which makes it think that the
API returned successfully. The incorrect IOVA further results into
SMMU fault. To fix this, add proper error handling for mapping
failure of iova.

Change-Id: I080049029ce01be13c603a1d709e37189a09484e
Signed-off-by: Rohith Kollalsi <quic_rkollals@quicinc.com>
2022-03-04 01:51:56 -08:00
Gaurav Singh
985f05327f msm_perf: check cpu_possible to improve stability
check cpu_possible to improve stability

Change-Id: I9ce3b5a5a6b1e846f44ffb9e255cc5b6b701b377
Signed-off-by: Gaurav Singh <quic_sgaurav@quicinc.com>
2022-03-04 01:18:01 -08:00
Srinivasarao Pathipati
570071dcd1 arm64: defconfig: cleanup the holi_GKI.config
Cleanup the redundant configs from holi_GKI.config as they are
updated in gki_defconfig.

Change-Id: I9e1a3bc7800e9d1e56ba651a63ebab03dd52546e
Signed-off-by: Srinivasarao Pathipati <quic_spathi@quicinc.com>
2022-03-04 14:06:38 +05:30
Srinivasarao Pathipati
c256d34783 Merge android11-5.4.161+ (5d7a491) into msm-5.4
* refs/heads/tmp-5d7a491:
  UPSTREAM: lib/iov_iter: initialize "flags" in new pipe_buffer
  Revert "ANDROID: incremental-fs: remove index and incomplete dir on umount"
  Revert "ANDROID: incremental-fs: fix mount_fs issue"
  FROMGIT: f2fs: avoid EINVAL by SBI_NEED_FSCK when pinning a file
  UPSTREAM: usb: gadget: rndis: check size of RNDIS_MSG_SET command
  UPSTREAM: USB: gadget: validate interface OS descriptor requests
  Revert "tracefs: Have tracefs directories not set OTH permission bits by default"
  UPSTREAM: tipc: improve size validations for received domain records
  ANDROID: GKI: Enable CONFIG_SERIAL_8250_RUNTIME_UARTS=0
  ANDROID: GKI: db845c: Update symbols list and ABI
  ANDROID: Increase x86 cmdline size to 4k
  UPSTREAM: cgroup-v1: Require capabilities to set release_agent
  ANDROID: incremental-fs: remove index and incomplete dir on umount
  UPSTREAM: binder: fix async_free_space accounting for empty parcels
  UPSTREAM: tee: handle lookup of shm with reference count 0
  UPSTREAM: bpf: Fix integer overflow in argument calculation for bpf_map_area_alloc

Change-Id: Icb1c0295b7d7da25c37c21a2580ea4d246069039
Signed-off-by: Srinivasarao Pathipati <quic_spathi@quicinc.com>
2022-03-01 10:32:54 +05:30
qctecmdr
62da00618b Merge "msm: mhi_dev: Adding check for event ring" 2022-02-28 06:04:57 -08:00
qctecmdr
c0da9856df Merge "i2c: i2c-msm-v2: Register an interrupt by adding IRQF_NO_SUSPEND" 2022-02-28 06:04:57 -08:00
qctecmdr
9e69b91756 Merge "usb: gadget: u_serial: Dequeue request on gserial_disconnect" 2022-02-28 06:04:57 -08:00
qctecmdr
f8e18e2c31 Merge "usb: dwc3: Don't touch gadget->max_speed while limiting the speed" 2022-02-28 06:04:56 -08:00
qctecmdr
23a04c5e66 Merge "dma-buf: suppress warnings for direct dma clients" 2022-02-26 02:31:43 -08:00
Sai Chaitanya Kaveti
d5a7ee66e0 msm: mhi_dev: Changing the GFP flag in alloc_skb()
GFP_ATOMIC flag is typically used in memory allocations inside
interrupt handlers or with spin locks. It is of high priority but it
does not allow the caller to reclaim the memory allocation request.
This may lead to memory allocation failures in low memory situations.

Since alloc_skb() is not called from interrupt handler or in spin lock
context, changing the GFP flag from GFP_ATOMIC to GFP_KERNEL.

Change-Id: I6c3a2b5b4674965cf1d4860e9072fa46cd4adddb
Signed-off-by: Sai Chaitanya Kaveti <quic_skaveti@quicinc.com>
2022-02-25 17:15:02 +05:30
Pratham Pratap
83626bc1f4 usb: gadget: u_serial: Dequeue request on gserial_disconnect
Consider a case where, during bus_reset or composition switch,
due to some reason ENDXFER command timed out. Now, gadget driver
won't be giving back the requests to function driver because of
the timeout since controller can still access those requests.
During function_disable gadget driver expects function driver to
dequeue the requests so that the lists maintained by both gadget
driver and function driver should free up all the request.
Currently u_serial driver is just freeing the requests from
read/write pool without any dequeue which is causing
inconsistencies.

Fix this by dequeueing requests from read/write pool on
gserial_disconnect.

Change-Id: I714c7fe681d42a68c864bf0e90748f117b258548
Signed-off-by: Pratham Pratap <quic_ppratap@quicinc.com>
2022-02-25 00:29:36 -08:00
Pavankumar Kondeti
013be6c7ff usb: dwc3: Don't touch gadget->max_speed while limiting the speed
The gadget->max_speed should not be changed dynamically as it can
mess up the descriptor preparation. Let it be the max supported
by the hardware and changed the dwc3->maximum_speed to force
the controller to enumerate at lower speed when needed. This makes
sure that the descriptors for all speeds are cached during bind
of the function drivers.

Change-Id: Id7fd8f23bb84f7396a6e3b62c5e61c4536522d82
Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
2022-02-24 23:53:56 -08:00
Max Kellermann
5d7a491ae4 UPSTREAM: lib/iov_iter: initialize "flags" in new pipe_buffer
commit 9d2231c5d74e13b2a0546fee6737ee4446017903 upstream.

The functions copy_page_to_iter_pipe() and push_pipe() can both
allocate a new pipe_buffer, but the "flags" member initializer is
missing.

Fixes: 241699cd72 ("new iov_iter flavour: pipe-backed")
To: Alexander Viro <viro@zeniv.linux.org.uk>
To: linux-fsdevel@vger.kernel.org
To: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 87c575d2a2)
Bug: 220741611
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I91076a0b6327ee8dd87e75fc875062b6adf2de4c
2022-02-24 09:06:53 +01:00
Mohammed Mirza Mandayappurath Manzoor
f9f1fa6e86 msm: kgsl: Add a sysfs node to control performance counter reads
Currently performance counters are global and can be read by anyone. Change
the behaviour to disable reading global counters as default and add a sysfs
node to enable/disable reads.

Change-Id: Ic3785acd9bd7425c2a844ed103d7b870d9f80adf
Signed-off-by: Mohammed Mirza Mandayappurath Manzoor <quic_mmandaya@quicinc.com>
Signed-off-by: Harshitha Sai Neelati <quic_hsaineel@quicinc.com>
2022-02-24 11:07:31 +05:30
qctecmdr
37a3bfb6ec Merge "clk: qcom: clk-alpha-pll: Remove unused lucid_5lpe_sdx_cpu ops" 2022-02-23 18:42:17 -08:00
Tadeusz Struk
88e1302769 Revert "ANDROID: incremental-fs: remove index and incomplete dir on umount"
This reverts commit fe0c18d0f0.

This is follow up cleanup after revert of:
"Revert "ANDROID: incremental-fs: fix mount_fs issue"

Bug: 220805927

Signed-off-by: Tadeusz Struk <tadeusz.struk@linaro.org>
Change-Id: I7749401484d87b9d519bd7b9600cd02f91a18090
2022-02-23 09:52:31 -08:00
qctecmdr
0088274bcc Merge "pic: msm: Add support for ep config space access via sysfs" 2022-02-23 07:43:19 -08:00
Imran Shaik
ec906e6fb5 clk: qcom: clk-alpha-pll: Remove unused lucid_5lpe_sdx_cpu ops
Clean up the lucid_5lpe_sdx_cpu ops as it is not in use.

Change-Id: I2a154be710b2a36f2a00eb689212cc39f57c284d
Signed-off-by: Imran Shaik <quic_imrashai@quicinc.com>
2022-02-23 02:24:29 -08:00
Howard Chen
2b144ea90c Revert "ANDROID: incremental-fs: fix mount_fs issue"
This reverts commit 013b7ed754.

Test: Can now install the same apk twice, and repeated installs are
stable
Bug: 217661925
Bug: 219731048
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I86871c364c17a0d1107b3891a574b72edcf04ea2
(cherry picked from commit d107cd06f26b4d45b1079c7eb857815905198076)
Signed-off-by: Howard Chen <howardsoc@google.com>
2022-02-23 07:31:47 +00:00
qctecmdr
2288b1b627 Merge "dwc3: gadget: Remove pm_runtime calls from dwc3_gadget_ep_disable" 2022-02-22 19:00:09 -08:00
qctecmdr
b701a27c87 Merge "Revert "msm: kgsl: Call dma_buf_unmap_attachment() early"" 2022-02-22 19:00:09 -08:00
qctecmdr
0801ac3d8f Merge "defconfig: disable CONFIG_FORTIFY_SOURCE" 2022-02-22 19:00:08 -08:00
qctecmdr
de10b5718b Merge "pci: msm: Bringing EP out of reset prior link up" 2022-02-22 19:00:08 -08:00
Ramya SR
3da3ec335a pci: msm: Bringing EP out of reset prior link up
In msm_pcie_enable,EP is brought out of reset
after the link up.This will cause the enumeration
issues with HSP as NTN3 GPIO is connected to WLAN reset.
So moving the part of bringing the EP out of reset
prior link training and after de-emphasis setting.

The reason for moving it after de-emphasis setting is
to ensure WLAN is brought out of reset after all the switch
settings gets applied.

change-Id: I523000fd2475d8a1767423469f3bab0b7bc97ac0
Signed-off-by: Ramya SR <quic_rsr@quicinc.com>
2022-02-22 12:55:24 +05:30
Mukesh Kumar Savaliya
35c1685711 i2c: i2c-msm-v2: Register an interrupt by adding IRQF_NO_SUSPEND
This change registers an interrupt with flag IRQF_NO_SUSPEND,so as
to allow system to not disable the interrupt by suspend_device_irqs().

If any client issues transfer during system suspend/resume time, i2c
should do transfer without any timeout.

Change-Id: I5b2eda52e82dc319e4bb74cb44b9c6ae09ad84c9
Signed-off-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
2022-02-21 23:23:14 +05:30
Ramya SR
bae84b4a34 pci: msm: Update of de_emphasis setting depending on ntn3 switch version
In NTN3 switch there are i2c writes performed
in order to update some of the settings prior linkup.
These settings are taken care in upcoming versions of ntn3 chips
i.e, above V1 chips.There are some settings still required for NTN3v2
to solve the gen3 AER's. So added a separate switch reg update
sequence for it.

This change is to support update of de_emphasis settings of ntn3 switch
depending on the chip version.Also added a condition to check the
force update of these settings irrespective of the chip version
if force update flag is set by the client in the dtsi.

Change-Id: Id4828533f3f6f6f309b1c9c844a99a183c2950e1
Signed-off-by: Ramya SR <quic_rsr@quicinc.com>
2022-02-20 20:48:37 -08:00
Srinivasarao Pathipati
ccc854ca55 dma-buf: suppress warnings for direct dma clients
Client with direct dma will have multiple dma buffer segments.
Warning is raised as partial cmo only supported with one segment.
Suppress these warnings as this is known limitation.

Change-Id: Ie534b2b11121e60bf87f671b14ea1b1fd57633af
Signed-off-by: Srinivasarao Pathipati <quic_spathi@quicinc.com>
2022-02-16 17:58:32 +05:30
Rohith Kollalsi
c86f34751f dwc3: gadget: Remove pm_runtime calls from dwc3_gadget_ep_disable
There is a chance that ep_disable will be called from mass
storage function driver after usb is in LPM as ep_disable
in mass storage function driver is called in worker
thread context. Hence, Commit 589a7f885ae2 ("usb: dwc3: Don't
perform pm rt sync operations in atomic context") added
pm_runtime calls for mass storage function driver,
so that system can be resumed and then do the ep_disable
operations.

But Commit e8e83c46c5eb ("usb: gadget: f_mass_storage: Disable
eps during disconnect") has changed the implementation of
ep_disable in mass storage function driver. It is now being
called in atomic context. So there is no chance of ep_disable
being called after usb is in lpm. Hence remove the support for
pm_runtime calls in ep_disable as they are any how no-op.

Change-Id: I5bcc2572da1608b24b1fe1cf14b6f1c3918d2d7a
Signed-off-by: Rohith Kollalsi <quic_rkollals@quicinc.com>
2022-02-15 06:29:10 -08:00
Wesley Cheng
e326bb5942 usb: gadget: f_mass_storage: Disable eps during disconnect
When receiving a disconnect event from the UDC, the mass storage
function driver currently runs the handle_exception() routine
asynchronously.  For UDCs that support runtime PM, there is a
possibility the UDC is already suspended by the time the
do_set_interface() is executed.  This can lead to HW register access
while the UDC is already suspended.

Change-Id: Ie1374cb7c895bd9d5c0129dd18886980dba71712
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Link: https://lore.kernel.org/r/1635365407-31337-3-git-send-email-quic_wcheng@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 9fff139aeb11186fd8e75860c959c86cb43ab2f6
Git-Repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Rohith Kollalsi <quic_rkollals@quicinc.com>
2022-02-15 06:28:16 -08:00
Wesley Cheng
da325a8c58 usb: gadget: udc: core: Revise comments for USB ep enable/disable
The usb_ep_disable() and usb_ep_enable() routines are being widely
used in atomic/interrupt context by function drivers.  Hence, the
statement about it being able to only run in process context may
not be true.  Add an explicit comment mentioning that it can be used
in atomic context.

Change-Id: I509be3e7eba3f61b95c9bbeef6b39f4fb3a55f25
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Link: https://lore.kernel.org/r/1635365407-31337-2-git-send-email-quic_wcheng@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: b0d5d2a71641bb50cada708cc8fdca946a837e9a
Git-Repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Rohith Kollalsi <quic_rkollals@quicinc.com>
2022-02-15 06:27:03 -08:00
Srinivasarao Pathipati
6cbac6b88a defconfig: disable CONFIG_FORTIFY_SOURCE
The config CONFIG_FORTIFY_SOURCE is disabled in gki_defconfig
with 'commit 90d684876917 ("ANDROID: GKI: disable CONFIG_FORTIFY_SOURCE")'
so removing it.

Change-Id: I81db9fea3f4dbc640df385efdaaa4461e5db1c8c
Signed-off-by: Srinivasarao Pathipati <quic_spathi@quicinc.com>
2022-02-15 12:43:26 +05:30
Jaegeuk Kim
46778c889e FROMGIT: f2fs: avoid EINVAL by SBI_NEED_FSCK when pinning a file
Android OTA failed due to SBI_NEED_FSCK flag when pinning the file. Let's avoid
it since we can do in-place-updates.

Bug: 210593661
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit 70da2736a4138b86a12873d33fefbb495e22e6f8
 git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev)
Signed-off-by: Huang Jianan <huangjianan@oppo.com>
Change-Id: I3fd33c984417c10b38e23de6cec017b03d588945
Signed-off-by: David Anderson <dvander@google.com>
2022-02-15 00:50:28 +00:00
Greg Kroah-Hartman
9a4b39bd76 UPSTREAM: usb: gadget: rndis: check size of RNDIS_MSG_SET command
Check the size of the RNDIS_MSG_SET command given to us before
attempting to respond to an invalid message size.

Bug: 162326603
Reported-by: Szymon Heidrich <szymon.heidrich@gmail.com>
Cc: stable@kernel.org
Tested-by: Szymon Heidrich <szymon.heidrich@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 38ea1eac7d88072bbffb630e2b3db83ca649b826)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I61168b48de4ca79a3a28dd4d3b81779bc25554c1
2022-02-14 09:18:28 +01:00