Commit graph

884,148 commits

Author SHA1 Message Date
Mayank Rana
e8e963cf35 dwc3: gadget: Don't block doorbell before halting USB controller
HPG suggests to block ringing of doorbell towards IPA GSI channel
after sending end transfer command and halting USB controller.
Blocking ringing of doorbell before halting USB controller may
result into USB wrapper accessing IPA GSI doorbell register on
setting run/stop next composition switch.

Change-Id: Ie644f8a5afb06bc57cde596d527ffdaa5cf14d35
Signed-off-by: Mayank Rana <[email protected]>
2020-06-02 15:11:13 -07:00
Shashank Babu Chinta Venkata
b2e67efdbf haven: touch: add touch notify tag for memory sharing
Add touch tag to memory lend notification
framework to enable trusted touch usecase.

Change-Id: I71e30ac413728bb7bce9868b45996725824e1e02
Signed-off-by: Shashank Babu Chinta Venkata <[email protected]>
2020-06-02 08:19:13 -07:00
Shashank Babu Chinta Venkata
a163768151 haven: touch: add IRQ label for trusted touch
Add IRQ label for irq lend framework for enabling
trusted touch usecase.

Change-Id: I6bc3fa5aaa8fd3a348fe9cf9883997e0138ed638
Signed-off-by: Shashank Babu Chinta Venkata <[email protected]>
2020-06-02 08:18:16 -07:00
Raghavendra Kakarla
691718eeb0 drivers: soc: qcom: handle system sleep activities
When all the CPUs in the Apps processor subsystem
are powered off, the system may also reduce its
bandwidth and shared resource requirements.

The resource requests are sent through the SMD
from APSS subsystem. The sleep requests also need
to be written to the rpm to save power. This driver
handles the last few steps when entering system sleep.

When notified, the next wakeup timer value is written
to the MPM to be setup in the always-on domain timer.

Change-Id: Iab9e38d602d4f84e506471ec0864d2c6fb550b42
Signed-off-by: Raghavendra Kakarla <[email protected]>
2020-06-02 08:03:33 -07:00
Raghavendra Kakarla
5f6b8a2b36 drivers: irqchip: Add support to make mpm as module
To make the mpm driver as module driver, register the
mpm driver to platform bus driver and create the
both gic and gpio irq domains in its probe function.
Also add the support for mpm pin to gic irq number
translation to send irq info to its parent gic domain.

Also add the select and match function support to gpio
chip domain to differentiate it from gic interrupt domain.

Change-Id: I433f3a5b895d0ca074bae986ad5154892d7a31c4
Signed-off-by: Raghavendra Kakarla <[email protected]>
2020-06-02 08:03:23 -07:00
Raghavendra Kakarla
67371f6ddc drivers: irqchip: mpm: Add QTI SoC interrupt controller
Add the mpm as the wakeup capable interrupt controller.

Change-Id: Ibd437ecd4efe4db134a0a026404f9b3170685db5
Signed-off-by: Raghavendra Kakarla <[email protected]>
2020-06-02 08:03:11 -07:00
Raghavendra Kakarla
308c399692 defconfig: Enable RPM_SMD driver for Holi
Enable RPM-SMD driver to APSS-RPM communication.

Change-Id: I988a99a3ac3b5016808826fa945d996d18af2ce0
Signed-off-by: Raghavendra Kakarla <[email protected]>
2020-06-02 08:02:58 -07:00
Sharath Chandra Vurukala
b0549b997c config: Enable TOS and DSCP target support
Enable TOS and DSCP target support for Lahaina target

Change-Id: If6fedcf2fdac65c8b572872c74eea7f7b9c68962
Signed-off-by: Sharath Chandra Vurukala <[email protected]>
2020-06-02 18:33:04 +05:30
Yuanfang Zhang
7867be23f0 soc: qcom: dcc: avoid memory access violation
When *ppos + len is overflow, shrink len to max readable size
of SRAM.

Change-Id: I7c35433d384eb596a3f84b7ce13652f58166b40a
Signed-off-by: Yuanfang Zhang <[email protected]>
2020-06-02 02:05:14 -07:00
Abir Ghosh
896b76e681 qbt: Add support for touch events from input framework
Add changes to get touch events from input framework
and perform AoI and radius filtering. AoI info is passed
by userspace  using ioctl.

Change-Id: Iabedc175d06f123d540d64806cbfb2ce31c3acfe
Signed-off-by: Abir Ghosh <[email protected]>
2020-06-02 11:06:48 +05:30
himta ram
ebee7a4691 radio: RTC6226: remove the V4L2_CAP_DEVICE_CAPS cap as device_caps
V4l2 framewrok warn that Drivers must not change device_caps.
There is a device cap mismatch when querying device capabilities
for rtc6226 driver compared to cap filled at probe time.
Remove the V4L2_CAP_DEVICE_CAPS cap as device_caps during rtc6226
driver probe.

CRs-Fixed: 2691794
Change-Id: Ice3c0cbbf583762a500647f4a54f68f92d6586bb
Signed-off-by: himta ram <[email protected]>
2020-06-01 21:56:21 -07:00
Naveen Yadav
7a0971c78d cpufreq: qcom: Set the register for GT Limits Management interrupt
Set the GT_IRQ_CLR bit of EPSS_INTR_CLEAR register to generate the EPSS
hardware GT interrupt when LMH throttle occurs.

Change-Id: I1ba6faf1a28f2d8d06c8d91f3046bb064263cb67
Signed-off-by: Naveen Yadav <[email protected]>
2020-06-02 09:21:07 +05:30
Prakruthi Deepak Heragu
64e68fd529 aarch64: ABI: Update abi snapshot for enabling CFI in enforcement mode
Update the ABI snapshot as well as the whitelist when CFI_PERMISSIVE
flag is turned off to put CFI in enforcing mode.

Change-Id: If5fcff638231ae5bc081ea018134edde804b6c78
Signed-off-by: Prakruthi Deepak Heragu <[email protected]>
2020-06-01 17:21:29 -07:00
Himateja Reddy
674eb6f800 msm: adsprpc: use persistent header buffers
Add IOCTL support for userspace to request kernel to enable
optimizations to reduce RPC overhead. This change specifically
enables the use of persistent header buffers, allocated during
process setup time and mapped on DSP in one call. Try using
persistent headers for RPC calls and fall back to allocating a new
buffer if all buffers are in use already.

Change-Id: If106679947adfaabb08055f3ad909711bc891656
Acked-by: Thyagarajan Venkatanarayanan <[email protected]>
Signed-off-by: Himateja Reddy <[email protected]>
2020-06-01 16:10:29 -07:00
George Shen
d2241c8215 msm: cvp: Support new HFI FLUSH MSG value
Change is to support both deprecated FLUSH MSG value and new
value in kernel before new HFI FLUSH MSG value released.

Change-Id: I376bb58f6f9625e692a814836f276c9c98c164d4
Signed-off-by: George Shen <[email protected]>
2020-06-01 15:33:31 -07:00
Harshdeep Dhatt
f44d1a49b9 msm: kgsl: Fix gpu boot ab vote
The ab is in megabytes and ddr_table is in kilobytes. So do
the conversion to fix the first ab vote out of slumber.

Also fix the ib vote units for the very first gmu boot.

Change-Id: I57efd80fa2de8262842475e02a363e0436a7b0f2
Signed-off-by: Harshdeep Dhatt <[email protected]>
2020-06-01 15:37:54 -06:00
Raghavendra Rao Ananta
dbc45f4c7c tty: hvc_console, fix crashes on parallel open/close
hvc_open sets tty->driver_data to NULL when open fails at some point.
Typically, the failure happens in hp->ops->notifier_add(). If there is
a racing process which tries to open such mangled tty, which was not
closed yet, the process will crash in hvc_open as tty->driver_data is
NULL.

All this happens because close wants to know whether open failed or not.
But ->open should not NULL this and other tty fields for ->close to be
happy. ->open should call tty_port_set_initialized(true) and close
should check by tty_port_initialized() instead. So do this properly in
this driver.

So this patch removes these from ->open:
* tty_port_tty_set(&hp->port, NULL). This happens on last close.
* tty->driver_data = NULL. Dtto.
* tty_port_put(&hp->port). This happens in shutdown and until now, this
  must have been causing a reference underflow, if I am not missing
  something.

Change-Id: Ie67e9bc9038a282a22f7a7baf7a4588549416725
Signed-off-by: Jiri Slaby <[email protected]>
Cc: stable <[email protected]>
Reported-and-tested-by: Raghavendra <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Git-commit: 24eb2377f977fe06d84fca558f891f95bc28a449
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Signed-off-by: Raghavendra Rao Ananta <[email protected]>
2020-06-01 11:29:58 -07:00
Mohammed Nayeem Ur Rahman
8a580a4265 msm: adsprpc: Fix error code for invalid ioctl
Change error code returned to ENOTTY for invalid ioctl. Also,
limit the number of debug messages printed for non ion buffers
based on size.

Change-Id: Iabbb7a2482b4b5d00a039e90fe7636eba5ca0447
Acked-by: Deepika Singh <[email protected]>
Signed-off-by: Mohammed Nayeem Ur Rahman <[email protected]>
2020-06-01 16:59:13 +05:30
Hu Wang
0ba1177569 defconfig: lahaina: Enable linux bridge
Enable linux bridge on QGKI builds to support multi-AP bridge mode.

Change-Id: Idd424e41544766e9c30293dd58ad7954988f05a9
Signed-off-by: Hu Wang <[email protected]>
Signed-off-by: Liangwei Dong <[email protected]>
2020-06-01 15:54:46 +08:00
Pratham Pratap
51f6ca5f35 Revert "usb: dwc3: gadget: Enable SUSPEND event after CONNECT DONE"
This reverts commit 74cc257a62210a7fc69cd095ecd48a364621bb7a.

Instead, enable the SUSPEND event interrupt on enable_irq as part
of gadget start to be inline with USB specification.

Change-Id: I4c2d6e48a2276b480e112ee203a18a6865f15408
Signed-off-by: Pratham Pratap <[email protected]>
2020-05-31 23:13:44 -07:00
qctecmdr
bf4eaa44f7 Merge "regulator: core: avoid deadlock in QTI addition to regulator_unregister()" 2020-05-31 02:33:19 -07:00
qctecmdr
10cbadfc18 Merge "net: qrtr: Allocate workqueue before kernel_bind" 2020-05-31 02:33:18 -07:00
qctecmdr
325fc4d843 Merge "memory_dump: resolve the issue of configuring core_reg_numer" 2020-05-31 02:33:18 -07:00
qctecmdr
51b9ea9e84 Merge "mhi: core: Enable both time synchronization methods to co-exist" 2020-05-31 02:33:18 -07:00
qctecmdr
b7180d867f Merge "soc: qcom: spcom: add channel name for each txn_id print" 2020-05-31 02:33:17 -07:00
qctecmdr
9d0c2bcade Merge "msm: cvp: stop session queue when session closed" 2020-05-31 02:33:16 -07:00
qctecmdr
24999171d7 Merge "arm64: defconfig: Enable config to add QTI specific code" 2020-05-31 02:33:16 -07:00
qctecmdr
57e93d279c Merge "arm64: defconfig: Disable CONFIG_CFI_PERMISSIVE flag" 2020-05-31 02:33:16 -07:00
qctecmdr
af2d4f76fd Merge "pwm: qti-lpg: Read tick duration via device tree" 2020-05-30 04:42:14 -07:00
qctecmdr
9ee4a9e6ec Merge "PM / devfreq: icc: add support for L3 BW devices" 2020-05-30 04:42:14 -07:00
qctecmdr
af28a1662f Merge "clk: qcom: clk-alpha-pll: Add support for Lucid EVO PLL print registers" 2020-05-30 04:42:13 -07:00
Vivek Aknurwar
fb03af1d58 clk: qcom: clk-rcg2: Fix possible dereference of clk parent for dfs clocks
Fix possible dereference of clk parent while populating dfs clocks.

Change-Id: I797c499fe3ab57effb16c65f89365da9e5279995
Signed-off-by: Vivek Aknurwar <[email protected]>
2020-05-30 00:03:23 -07:00
Vipin Deep Kaur
398ff36a86 i2c: i2c-msm-geni: Do I2C configurations during resume
Do I2C frequency related configurations during resume.
Don't make the current message as NULL before the whole
transfer process is complete.

Change-Id: I8c4797fed1cfa0743c98eea3324e4b7b82d7f3cb
Signed-off-by: Vipin Deep Kaur <[email protected]>
2020-05-29 23:55:09 -07:00
Vivek Aknurwar
bc47796178 clk: qcom: clk-debug: Fix possible NULL dereference in _mux_get_parent
Fix possible NULL dereference in retrieving clk parent name.

Change-Id: Ic4dbc6632f00365ea127042c0f3bd9b66a243ec6
Signed-off-by: Vivek Aknurwar <[email protected]>
2020-05-29 18:14:38 -07:00
Vivek Aknurwar
2c30b06474 clk: qcom: gdsc-regulator: Fix using uninitialized variable
Fix printing stale regval value in case of votable gdsc and if driver
observes error is gdsc polling.

Change-Id: I20c6e28fa8ed9ca5eea9f2a4c57b22c424ee262a
Signed-off-by: Vivek Aknurwar <[email protected]>
2020-05-29 18:10:11 -07:00
Rajesh Kemisetti
8c7cf67d61 msm: kgsl: Add GPU_RBBM_GBIF_CLIENT_QOS_CNTL to powerup register list
GPU_RBBM_GBIF_CLIENT_QOS_CNTL register is getting updated for
every wake up sequence but not retained across IFPC.

Add this register to GPU specific powerup register list so as to
restore its value across IFPC.

Change-Id: I3fe15ad43af1f0f1adc49764e749bb89e4cf8a65
Signed-off-by: Rajesh Kemisetti <[email protected]>
Signed-off-by: Raghu Ananya Arabolu <[email protected]>
2020-05-29 16:14:40 -07:00
Yue Ma
fd13c5203a cnss2: Save PCIe GEN speed and width changed from device
WLAN device may adjust GEN speed and width at run time so save them
accordingly from driver.

Change-Id: I4b20909425c4606b3ee5995946c97542b9849a54
Signed-off-by: Yue Ma <[email protected]>
2020-05-29 14:50:27 -07:00
Manikandan Mohan
7ed72aef1a cnss2: Add support for bus bandwidth scale
Register MHI bus bandwidth scale callback function.

Change-Id: I0829db892545565c1d59898a988ed9f0da5d1470
Signed-off-by: Manikandan Mohan <[email protected]>
2020-05-29 14:38:17 -07:00
Raghu Ananya Arabolu
859471278e msm: kgsl: Do not program CP_LPAC_ROQ_THRESHOLDS registers
CP ucode (v0.76 onwards) handles the programming of these registers.

Change-Id: I233458160ea1f7ef55db49d751b9a50f84820a68
Signed-off-by: Raghu Ananya Arabolu <[email protected]>
2020-05-29 13:44:55 -07:00
Isaac J. Manjarres
4375fddf0b soc: qcom: mem-buf: Fix compilation errors when hotplug is disabled
The mem-buf driver cannot compile when the memory hotplug
configurations are disabled. In certain environments, mem-buf
does not require memory hotplug functionality (i.e. when the mem-buf
driver acts as a supplier), so stub out the memory-hotplug calls
if memory hotplug is not enabled.

Change-Id: Id1305358c84a0c4cd19cb539254bb6c4f8b2fb90
Signed-off-by: Isaac J. Manjarres <[email protected]>
2020-05-29 12:56:41 -07:00
Guru Das Srinagesh
fe41af3d8f pwm: qti-lpg: Read tick duration via device tree
Tick duration defines the tick duration (in microseconds) for the clock
that PPG uses which is used to program the ramp step duration for the
pattern. If unspecified, the default value is 7800 us.

Change-Id: I7cd96d74a39becffbf9a008610c0092ad2462446
Signed-off-by: Guru Das Srinagesh <[email protected]>
2020-05-29 12:17:20 -07:00
Bhaumik Bhatt
6ea0bdda25 mhi: core: expose soc reset and register dump debugfs entries
For debug purposes, allow clients to issue SOC reset or read the entire
register dump when they wish to do so. They may not read proper values
or the reset may not take effect if the device is powered down.

Change-Id: I7fb7589a1bdfd5d7c610bdf6aab5edfc814cdceb
Signed-off-by: Bhaumik Bhatt <[email protected]>
2020-05-29 11:08:52 -07:00
Jeevan Shriram
6add15d8b6 scripts: gki: Add generic configuration options for defconfig
Add config fragment options to generate target specific defconfig
during compile time from multiple QCOM configuration options.

Change-Id: I5c1818a0658b781d0f0c7fae9378a9c573d5dd69
Signed-off-by: Jeevan Shriram <[email protected]>
2020-05-29 10:01:48 -06:00
Vijayanand Jitta
a489916458 ion: Use kthread_run for ion heap pool kworker threads
Ion heap pools are refilled by kworker threads when pool
count reaches low mark, these threads are created using
kthread_create, as a result these threads will remain in
TASK_UNINTERRUPTIBLE state until they are woken up i.e; till
low mark is reached. This can result in false hung task reports.
So, fix this by replacing kthread_create with kthread_run so
that these threads get woken up just after they are created.

Change-Id: I3f96387c8a1707e917cbdc2d74b0a64ca6c6cb2f
Signed-off-by: Vijayanand Jitta <[email protected]>
2020-05-29 15:11:16 +05:30
Amir Vajid
7e0c383b72 PM / devfreq: icc: add support for L3 BW devices
Add support for L3 bandwidth devices that vote in units
of MBPS. This includes creating OPP tables in units of
MBPS as well as requiring that these devices define a
width in DT which is used to convert the votes to Hz
before submitting them to the L3 provider.

Change-Id: I47a569f76b9e57caac57788592784921c689505b
Signed-off-by: Amir Vajid <[email protected]>
2020-05-28 21:27:20 -07:00
Jagadeesh Kona
8d5131dd7a arm64: defconfig: Add support for Global clock controller for SHIMA
Enable Global clock controller for SHIMA.

Change-Id: Ia21fd413f238336d889bdb11d8fa39f27694bae2
Signed-off-by: Jagadeesh Kona <[email protected]>
2020-05-29 09:54:50 +05:30
Mayank Rana
7e7b7790b1 dwc3-msm: Force USB speed as high speed if SS release lane is called
DP driver shall call SS release lane API asynchronously when USB is into
device mode or host mode or not yet started. This is possible as ADSP
firmware notification over UCSI may be delayed and can be running in
parallel with altmode functionality. Hence force maximum speed as USB
high speed if SS release lane API is called until next USB able disconnect.

Change-Id: Iaae8b4e39ec8695e0204b83d9292cd3efa4af310
Signed-off-by: Mayank Rana <[email protected]>
2020-05-28 19:56:17 -07:00
Yuanfang Zhang
376a008159 memory_dump: resolve the issue of configuring core_reg_numer
When the new core_reg_number value is the same as previous value,
writing to core_reg_number node cannot exit normally, this
change resolve this issue.

Change-Id: I6cbb301fc77a630aa9f01a68341c9510fdbd5c0f
Signed-off-by: Yuanfang Zhang <[email protected]>
2020-05-29 10:26:35 +08:00
Bhaumik Bhatt
48dcddd380 mhi: core: Do a null pointer check before reading debug registers
Not all registers can be set while dumping debug registers depending
on the state of the device. For example, wake doorbell is not set
until a READY state of the device is reached. Hence, we could access
a NULL pointer while dumping debug registers. Avoid this by adding a
check to skip the addresses which are not yet set.

Change-Id: Iccf275705d87023613ad3ab0c2ab53bad7ab912a
Signed-off-by: Bhaumik Bhatt <[email protected]>
2020-05-28 17:05:15 -07:00
David Collins
29c128cfd2 regulator: core: avoid deadlock in QTI addition to regulator_unregister()
regulator_unregister() calls rdev_free_qti_debugfs() with the
regulator_list_mutex held.  rdev_free_qti_debugfs() then calls
regulator_put() which attempts to lock regulator_list_mutex again.
This leads to deadlock.

Modify regulator_unregister() and rdev_free_qti_debugfs() so that
mutex deadlock cannot occur.

Change-Id: I12bb4c704f7d9332e790c707aba854e224474bdb
Signed-off-by: David Collins <[email protected]>
2020-05-28 17:02:13 -07:00