Commit graph

889,574 commits

Author SHA1 Message Date
Anmolpreet Kaur
e88247afe7 qseecom : Fixes to enable shmbridge
Fixes in qseecom driver to support shmbridge and
change parameters as hypervisor expects them to
be.

Change-Id: I57dc5d6fe7b74b45da2dee6de32c1251d77275ee
Signed-off-by: Anmolpreet Kaur <anmolpre@codeaurora.org>
2020-08-12 05:55:34 -07:00
Kaushal Kumar
9f42a85e97 defconfig: msm: enable event sharing in kernel for lahaina/holi
Enable sharing of pmu counters between kernel clients for the
QGKI images of lahaina and holi.

Change-Id: I1f4ab232f78a37737f9110c7155a4443c8243ece
Signed-off-by: Kaushal Kumar <kaushalk@codeaurora.org>
2020-08-12 17:42:41 +05:30
Fei Mao
ab1543314b input: touchscreen: st: increase LDO load
Its maximal load is about 20mA, so change it by measure.

Change-Id: I1184ac5db5aa067a10cb0accbfda3da7111b4fc3
Signed-off-by: Fei Mao <feim1@codeaurora.org>
2020-08-12 18:54:32 +08:00
qctecmdr
227e7597cb Merge "arm64: defconfig: Enable GENI and slimbus drivers" 2020-08-12 01:56:15 -07:00
qctecmdr
913ca7122f Merge "defconfig: holi: enable recommended memory configs" 2020-08-12 01:56:14 -07:00
Akash Asthana
b53e2a331c arm64: defconfig: Enable GENI and slimbus drivers
Enable GENI and slimbus drivers.

Change-Id: I01ccd2126efb31d7cf03725add8159692f05ff84
Signed-off-by: Akash Asthana <akashast@codeaurora.org>
2020-08-11 22:21:27 -07:00
Subbaraman Narayanamurthy
f5ab798784 leds: qti-flash: Handle error return path properly
Currently if qti_flash_lmh_mitigation_config() returns an error
in qti_flash_led_strobe(), spin_unlock() is not called in the
error return path. Fix it.

Fixes: 42bdecad7c ("leds: qti-flash: Fix LMH mitigation configuration")
Change-Id: I1bede93873a151cc9bab7f2000d8f058e1890fda
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2020-08-11 19:50:04 -07:00
Can Guo
a24461d3b1 scsi: ufs: Fix some racing problems in ufshcd_shutdown()
Currently I/O requests could be still submitted to UFS device while
UFS is working on shutdown flow. This may lead to racing as below
scenarios and finally system may crash due to unclocked register
accesses.

To fix this kind of issues, in ufshcd_shutdown(),

1. Use pm_runtime_get_sync() instead of resuming UFS device by
   ufshcd_runtime_resume() "internally" to let runtime PM framework
   manage and prevent concurrent runtime operations by incoming I/O
   requests.

2. Specifically quiesce the SCSI device of UFS Device well known LU
   so that ufshcd_suspend() can still send the SSU cmd, and remove
   all the other SCSI devices to block all I/O requests to those
   SCSI devices.

Example of racing scenario: While UFS device is runtime-suspended

Thread #1: Executing UFS shutdown flow, e.g.,
           ufshcd_suspend(UFS_SHUTDOWN_PM)

Thread #2: Executing runtime resume flow triggered by I/O request,
           e.g., ufshcd_resume(UFS_RUNTIME_PM)

This breaks the assumption that UFS PM flows can not be running
concurrently and some unexpected racing behavior may happen.

Change-Id: I83345e6b48a832ec7962fc016f4fdf128c9a5bd1
Signed-off-by: Can Guo <cang@codeaurora.org>
2020-08-12 10:39:52 +08:00
Naman Padhiar
4bb5a23e62 icnss2: Send SMMU IOVA range only when SMMU S1 is enabled
Send SMMU IOVA range to Firmware only when SMMU S1 stage is
enabled.

Change-Id: I3d0d0b6ad3db18aded0d921f79337cf845ceb5f4
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
2020-08-12 07:29:27 +05:30
Walter Yang
4f36922db2 ASoC: Add backend user count check
Add backend user count check to protect the index
boundary.

Change-Id: Ic1b61d1f7130252cc54da0b16553858714988dbd
CRs-Fixed: 2009216
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
2020-08-12 08:00:26 +08:00
qctecmdr
eacbc69c72 Merge "msm: adsprpc: Put upper limit on IOMMU mapping size" 2020-08-11 15:30:43 -07:00
qctecmdr
be08d2a05d Merge "leds: qti-flash: Fix error logging in qti_flash_led_symmetry_config()" 2020-08-11 15:30:43 -07:00
qctecmdr
75ffc40f70 Merge "usb: dwc3: gadget: Prevent core from processing stale TRBs" 2020-08-11 15:30:43 -07:00
qctecmdr
b55b0200a9 Merge "clk: qcom: gpucc-lahaina: Fix "stuck at on" warning" 2020-08-11 15:30:43 -07:00
qctecmdr
79f084ee9e Merge "icnss2: Do not clear SHUTDOWN_DONE flag until reinit is done" 2020-08-11 15:30:42 -07:00
qctecmdr
6b3e33ff9a Merge "usb: dwc3-msm: Add orientation setting capability via sysfs" 2020-08-11 15:30:42 -07:00
qctecmdr
3f51b8647d Merge "icnss2: Add support for Runtime PM" 2020-08-11 15:30:42 -07:00
qctecmdr
50ea7fd3ee Merge "cnss2: Add support for PCIE gen switch" 2020-08-11 15:30:41 -07:00
qctecmdr
f1c8a01984 Merge "defconfig: sdxlemur: add support for qdss" 2020-08-11 15:30:41 -07:00
qctecmdr
327618025b Merge "usb: u_ether: Add null pointer check for sk_buff in eth_start_xmit" 2020-08-11 15:30:41 -07:00
qctecmdr
139febc37f Merge "Add support for returning power sources status" 2020-08-11 15:30:40 -07:00
Saravana Kannan
fbc213a516 ANDROID: Revert "module: Refactor section attr into bin attribute"
This reverts commit 0d5d9413a6 as it
breaks ramdump debug tools. Will bring this back in after resolving
those issues.

Bug: 163100336
Change-Id: Ic64214c63ecd6347f5707cc7354e6969d3af0320
Signed-off-by: Saravana Kannan <saravanak@google.com>
Git-commit: ae8f7f7807
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
2020-08-11 13:38:26 -07:00
Saravana Kannan
fc7972f8db ANDROID: Revert "module: Do not expose section addresses to non-CAP_SYSLOG"
This reverts commit 314ac273f0 as it
breaks ramdump debug tools. Will bring this back in after resolving
those issues.

Bug: 163100336
Change-Id: Ibf46f6db0fa2bf9cc9e7121115889e15ca07cdab
Signed-off-by: Saravana Kannan <saravanak@google.com>
Git-commit: d837f090a6
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
2020-08-11 13:38:17 -07:00
Shaleen Agrawal
c6cb643bcd sched: Improve the Scheduler
This change is for general scheduler improvement.

Change-Id: If6e38ac379564fa906ff3db6be8bee77fcde0478
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
2020-08-11 10:15:18 -07:00
Raghavendra Rao Ananta
54007e59aa qcom: pil: Move the IMEM location for disabling timeouts
Currently, the PIL driver expects the debug cookie for disabling
the check for subsystem bootup timeouts in the PIL's standard
IMEM location. However, since the bootloader also loads the firmware,
it's possible that it can use this location to set the cookie that's
needed for ramdump parsers. As a result, the original timeout cookie,
that's usually set before bootloader even begins, is overwritten.
Hence, move the timeout cookie to a different location to avoid this
conflict.

Change-Id: I2e368e9fbd7e996e2a4290b75818fae8cb9277be
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
2020-08-11 09:34:51 -07:00
Akhil P Oommen
bea2e01a92 msm: kgsl: Mark the scratch buffer as privileged
Mark the scratch buffer as privileged so that it can only be accessed by
GPU through the ringbuffer. To accomplish this, we need to:

1. Disable the shadow rptr feature.
2. Trigger RPTR update from GPU using a WHERE_AM_I packet.
3. Add support for the new ucode.

Change-Id: I9b388f55f53b69028b9bbb2306cb43fd1297c52f
Signed-off-by: Akhil P Oommen <akhilpo@codeaurora.org>
2020-08-11 21:25:53 +05:30
Jordan Crouse
f919cbe3df msm: kgsl: Use per-target scratch memory for preemption
a5xx and a6xx both have a need for a bit of scratch memory for preemption.
Rename the existing "counters" member in struct adreno_preemption from a5xx
and use it for a6xx to store the context restore address.

Change-Id: Ic0dedbad6493e99b35d8c771673e8f9f686f927c
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2020-08-11 21:24:01 +05:30
Anmolpreet Kaur
9cb1271ce6 qtee_shmbridge: Enable shmbridge on lahaina
Enable shmbridge on lahaina and change parameters
to make it inline with what hyp expects. This
change introduces a support_hyp flag to indicate
if hypervisor support is available for target and
change the parameters accordingly.

Change-Id: If17ece63de719105e0c1de53f5408ec6f462ba13
Signed-off-by: Anmolpreet Kaur <anmolpre@codeaurora.org>
2020-08-11 20:20:32 +05:30
Naveen Yadav
26c6a10fec dt-bindings: clock: Add rpmh header for sdxlemur
Add new RPMH clock for SDXLEMUR.

Change-Id: I2b45ff60e5a530fae015ef393d959d56a87f95b3
Signed-off-by: Naveen Yadav <naveenky@codeaurora.org>
2020-08-11 07:29:16 -07:00
Tao Zhang
72dd2a16b1 coresight: tmc: Set flush cti for both etr and etb
Set flush cti for both etr and etb. Set FlushandStop bit to default
value of FFCR in enablement function. Config the correct trigger number
of flush and reset cti for both etr and etb.

Change-Id: Idee3802e5a69aca521a6259f9936ddb8361a87d4
Signed-off-by: Tao Zhang <taozha@codeaurora.org>
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
2020-08-11 18:38:13 +08:00
Mukesh Kumar Savaliya
ff5005a866 spi: spi-msm-geni: Return error if setup transfer fails
setup_fifo_xfer/setup_gsi_xfer api may fail while transfer
preparation, return error to the client in such case instead
of advancing with the erroneous transfer to prevent unpredictable
transfer scenarios.

Change-Id: I559fbc1dd26248c639cd0f0e1844dafbada703ce
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
2020-08-11 15:12:42 +05:30
Mukesh Kumar Savaliya
5bdbd50537 platform: msm-geni-se: Disable CMD_DONE in DMA mode for I2C and SPI
For I2C and SPI, CMD_DONE should be enabled only in fifo mode for
transfer completion. Disable CMD_DONE for DMA mode and cancel cmd
to avoid race condition between cmd_done, dma_done and cmd_done,
cancel_irq.

Change-Id: Ib1dc10d3e17c2b3df17097f2a4bc60b159d76709
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
2020-08-11 14:07:38 +05:30
Mukesh Kumar Savaliya
842b256c4d i2c: i2c-msm-geni: Reinitialize the variables after every transfer
Reinitialize fifo cur_wr, cur_rd and gi2c->xfer for every transfer.
Add "MSM_GPI_QUP_FW_ERROR" event to callback event list. Dump GSI
registers in case of Channel RESET failure.

Change-Id: I243fb140d663fccd79676bdc6760702809fb4d68
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
Signed-off-by: Vipin Deep Kaur <vkaur@codeaurora.org>
2020-08-11 13:50:51 +05:30
Patrick Fay
2f71f657c3 Perf: core: create/delete shared kernel/user events
This is a squash of the following two commits taken from msm-4.14
1) commit <e629221afd65> ("Perf: core: create/delete shared
kernel events").
Frequently drivers want to monitor some event like L2 misses
and cycles+instructions. If more than 1 driver wants to monitor
the same event and the event attributes are the same then we
can create just one instance of the event and let drivers
share the event. Add shared event create and delete
routines.

2) commit <f0453c73e167> ("perf: Add support for user and
kernel event sharing").
The ARM PMU counters are limited in number. Even for counting
similar events, the PMU driver allocates a new counter. Hence,
counters configured to count similar events are shared. This
was only possible for the kernel clients, but not for user-space
clients. Hence, as an extension to this, the kernel and the
user-space are now able to share the similar events. The counters
can be shared between user-space only clients, kernel only clients,
and among user-space and kernel clients. The kernel and user's
attr->type (hardware/raw) and attr->config should be same for them to
share the same counter.

Additionally,
Current enablement of kernel event sharing is not GKI
compliant. Make the sharing of kernel events configurable
so it can be enabled only on non-GKI builds.

Add dependency for enablement of sharing of user events on
enablement of sharing of kernel events.

Change-Id: I784db5a20968ba7fca20659186f23890bf6cc503
Signed-off-by: Patrick Fay <pfay@codeaurora.org>
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
[kaushalk@codeaurora.org: Make event sharing configurable, add dependencies]
Signed-off-by: Kaushal Kumar <kaushalk@codeaurora.org>
2020-08-11 13:49:18 +05:30
Raghavendra Kakarla
0fed5bbcf5 soc: qcom: Add rpm master stats driver
Add rpm master stats driver to display various master
statistics.

Change-Id: Ied112bf77a1e7e2203b491bad0a068dcf724ec88
Signed-off-by: Raghavendra Kakarla <rkakarla@codeaurora.org>
2020-08-10 23:15:53 -07:00
Chandana Kishori Chiluveru
346e464ccf serial: msm_geni_serial: Fix DMA RX FSM reset sequence
Update the DMA RX FSM reset sequence as per HPG recommendations.

Currently driver calling msm_geni_serial_rx_fsm_rst() even in case of
RX inactive. RX FSM reset command generates RX_RESET_DONE bit. There
is a possible race between polling for RX_RESET and ISR for RX_RESET.
This can result into introducing delay during BT open.

Fix this by updating RX FSM reset sequence only in case of
cancel command timeout.

Change-Id: I90532aa72fdad462a616eded3e149bc6b721fe7b
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2020-08-11 10:59:15 +05:30
George Shen
ff0f255546 msm: cvp: Avoid releasing non-existent ARP
CVP firmware may crash if releasing non-existent ARP buffer.

Change-Id: Ia1d6a5d28c115a7ff22d68b698e0b3e560828c35
Signed-off-by: George Shen <sqiao@codeaurora.org>
2020-08-10 22:17:57 -07:00
Bhaumik Bhatt
f1227574a3 mhi: core: prioritize BHI error debug registers set dump
In some error scenarios, adequate information is not obtained
from the debug registers dump as by the time the table of
registers reaches BHI error registers, the link state has gone
bad. Prioritize those BHI error registers so that they come up
first in the list of registers to dump upon any error scenario.

Change-Id: I0488cf05a04fb974984f91fe9a67c8e12f8309c7
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-08-10 15:06:27 -07:00
Sriharsha Allenki
ee57532638 usb: dwc3: gadget: Prevent core from processing stale TRBs
With CPU re-ordering on write instructions, there might
be a chance that the HWO is set before the TRB is updated
with the new mapped buffer address.
And in the case where core is processing a list of TRBs
it is possible that it fetched the TRBs when the HWO is set
but before the buffer address is updated.
Prevent this by adding a memory barrier before the HWO
is updated to ensure that the core always process the
updated TRBs.

Change-Id: Idc008b2d4e37dd0c10c8ae40ab5af1ffd0775877
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
2020-08-10 12:53:53 -07:00
Jeya R
ca54890d78 adsprpc: Avoid race condition during map find and free
Protect remote heap buffer list with spin lock while freeing
to avoid UAF in fastrpc_mmap_find() on a buffer that is freed
in fastrpc_mmap_free().

Change-Id: Ic3d5219898fcf23fb813eabe5fc2f187b397a472
Acked-by: Chenna Kesava Raju <chennak@qti.qualcomm.com>
Signed-off-by: Jeya R <jeyr@codeaurora.org>
2020-08-10 22:49:01 +05:30
Blagovest Kolenichev
33a0fb78c7 Merge android11-5.4.57 (3f413d0) into msm-5.4
* refs/heads/tmp-3f413d0:
  Linux 5.4.57
  bpf: sockmap: Require attach_bpf_fd when detaching a program
  selftests: bpf: Fix detach from sockmap tests
  ext4: fix direct I/O read error
  arm64: Workaround circular dependency in pointer_auth.h
  random32: move the pseudo-random 32-bit definitions to prandom.h
  random32: remove net_rand_state from the latent entropy gcc plugin
  random: fix circular include dependency on arm64 after addition of percpu.h
  ARM: percpu.h: fix build error
  random32: update the net random state on interrupt and activity
  ANDROID: Update ABI xml
  UPSTREAM: of: property: Add device link support for pinctrl-0 through pinctrl-8
  UPSTREAM: of: property: Add device link support for multiple DT bindings
  UPSTREAM: of: property: Add device link support for extcon
  UPSTREAM: driver core: Change delimiter in devlink device's name to "--"
  UPSTREAM: driver core: Fix sleeping in invalid context during device link deletion
  BACKPORT: driver core: Add waiting_for_supplier sysfs file for devices
  UPSTREAM: driver core: Add state_synced sysfs file for devices that support it
  UPSTREAM: driver core: Expose device link details in sysfs
  UPSTREAM: driver core: Avoid deferred probe due to fw_devlink_pause/resume()
  UPSTREAM: driver core: Rename dev_links_info.defer_sync to defer_hook
  UPSTREAM: driver core: Don't do deferred probe in parallel with kernel_init thread
  UPSTREAM: arm64/module: Optimize module load time by optimizing PLT counting
  FROMGIT: scsi: block: pm: Simplify resume handling

Change-Id: Ide67c767b3a0f455ab5cec4b571ab599eae813d5
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2020-08-10 05:01:21 -07:00
Veerabhadrarao Badiganti
20f3b4c8bc mmc: sdhci-msm: Update DDR_CONFIG reg with HSR value if supplied
Update DDR_CONFIG register with HSR value if HSR value is supplied
in the device tree.

Change-Id: Ia811eaf48b4ef6af39dc882ac498bf88436e2f4b
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
2020-08-10 12:53:54 +05:30
Ritesh Harjani
200e0dd1f7 UPSTREAM: mmc: sdhci-msm: Don't enable PWRSAVE_DLL for certain sdhc hosts
SDHC core with new 14lpp and later tech DLL should not enable
PWRSAVE_DLL since such controller's internal gating cannot meet
following MCLK requirement:
When MCLK is gated OFF, it is not gated for less than 0.5us and MCLK
must be switched on for at-least 1us before DATA starts coming.

Adding support for this requirement.

Change-Id: I571c8fb40835e094d8feb4df5c2d049c02a0a2f2
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Reviewed-by: Can Guo <cang@codeaurora.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/1581077075-26011-1-git-send-email-vbadigan@codeaurora.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
2020-08-10 12:49:51 +05:30
Sarthak Garg
5827a3e53d mmc: sdhci-msm: skip eMMC slot probe if eMMC isn't a bootdevice
If eMMC is not a primary bootdevice, there isn't any point of probing
eMMC device hence disable the probing in such case.

Change-Id: I67a025606b03bb3cc21e818c2b4b519aa2b53888
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
2020-08-10 12:43:17 +05:30
Mukesh Ojha
6ac837c2ee drivers: soc: qcom: update sct table for LLCC on Shima
Update the LLCC SCT table for Shima for clients to request
slices from system cache.

Change-Id: Ia72539129e4b81f6807d97f5ac091636d67278d1
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
2020-08-09 23:01:28 -07:00
Prakash Gupta
c30d9d3326 defconfig: holi: enable recommended memory configs
Enable recommended memory and iommu configs

Change-Id: I52618ccc42e69650a5158b2dd171362f8ac56fed
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
2020-08-10 11:01:37 +05:30
Lingutla Chandrasekhar
60302c43a6 sched: rt: Add trace point for taskplacement
Add cpu util trace point in RT EAS task placement decisions to
help debug RT taskplacement issues.

Change-Id: Ib79484e1bef863a634507989fda577ca2f79020b
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2020-08-09 21:26:34 -07:00
Pavankumar Kondeti
e1459c8240 sched/walt: Improve the scheduler
This change is for general scheduler improvement.

Change-Id: I7da1c3cff4fb9470a3904407f180463c26315e68
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2020-08-10 08:28:42 +05:30
Raghavendra Kakarla
1bd04c6142 irqchip: mpm: Update the mpm to gic irq mapping
Update the mpm to gic irq mapping with valid mapping.

Change-Id: Icd92eb40dadd15c4f601bd3a976f6831ab1898af
Signed-off-by: Raghavendra Kakarla <rkakarla@codeaurora.org>
2020-08-09 13:55:15 +05:30
Raghavendra Kakarla
bc0ba3c898 irqchip: mpm: Forward the irq type for the mpm parent
This patch adds the logic to forward the irq type from
the mpm irq domain to its parent gic irq domain.

Change-Id: Id7c42ba59e0d003ffaa0a7951be4a2d3ffdb64a4
Signed-off-by: Raghavendra Kakarla <rkakarla@codeaurora.org>
2020-08-08 22:05:32 +05:30