Commit graph

874,680 commits

Author SHA1 Message Date
Jordan Crouse
cfa7f9cf2a msm: kgsl: Remove unneeded static inline functions
Over the years we have really abused inline functions in the driver code.
Remove a chunk of the "functions" that are single use or otherwise
just not worth it.

As a bonus, moving the functions around exposed a single use of some
adreno_reg registers in a3xx that we could get rid of that while we
are mucking about.

Change-Id: Ic0dedbad85df436cbd7e5746964200ee9f87e1a4
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2019-12-03 13:45:22 -07:00
Jordan Crouse
41b90d7bcd msm: kgsl: Remove a few unused device tree properties
Remove some unneeded device tree properties. qcom,id is not
used anywhere (and is always zero).  The label name is
redundant since the platform device already has a name.

The idle-timeout is 80 ms on all targets and the snapshot
size and high bank bit are GPU target specific and can be
moved to the GPU list instead.

Change-Id: Ic0dedbadb3848b844f4742c7417cfdf9bb4ca575
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2019-12-03 13:45:21 -07:00
Jordan Crouse
12d67a7dbe msm: kgsl: Make 'globals' a device level debugfs file
Make 'globals' a device level debugfs file so it can have access to the
 device node. The downside is that we need to move it one directory lower
to fit with the other device nodes but debugfs isn't ABI so that should be
a reasonable price to pay.

Change-Id: Ic0dedbada8c8920e6e9b3915529404040aafa38b
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2019-12-03 13:45:21 -07:00
Jordan Crouse
b0de8bff7d msm: kgsl: Move always on timer reads to target specific code
Instead of using adreno_readreg and a bunch of if statemnts, move the
always on timer functionality to the target specific code where it
belongs. This lets us do local variations without a bunch of hacks.

Change-Id: Ic0dedbad91b6a46f55c813f83360cb205bf5e357
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2019-12-03 13:45:20 -07:00
Jordan Crouse
ce6cda63ef msm: kgsl: Cleanup GPU regulators
We only ever have at most two regulators, and sometimes only one.
We don't need a complex set of lists and loops when only two pointers
will do.  Furthermore, explicitly forcing the regulators into the pwrctrl
struct helps ensure that they get enabled and disabled in the correct
order.

To assist, we add a new helper function called kgsl_regulator_disable_wait
that consolidates code in the driver used to wait for regulators to finish
disabling.

Change-Id: Ic0dedbad3aaa9c5d2f75dd33ee4e368eceb91d34
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2019-12-03 13:45:20 -07:00
Jordan Crouse
c1cc28e662 msm: kgsl: Make coresight optional
Make coresight support conditional on a new Kconfig option. Support this
by moving the code around a bit and out of the generic headers to make
possible to omit the coresight code when the support isn't available.

This allows us to omit coresight when CONFIG_CORESIGHT isn't enabled
and optionally to remove it at the KGSL level too.

Change-Id: Ic0dedbad2a55df4acf1b8c6e15e5b1b39f08a832
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2019-12-03 13:45:19 -07:00
Jordan Crouse
7a6368ee0b msm: kgsl: Add support for the Adreno GPU
First take a snapshot of the Adreno GPU (KGSL) driver from msm-4.19
commit 963db0f98552 ("msm: ipa4: add generic header processing context").

Then copy the msm_adreno_devfreq.h header from its previous location in
include/linux and the user API header from include/uapi/linux into the
driver directory. Both these files no longer need to be in the "generic"
headers.

Next do cleanups, lots of cleanups. Remove a bunch of extra features that
are from long departed targets or that have otherwise been replaced and
improved.

And finally cleanup kernel APIs that are no longer used, remove the
exported symbols from the GPU driver since nobody depends on us and do a
few other minor bits to put us on a track to being friendly with a modern
kernel.

Change-Id: Ic0dedbad5200dd9359a7b2fc06de415d755934e9
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2019-12-03 13:45:19 -07:00
qctecmdr
915d2b2efe Merge "defconfig: lahaina-gki: enable the fixed regulator driver" 2019-12-02 14:28:22 -08:00
qctecmdr
29300c2af3 Merge "clk: qcom: clk-dummy: convert into a platform driver" 2019-12-02 14:28:22 -08:00
qctecmdr
e8c591025a Merge "msm: ipa3: Fix to avoid buffer overread" 2019-12-02 13:54:14 -08:00
qctecmdr
bf271291a1 Merge "msm: adsprpc: Making adsprpc gki compliant" 2019-12-02 13:54:14 -08:00
qctecmdr
ebaf0ef66a Merge "serial: msm_geni_serial: Ensure to set clock freq correctly" 2019-12-02 13:54:14 -08:00
Michael Adisumarta
26958d2dfc msm: ipa3: Fix to avoid buffer overread
additional check to make sure there is no buffer overread.

Change-Id: I9bf66522f6a3da7c7185f387567d6773ae402b76
Acked-by: Suhas Mallesh <smallesh@qti.qualcomm.com>
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2019-12-02 00:11:25 -08:00
Prudhvi Yarlagadda
acf863100d serial: msm_geni_serial: Ensure to set clock freq correctly
This patch enables UART clock to run at half the rate and make
sure write to register gets executed with read back of the same
regiter.

Change-Id: Ic4087f6e246b112769335e883a35d8eb00412907
Signed-off-by: Prudhvi Yarlagadda <pyarlaga@codeaurora.org>
2019-12-02 12:20:54 +05:30
qctecmdr
564039bb6a Merge "msm: ipa: Enable IPA compilation for Lahaina" 2019-12-01 22:30:26 -08:00
qctecmdr
49a3ddbf02 Merge "serial: msm_geni_serial: Add missing changes from 4.19 kernel" 2019-12-01 22:30:24 -08:00
qctecmdr
f6a81fe3c6 Merge "i3c: i3c-master-qcom-geni: Add I3C GENI driver snapshot" 2019-12-01 22:30:24 -08:00
qctecmdr
ddbed2ec05 Merge "firmware: qcom_scm: Add trace points to scm driver" 2019-12-01 22:30:23 -08:00
qctecmdr
cd063a1b4e Merge "msm: cvp: Avoid CVP loading at boot" 2019-12-01 15:44:39 -08:00
qctecmdr
17f1121876 Merge "ANDROID: usb: gadget: configfs: Support multiple android instances" 2019-12-01 15:44:39 -08:00
qctecmdr
6c52778500 Merge "msm: cvp: Init reserved cdsp_mem" 2019-12-01 15:08:45 -08:00
qctecmdr
c65aae7a4f Merge "drivers: soc: qcom: Add snapshot of driver for FSA4480 I2C device" 2019-11-28 17:02:29 -08:00
qctecmdr
4ef89f019d Merge "iommu: dma-mapping-fast: fix iova alloc wrap" 2019-11-28 10:44:17 -08:00
Mukesh Kumar Savaliya
36dde6071c serial: msm_geni_serial: Add missing changes from 4.19 kernel
This change adds all missing changes on previous snapshot of
the base kernel 4.19.

Change-Id: Iaa5f338b97eb4a6194125a34119f4a089d92baa9
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
2019-11-28 20:12:19 +05:30
Ghanim Fodi
8d23c89067 msm: ipa: Enable IPA compilation for Lahaina
Enable the needed IPA modules for compilation.
Drivers will be modules on GKI config and static
on QGKI and debug configs..

Change-Id: Ibe44dc65f0f6751a2af1a4bcc1503d570d949f1b
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
2019-11-28 15:55:04 +02:00
qctecmdr
8852a1a921 Merge "msm: ipa: fix ipa driver compilation issue" 2019-11-28 04:13:48 -08:00
Phani Kumar Uppalapati
8aaaa4b44e drivers: soc: qcom: Add snapshot of driver for FSA4480 I2C device
This is a snapshot of driver support for FSA4480 I2C device as of
msm-4.19 commit '6037f6c5818ad4cab978a90ba45bd51aa73da497'(Add
driver for FSA4480 I2C device).

Change-Id: Iac392c82a72fe5de469fda094059ef7691772ca8
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-11-28 16:32:36 +08:00
Subramanian Ananthanarayanan
92cc729369 i3c: i3c-master-qcom-geni: Add I3C GENI driver snapshot
This is a snapshot of I3C GENI driver and associated files as of msm-4.19
'commit a61c76b51988 ("i3c: i3c-master-qcom-geni: Support for IBI wakeup
from system suspend")'.

Change-Id: I7f09cafbfc76dfe2c8d24d91b9ee2a5854ccc5ec
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
2019-11-27 21:49:00 -08:00
qctecmdr
6044626a0c Merge "ALSA: pcm: use lock to protect substream runtime resource" 2019-11-27 21:40:35 -08:00
qctecmdr
432a21064d Merge "drivers: pinctrl: msm: remove redundant call to set handler" 2019-11-27 21:40:35 -08:00
qctecmdr
fe977ee3ff Merge "i2c: i2c-msm-geni: Add support to make I2C driver GKI compliant" 2019-11-27 21:40:34 -08:00
qctecmdr
e462212940 Merge "kernel: Create and export kernel headers" 2019-11-27 21:40:34 -08:00
qctecmdr
8d5b8707e7 Merge "soc: qcom: spss_utils: fix emulation logic for lahaina rumi" 2019-11-27 21:40:34 -08:00
qctecmdr
b883676a71 Merge "arm64: defconfig: Enable aop-qmp clock driver for Lahaina" 2019-11-27 21:40:34 -08:00
qctecmdr
8393ad72c2 Merge "usb: dt-bindings: Add USB QMP PHY registers definition" 2019-11-27 20:56:37 -08:00
qctecmdr
7383281882 Merge "ALSA: compress: Memset timestamp structure to zero" 2019-11-27 20:56:36 -08:00
qctecmdr
946ef014cf Merge "Asoc: Add audio backend to hwdep interface" 2019-11-27 20:56:36 -08:00
qctecmdr
14d6a78d70 Merge "kconfig: add new config AUDIO_QGKI for audio" 2019-11-27 20:56:36 -08:00
qctecmdr
f45bb46943 Merge "ALSA: compress: Add APTX format support in ALSA" 2019-11-27 20:56:35 -08:00
qctecmdr
5ec3e080e9 Merge "usb: typec: ucsi: Optimise ucsi_unregister()" 2019-11-27 20:15:18 -08:00
qctecmdr
cace7512f5 Merge "usb: typec: Remove the callback members from struct typec_capability" 2019-11-27 19:26:20 -08:00
Elliot Berman
873f25f55f firmware: qcom_scm: Add trace points to scm driver
Adding traces to find the arguments passed to secure world
and the values returned.

Change-Id: I6a90f968a05873f0ecbd4a0cc8c85d704e1d64cf
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
2019-11-27 14:12:24 -08:00
Elliot Berman
1ffb5f3083 soc: qcom: Remove downstream scm driver
Remove downstream scm driver as it has been deprecated in favor of
firmware/qcom_scm.c.

Change-Id: Ie056baeca1e5e305c7c77b3cec086292e4bf3caf
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-11-27 14:03:42 -08:00
qctecmdr
3b25b50faf Merge "defconfig: Enable qcom_scm as a module" 2019-11-27 13:17:16 -08:00
qctecmdr
1ba0f31fdc Merge "drivers: irqchip: qcom-pdc: remove SPI config in SCM" 2019-11-27 12:23:25 -08:00
George Shen
eeda4c6bcb msm: cvp: Avoid CVP loading at boot
CVP firmware has not been released to Lahaina. Loading CVP
firmware caused stability problem during kernel boot. Disable
CVP firmware loading till it's ready.

Change-Id: Iefef7a42c2a8f2cc1c20a259491b0d96248f1aa1
Signed-off-by: George Shen <sqiao@codeaurora.org>
2019-11-27 11:39:43 -08:00
Ghanim Fodi
96f8fdcbe9 msm: ipa: fix ipa driver compilation issue
Fix compilation issue due to missing parentheses.

Change-Id: Iea33d2440a8fb7954d9b4ecc36e11bdd7f312f54
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
2019-11-27 07:38:23 -08:00
Prakash Gupta
eda5e26ad1 iommu: dma-mapping-fast: fix iova alloc wrap
In case of iova_alloc bitmap search wrap, we erroneously update the
previous_next_start as 0, this causes stale tlb logic not detect wrap and
stale TLB entry issues. Fix the same.

Change-Id: Ic8c96e98abc91520f222a7dbe5024814dabd5042
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2019-11-27 07:31:27 -08:00
Meng Wang
d15c33d652 ALSA: pcm: use lock to protect substream runtime resource
Use a spinlock to protect runtime resource in substream
against race conditions which may lead to use-after-free.

CRs-fixed: 2112713
Change-Id: I37dee68cad5eae05b21cfade3dabc0c2b79be6b8
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-11-27 14:56:21 +08:00
Meng Wang
4a7756137d ALSA: pcm: add locks for accessing runtime resource
Add spin lock to resolve race conditions while
accessing substream runtime resource.

CRs-fixed: 2112713
Change-Id: I8db743303ceb50205d62adfc02caf6ecab635d47
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-11-27 14:53:46 +08:00