Commit graph

892,914 commits

Author SHA1 Message Date
qctecmdr
185f5e9c52 Merge "defconfig: Disable USB_CONFIGFS_RNDIS for Lahaina/Holi QGKI" 2020-09-19 20:35:22 -07:00
qctecmdr
29a9d28c82 Merge "FROMGIT: mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary" 2020-09-19 17:55:21 -07:00
qctecmdr
5f6aa13587 Merge "iio: adc: Add support to read parallel charger current channel" 2020-09-19 15:11:25 -07:00
qctecmdr
32113d11a3 Merge "i2c-msm-geni: Register suspend_late instead of suspend_noirq" 2020-09-19 09:09:16 -07:00
qctecmdr
d09483fe6c Merge "soc: qcom: spss_utils: IAR 3rd party uefi app" 2020-09-19 09:09:16 -07:00
qctecmdr
9d79203950 Merge "defconfig: Enable Synaptics DSX Touch for holi target" 2020-09-19 09:09:15 -07:00
qctecmdr
8ccd500ed6 Merge "input: qpnp-power-on: Fix the argument data-type for regmap_bulk_read" 2020-09-19 09:09:15 -07:00
qctecmdr
5636c8bedc Merge "msm: kgsl: Add IOMMU clocks for SA8155" 2020-09-19 09:09:14 -07:00
qctecmdr
8c0cae110c Merge "mhi: core: Add checks for bhie offsets" 2020-09-19 09:09:14 -07:00
qctecmdr
a2998ad434 Merge "dt-bindings: clock: Add support for APSS clock ids for SDXLEMUR" 2020-09-19 09:09:14 -07:00
Vivek Pernamitta
e80749a2a5 mhi: core: Add checks for bhie offsets
Return immediately if device returns an invalid BHIE offsets.

Change-Id: I2fd8fe73e47b28b1b212284c02e5c9c857805461
Signed-off-by: Vivek Pernamitta <vpernami@codeaurora.org>
2020-09-19 01:29:32 -07:00
Guru Das Srinagesh
635d29685d leds: qti-flash: Enable zero brightness symmetry distribution
Currently, when a single channel's brightness is set, and then cleared
to zero subsequently, the LED stays on instead of getting turned off
because symmetrical brightness distribution logic does not allow the
paired channel's brightness to be set to zero. Fix this.

It was also observed that the brightness of a channel that is getting
turned off doesn't show up as zero, so fix that as well.

In addition, strengthen error-checking of the "qcom,led-mask" device
tree property.

Change-Id: I245ec2177b2ebe0f567eb96397dd13a05a587d60
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
2020-09-18 18:20:00 -07:00
Manikandan Mohan
d14fbadbf7 cnss2: Initialize params for error path
Update driver to initialize and do null checks for variables in
error path.

Change-Id: I4b012d856decd02dcc3e82d13213ddd529838e98
Signed-off-by: Manikandan Mohan <manikand@codeaurora.org>
2020-09-18 13:05:49 -07:00
Naveen Yadav
8d0cb02471 dt-bindings: clock: Add support for APSS clock ids for SDXLEMUR
Add clock IDs for APSSCC clients to be able to request for clocks
from these clock controllers.

Change-Id: I284beb3b62a4f5c4521c7e7e0f9d068c469a85bb
Signed-off-by: Naveen Yadav <naveenky@codeaurora.org>
2020-09-18 19:28:07 +05:30
Amir Samuelov
f19ffc2867 soc: qcom: spss_utils: IAR 3rd party uefi app
Set saved cmac on ioctl from user space.
Write saved cmac to shared memory on SSR.
Read calculated cmac from shared memory.
Provide calculated cmac to user space via sysfs.
Cleanup unused IAR-STATE fuses.
Cleanup unused IAR-FEATURE-ENABLED fuse.
Read actual PIL area size from register.
pbl_cmac_show() returns binary rather than string.
Change IOCTL to use variable-size-array.

Change-Id: Ic4ea38685f6b9d1100a28bd958e44f513373fea9
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2020-09-18 04:46:02 -07:00
Neeraj Upadhyay
047ca2390b soc: qcom: Add a die notifier for qcom watchdog
To give sufficient time to die notifier to complete
their work, add a watchdog die notifier, to reset the
watchdog. Also, increase priority of watchdog panic
notifier and make minidump oops notifiers run after
watchdog oops notifiers.

Change-Id: Ifc53cc5c3b1ecc1554a971b9f2334319cad62bfd
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2020-09-18 12:23:57 +05:30
Lin Bai
c6650e17df cnss2: Collect shadow registers for RDDM scenario
Current implementation only collect shadow register when host
force triggered RDDM.
Extend it to any RDDM scenario.

Change-Id: I8a14950b9b4cd42df016ecbb2eac6dc7d8ae115c
Signed-off-by: Lin Bai <lbai@codeaurora.org>
2020-09-18 14:36:08 +08:00
Wyes Karny
aa47f77ad6 dt-bindings: msm: Add bindings for MP limit fuse support
Define CPAS MP limit feature ids. This feature
information used for some target SKUs to check the particular
ISP HW is capable of how much max resolution during the probe time.
Define feature type disable, enable or value. Some features are enable
type, if bit is set in the fuse register means feature is enabled.
Some features are disabled type,  if bit is set in the fuse
register means feature is disabled. Some feature are value type, here
multiple bit together make a value which indicates some feature.

Change-Id: I5a10eee2e42cbc26312968b02bb0f154f2684cb7
Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
2020-09-18 11:48:22 +05:30
Neeraja P
9c75620b1e msm: kgsl: Fix DMA API warning while dma_buf_map_attachment()
The dma_get_max_seg_size() returns a default value of 64k when dma_parms
are not allocated. When CONFIG_DMA_API_DEBUG_SG is enabled and the
requested size is more 64k, it triggers a warning as below.

[   25.468427] c6    754 kgsl kgsl-3d0: DMA-API: mapping sg segment longer than device claims to support [len=2097152] [max=65536]
[   25.480236] c6    754 WARNING: CPU: 6 PID: 754 at kernel/dma/debug.c:1302
[   25.497971] c6    754 Kernel panic - not syncing: panic_on_warn set ...
[   25.714532] c6    754 Call trace:
[   25.717938] c6    754  dump_backtrace+0x0/0x200
[   25.722598] c6    754  dump_stack+0xb8/0xf0
[   25.726897] c6    754  panic+0x160/0x44c
[   25.730934] c6    754  trace_raw_output_cpuhp_multi_enter+0x0/0xf4
[   25.737284] c6    754  report_bug+0x114/0x1b8
[   25.741756] c6    754  bug_handler+0x28/0xa0
[   25.746146] c6    754  brk_handler+0xac/0x1d0
[   25.750622] c6    754  do_debug_exception+0x88/0x188
[   25.755722] c6    754  el1_dbg+0x18/0xa8
[   25.759757] c6    754  debug_dma_map_sg+0x1e4/0x694
[   25.764768] c6    754  ion_map_dma_buf+0x318/0x428
[   25.769693] c6    754  dma_buf_map_attachment+0x68/0xbc
[   25.775063] c6    754  kgsl_setup_dma_buf+0xec/0x3b0
[   25.780160] c6    754  kgsl_ioctl_gpuobj_import+0x498/0x914
[   25.785879] c6    754  kgsl_ioctl_helper+0x11c/0x14c
[   25.790983] c6    754  kgsl_ioctl+0x30/0xa8
[   25.795283] c6    754  do_vfs_ioctl+0x66c/0xa14
[   25.799941] c6    754  __arm64_sys_ioctl+0x7c/0xb0
[   25.804865] c6    754  el0_svc_common+0x98/0x1d8
[   25.809609] c6    754  el0_svc_handler+0x5c/0x64
[   25.813205] c5      1 F2FS-fs (sda19): Start checkpoint disabled!
[   25.814359] c6    754  el0_svc+0x8/0xc

This warning can be fixed by allocating the dma_parms and setting the
max_segment_size.

Change-Id: I721858eadbe3588b4f5be0a0a73c428869c8e5de
Signed-off-by: Harshitha Sai Neelati <hsaine@codeaurora.org>
Signed-off-by: Neeraja P <neerp@codeaurora.org>
2020-09-18 11:42:18 +05:30
Linyu Yuan
49edb9f93d usb: misc: nb7vpq904m: remove register read operation
each register contain one parameter,
there is no need to read register before write,
it can improve time when change a mode.

Change-Id: Ifc9e7fd1f9bf9c6a048308dcc0cc2a476d1fc2d4
Signed-off-by: Linyu Yuan <linyyuan@codeaurora.org>
2020-09-18 12:18:18 +08:00
Hui Li
9cdeebd042 msm: kgsl: Add IOMMU clocks for SA8155
To support SA8155, we need the following clocks:
GCC_GPU_CFG_AHB_CLK, GCC_DDRSS_GPU_AXI_CLK.

Change-Id: Ie2b4ec643136c11c1fa679a12f20b72ced3a6263
Signed-off-by: Hui Li <hul@codeaurora.org>
2020-09-17 21:09:13 -07:00
Kiran Gunda
653826192f power: supply: qti_battery_charger: Handle probe failure gracefully
Due to a race condition between the probe and glink message
callback, it is observed that the glink messages/notifications
can be handled even after the probe failure which leads to
an invalid memory access. Fix it by introducing "initialized"
flag. While at it, add few error logs to identify the exact
message failures.

Change-Id: I18e61dea734efde6a11ee072793da8eead269b12
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2020-09-17 20:31:43 -07:00
Linyu Yuan
f03977713e usb: misc: nb7vpq904m: disable chip during probe
currently when power up with no usb cable, chip only disable
when system enter suspend state, disable chip during probe
will consume lower power early.
another fix is no need to disable chip again for suspend operation.

Change-Id: I182b8d96c45c0225fed2be6b35c0aba488c0589f
Signed-off-by: Linyu Yuan <linyyuan@codeaurora.org>
2020-09-18 11:17:53 +08:00
Yue Ma
0bb0ef6ed8 cnss2: Avoid dereferencing pointer before NULL check
Only dereference pci_priv pointer after NULL check.

Change-Id: I773cb4ae07599b737391ced3e67e4b1ad177b4f1
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2020-09-17 18:29:48 -07:00
Guru Das Srinagesh
568fc7ac9b leds: qti-flash: Handle all-enabled led mask separately
In certain devices, LED channels are paired and connected to two
separate LEDs. Due to symmetrical configuration, a switch that controls
all four channels sets the same brightness value to both LEDs, which is
not the intended behaviour; hence, handle this case separately.

E.g. If flash0 (group 1) is set to 144 and flash1 (group 2) is set to
1056, current will be distributed evenly to all 4 channels like so: 300
mA would be set on all channels (as 144 + 1056 = 1200; 1200 / 4 = 300).

Change this to:
144 / 2 = 72 on channels 0 and 3   (group 1)
1056 / 2 = 528 on channels 1 and 2 (group 2).

Change-Id: Ie135811d59104cfa5551d17ebbb729a57c101099
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
2020-09-17 16:55:05 -07:00
Sushmita Susheelendra
b912747ec7 msm: kgsl: Add support for GMU log streaming
The GMU streams events to the host by sending an HFI message
on the f2h debug queue. These messages will be processed by
by the f2h daemon. The HFI interrupt handler will add these
packets to a secondary list, not the primary list into which
the more time critical TS_RETIRE and other messages go.
The f2h daemon first processes packets on the main list
and then the ones on the secondary list to avoid delaying
the time critical packets. It then reads the events from the
GMU log in memory and writes them out to ftrace.

Change-Id: I3f6cc13f39c2a60d24f2b92c4a97bacef8036f85
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2020-09-17 17:44:51 -06:00
Sushmita Susheelendra
4381c3443b msm: kgsl: Fix message handling in hwsched hfi interrupt handler
Do not process HFI messages on the message queue in the interrupt
handler before interrupts are enabled on that queue. Otherwise, the
interrupt handler will read it off the queue, and then the inline
handler will not find any messages on the queue.

Change-Id: I569f29250c27a1a74e206489ad8234b2be39d448
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2020-09-17 17:44:51 -06:00
Sushmita Susheelendra
88cb36d31e msm: kgsl: Add a sync event to map GMU events to ftrace timeline
GMU events will be streamed to the host if GMU log streaming is
enabled. Being able to view GMU events on the same timeline
as GPU and host events is helpful for profiling. Add a sync event
to map GMU AO counter ticks to the ftrace timeline just before
bringing the GMU out of reset.

Change-Id: I7e2696f4d0d8666a2fcdfccb358619277e5949b8
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2020-09-17 17:44:29 -06:00
Subbaraman Narayanamurthy
432afa81df power: supply: qti_battery_charger: add support for wireless FW CRC check
Currently, wireless FW update is done by the user once a FW file
is pushed to one of the firmware folders and with user writing
to "wireless_fw_update" or "wireless_fw_force_update" under
/sys/class/qcom-battery.

As per the recent requirements to add CRC check during wireless
firmware update process, add "wireless_fw_crc" property through
which the user can pass CRC before doing FW update. Since this
adds extra time for validating the CRC, increase the wait time
for FW update completion from 500 ms to 1 second. Also, print an
error log if FW update is not done.

E.g.

echo 0x1234 > /sys/class/qcom-battery/wireless_fw_crc
echo 1 > /sys/class/qcom-battery/wireless_fw_update

Now with adding this support, if CRC is not set, FW update would
fail as the charger firmware validates the CRC passed.

Change-Id: Id66cd84984b6206bf866ee1f18f7b32d9090c5dd
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2020-09-17 16:08:55 -07:00
Subbaraman Narayanamurthy
35d006a926 power: supply: qti_battery_charger: Configure ICL and FCC post SSR/PDR
When the remote subsystem restarts (SSR) or the charger firmware
restarts (PDR), resend the ICL/FCC votes from clients like USB
driver, thermal SW once the subsystem is up.

Change-Id: Ia0da3747fdb98c7873b65c948b76f6b6a286e31c
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2020-09-17 15:26:54 -07:00
qctecmdr
ae23001f63 Merge "iio: qcom-spmi-adc5: add support to read current channels" 2020-09-17 15:21:27 -07:00
qctecmdr
82d3128cd5 Merge "arm64: smp: Undo flushing of caches from local_cpu_stop" 2020-09-17 15:21:27 -07:00
qctecmdr
1059cd9eac Merge "thermal: qcom-spmi-temp-alarm: align temp readings with over-temp stage" 2020-09-17 15:21:26 -07:00
qctecmdr
02a5c488da Merge "soc: qcom: hwkm: clear previous command errors correctly" 2020-09-17 15:21:26 -07:00
qctecmdr
7c7105f9f7 Merge "iommu: arm-smmu: update access to SMMU TCU testbus registers with scm call" 2020-09-17 15:21:26 -07:00
qctecmdr
b8e9c3491e Merge "memshare: Correct the usage of index and client_id" 2020-09-17 15:21:26 -07:00
qctecmdr
3a9d08b148 Merge "coresight: tmc-etf: Set reading status to False" 2020-09-17 15:21:25 -07:00
Guru Das Srinagesh
2828f76706 dt-bindings: iio: Add PMX65 PMIC7 ADC support
PMX65 belongs to the PMIC7 family of chips that makes use of PMK8350 to
read ADC data from their onboard channels.

Change-Id: Id0c51bc6c69568d6ea67e5067c8c81ebf6719b63
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
2020-09-17 14:07:49 -07:00
Jack Pham
bb0471d047 defconfig: Disable USB_CONFIGFS_RNDIS for Lahaina/Holi QGKI
USB_CONFIGFS_RNDIS is currently enabled by gki_defconfig.
Although the upstream F_RNDIS driver can coexist with the USB
GSI driver, currently there is a conflict in userspace that can
result in choosing the wrong one. Disable the SW-only F_RNDIS
driver to allow the GSI driver to be enabled exclusively.

Change-Id: I272b632dda1e792931102f94554cd26065389b34
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2020-09-17 13:56:33 -07:00
Subbaraman Narayanamurthy
289331ecbc defconfig: lahaina: remove CONFIG_LEDS_CLASS_FLASH & CONFIG_LEDS_TRIGGER_TIMER
Now that CONFIG_LEDS_CLASS_FLASH and CONFIG_LEDS_TRIGGER_TIMER
are enabled in gki_defconfig, remove them from lahaina_GKI.config
so that those modules gets updates from ACK.

Change-Id: Ie913c96eac0453b386fcee1d8a167da6da233e1c
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2020-09-17 13:44:45 -07:00
Rishabh Bhatnagar
109ba98649 arch: arm: Handle quirk structure after secure call return
Secure call may return session-id in the registers if the call
is interrupted. Before restoring the registers extract the
session id and store it in quirk structure.

Change-Id: I2a07ebdea704b8e86472dccb4b95e60f8e4c6736
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
2020-09-17 13:38:56 -07:00
Naveen Yadav
307684499f arm: defconfig: Enable RPMH clock driver for sdxlemur
Add support for RPMH clock driver for sdxlemur.

Change-Id: I04cb69e4044a4edc65d3482205852d436eb88b5d
Signed-off-by: Naveen Yadav <naveenky@codeaurora.org>
2020-09-18 00:08:09 +05:30
Mohammed Mirza Mandayappurath Manzoor
cdc6ef1ba1 msm: kgsl: Update the mailbox message and length for ACD QMP message
Update the message string and adjust the message length as mailbox
controller expects 4-byte aligned buffer.

Change-Id: Ifc357a27b63d1d04f5d0149f637814e5d35262f4
Signed-off-by: Mohammed Mirza Mandayappurath Manzoor <mmandaya@codeaurora.org>
2020-09-17 11:15:39 -07:00
Mohammed Mirza Mandayappurath Manzoor
e9bdf0f8c4 msm: kgsl: Enable Battery Current Limiting feature for A660
Battery Current Limiting (BCL) prevents voltage droops and peak currents
on battery packs preventing under voltage lockout and over current. Send
the feature enable hfi only after the first boot so that the feature
configuration in trustzone goes through.

Change-Id: I113f1b6e505fd67f8b0c6bab7279731efcc6054a
Signed-off-by: Mohammed Mirza Mandayappurath Manzoor <mmandaya@codeaurora.org>
2020-09-17 11:12:51 -07:00
Liam Mark
48acf9e262 Revert "iommu/arm-smmu: Add support to disable page-table coherency"
This reverts commit f85843d3df ("iommu/arm-smmu: Add support to disable
page-table coherency")

This change was added in order to allow iommu clients to disable page
table coherency.
However when page table coherency is disabled using this property on an
SMMU which is configured to be IO-coherent the attempts by the page table
code to apply CMOs on page table entries will be ignored because the
device it is using to apply the CMOs, the SMMU device, is IO-coherent.
This can result in the SMMU seeing stale page table entries.

Since this feature doesn't work and no clients are using revert it.

Change-Id: If6881d24722dd7f1a7398caf6cd904cc7f792bde
Signed-off-by: Liam Mark <lmark@codeaurora.org>
2020-09-17 10:05:21 -07:00
Harshdeep Dhatt
d1ee0bf975 msm: kgsl: Re-define maximum number of cmds for hwscheduling
HFI messages are only SZ_1K bytes. From this, derive HWSCHED_MAX_NUMIBS
as the number of maximum IBs that can be in a single submission in
hwscheduling.

Change-Id: Id6d5cd2c8130479bc83f731ddd564af8c552e531
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2020-09-17 10:39:30 -06:00
Harshdeep Dhatt
8833b6fd82 msm: kgsl: Update internal timestamp when preemption is toggled
Say preemption is enabled and a context is bound to ringbuffer-1.
It's internal timestamp say is 0x4000. Now if we disable preemption,
all the contexts are bound to ringbuffer-0. Now, say the context
is going away. The context destroy path will check timestamp 0x4000
which is from the stale ringbuffer, against ringbuffer-0, and its very
likely that ringbuffer-0's timestamp is less than 0x4000 which will
cause a false context-detach fault. Fix this by updating the context's
internal timestamp to the last retired timestamp on the new ringbuffer.
Also, toggle preemption only if ringbuffers are completely drained.

Change-Id: I674978593b11df3998765017c270c3f0dde6c0a5
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2020-09-17 10:39:29 -06:00
Harshdeep Dhatt
01e5e2f57e msm: kgsl: Remove dev_err() from fenced write loop
dev_err() can take milliseconds to finish which can allow
GMU to come out of IFPC and go back to IFPC before kgsl gets
a chance to update the fenced register.

Change-Id: Ic1846188213da571c23d52b8a78eb2162a8adc7b
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2020-09-17 10:39:27 -06:00
Anirudh Ghayal
5bb0a689c5 extcon: qcom-spmi: Add support for VBUS detection
VBUS can be detected via a dedicated PMIC pin. Add support
for reporting the VBUS status.

[Fixed cocci error: WARNING: Assignment of bool to 0/1]
Change-Id: If1739017f33a502df1c15ca720f9df830e66bfbd
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Signed-off-by: Kavya Nunna <knunna@codeaurora.org>
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
2020-09-17 09:38:35 -07:00
Harshdeep Dhatt
6e294b6fdf msm: kgsl: Add kernel profile buffer to snapshot
This helps establish submission order of submissions across
ringbuffers as well as help establish how long the recent
submissions took on the GPU.

Change-Id: I181d1b49c23b37888106370609dc086ccb3439ae
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2020-09-17 10:20:16 -06:00