Commit graph

854509 commits

Author SHA1 Message Date
TheKit
1d86f7ae7b Import Pro1-X kernel source code 2022-03-20 00:13:44 +01:00
Philip Cuadra
96060693a5
msm: bus_arb: Disable debug logging.
* This debug logging consumes 10% of all the CPU
   cycles in the drivers communicating with the DSP.

 * Disable the logging for the time being until we add
   a config.

Bug: 71867957
Change-Id: I97d418fee3d4576b077ed284ed5ae4447da5a789
2021-09-15 09:27:44 +02:00
Gagan Malvi
fc87a3047e
build: compile with Proton Clang.
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
2021-09-15 09:27:37 +02:00
John Dias
e72c9fc255
binder: Set binder_(alloc_)debug_mask=0 to suppress logging.
* Excessive logging -- not present on angler -- is
   affecting performance, contributing to missed audio
   deadlines and likely other latency-dependent tasks.

Bug: 30375418
[@0ctobot: Extend patch to cover binder_alloc_debug_mask]
Co-authored-by: Adam W. Willis <return.of.octobot@gmail.com>

Change-Id: I36c4ce8a0294e5e7847a3fd884691cb178cd95c2
2021-09-15 09:27:37 +02:00
Yaroslav Furman
abca78dc6d
rcu: Fix a performance regression.
Commit "rcu: Create RCU-specific workqueues with rescuers" switched RCU
to using local workqueses and removed power efficiency flag from them.

This caused a performance regression that can be observed in Geekbench 5
after enabling CONFIG_WQ_POWER_EFFICIENT_DEFAULT: score went down from
760/2500 to 620/2300 (single/multi core respectively).

Add WQ_POWER_EFFICIENT flag to avoid this regression.

Change-Id: I2c4f41faa55548f9e81a1c0cbe10703948062d89
2021-09-15 09:27:36 +02:00
Danny Lin
24fc95ac23
drm/msm/sde: Cache register values when performing clock control.
Remote register I/O amounts to a measurably significant portion of CPU
time due to how frequently this function is used. Cache the value of
each register on-demand and use this value in future invocations to
mitigate the expensive I/O.

Co-authored-by: Sultan Alsawaf <sultan@kerneltoast.com>
[@0ctobot: Adapted for msm-4.19]

Change-Id: I6846ee58c476a125076d0c3ad351f9e15eba180a
2021-09-15 09:27:36 +02:00
Hridya Valsaraju
a212bda4b4
arm64: dts: vendor: Delete Android firmware nodes.
* These have all moved into the ramdisk, and boot devices
   has gone to the kernel commandline.

Bug: 117933812
Change-Id: I0d06607c522c08f50484b9eff4dc78b21cc083f5
2021-09-15 09:27:36 +02:00
Yaroslav Furman
21c03f31c5
PM: sleep: Skip OOM killer toggles when kernel is compiled for Android.
* Android devices use LMK algorythms, so there's no
   reason to disable and enable the OOM killer when entering and exiting
   suspend.

 * This is a fixed version of https://github.com/YaroST12/VIOLENT_kernel/commit/86e59a93b2ef

Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Change-Id: Icb2a57e51128a9ae8d578e697f041ff19871351b
2021-09-15 09:27:36 +02:00
Tyler Nijmeh
3f92eede81
drivers: thermal: Don't qualify thermal polling as high priority.
* Don't take priority over other workqueues.

Change-Id: Ib15dd5addd04ca6569485bd3c66dd01ddf72840e
2021-09-15 09:27:36 +02:00
Danny Lin
cbde7a6bea
arm64: dts: vendor: Disable expedited RCU grace periods.
* Similar to what I've done on other devices, revert
   to normal grace periods to reduce power usage.

 * Expedited RCU hammers CPUs with IPIs to reduce grace
   period durations and thus RCU latency, but that disrupts
   busy CPUs and causes unnecessary wakeups while providing
   little to no improvement in real-world performance.

Change-Id: I2b55e4aaa82bb670dfd6fb417b05fe9ae685e0a8
2021-09-15 09:27:36 +02:00
Adam W. Willis
6a95c8b1c6
arm64: dts: vendor: Disable debug monitoring.
Change-Id: I95048bdbcc41990ddfe279120ddeaed72713a7a5
2021-09-15 09:27:36 +02:00
Danny Lin
b3c827f520
arm64: dts: vendor: Disable broken IRQ detection.
* Our kernel only runs on known systems where broken
   IRQs would already have been discovered, so disable
   this to reduce overhead in the IRQ handling path.

Change-Id: Ia9e655dc9891f9cb94a6123ceaec43ba7c5fd5b1
2021-09-15 09:27:36 +02:00
Jebaitedneko
6b414e784e dts: don't add qcom subdir
we're using vendor/qcom

Signed-off-by: Jebaitedneko <Jebaitedneko@gmail.com>
2021-08-30 14:13:06 +05:30
Jebaitedneko
d06c973953 build.sh: ship compiled dtb.img and dtbo.img
Signed-off-by: Jebaitedneko <Jebaitedneko@gmail.com>
2021-08-30 14:13:06 +05:30
Jebaitedneko
379d474a43 arm64: generate dtb.img from dtbs
Signed-off-by: Jebaitedneko <Jebaitedneko@gmail.com>
2021-08-30 14:13:06 +05:30
Jebaitedneko
f6d5913eb1 dts: enable new tianma and xinli v2 panels
also fixup pwm configuration

Signed-off-by: Jebaitedneko <Jebaitedneko@gmail.com>
2021-08-30 14:13:06 +05:30
Jebaitedneko
af453d1720 dts: build only bengal-idp-overlay.dtbo and bengal.dtb
Signed-off-by: Jebaitedneko <Jebaitedneko@gmail.com>
2021-08-30 14:13:05 +05:30
Jebaitedneko
c19c6fa0d3 dts: align bengal.dtb sources to oem
Signed-off-by: Jebaitedneko <Jebaitedneko@gmail.com>
2021-08-30 14:13:05 +05:30
Jebaitedneko
80bc395a13 dts: align bengal-idp-overlay.dtbo sources to oem
Signed-off-by: Jebaitedneko <Jebaitedneko@gmail.com>
2021-08-30 14:13:01 +05:30
Gagan Malvi
4611b50c3a
drone: Try GH releases.
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
2021-08-28 07:11:42 +02:00
Gagan Malvi
5264660de5
msm: vidc: Disable debugfs not created logspam.
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
2021-08-26 15:09:06 +02:00
Gagan Malvi
092b8d091f
kernel: Merge LA.UM.9.15.r1-02200-KAMORTA.0
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
2021-08-26 06:45:49 +02:00
Panchajanya1999
f510fb0be6
power/wakelock: Add a timeout to wakelocks globally
Few wakelocks tends to get stuck for no reason. Blocking them
isn't necessary and sometimes blocking them breaks basic
functionality.
Wakelocks like "tx_swr_ctrl" tends to get stuck if we keep earphones
connected and drops battery massively.

Test: Keep earphones plugged in and leave device for few hours
Expected result: No "tx_swr_ctrl" is being stuck.
Actual result: Patch is working as expected.

Change-Id: I5296990a84ab44cf6e449d6535b8b99408c415c8
Signed-off-by: Panchajanya1999 <panchajanya@azure-dev.live>
2021-08-26 05:56:34 +02:00
Gagan Malvi
6cab7584ca
drivers/staging/qca-wifi-host-cmn: Merge LA.UM.9.15.r1-03200-KAMORTA.0
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
2021-08-25 13:14:03 +02:00
Gagan Malvi
56446459cd
drivers/staging/fw-api: Merge LA.UM.9.15.r1-03200-KAMORTA.0
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
2021-08-25 13:13:53 +02:00
Gagan Malvi
ae1ff1d29e
drivers/staging/qcacld-3.0: Merge LA.UM.9.15.r1-03200-KAMORTA.0
"LA.UM.9.15.r1-03200-KAMORTA.0"
2021-08-25 13:13:35 +02:00
Gagan Malvi
a70e1f1469
kernel: update gitignore.
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
2021-08-25 13:11:11 +02:00
Francisco Franco
ce0a4f83d4
msm: kgsl: run kgsl-workqueue as a high prio wq 2021-08-25 05:30:47 +02:00
Alex Naidis
6c262f7c81
kgsl: Increase priority of RT thread
We need kgsl_worker_thread to preempt
all userspace surfaceflinger threads to
avoid a possible deadlock.

This will prevent the SF
threads from "stealing" cputime from
kgsl_worker_thread.
This is important, since kgsl_worker_thread
executes work which blocks SF from proceeding.

Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2021-08-25 05:30:30 +02:00
myfluxi
90753ad1c5
PM: devfreq: Use high priority workqueue
It does not make sense to run kgsl on high and devfreq on regular
priority.

Change-Id: Ie5e6c9353a4e1324a6a49278e5ad3638462f551c

Signed-off-by: flar2 <asegaert@gmail.com>
2021-08-25 05:30:22 +02:00
Gagan Malvi
c15c850491
ARM64/configs: bengal-perf: Enable Boeffla wakelock blocker.
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
2021-08-25 05:27:51 +02:00
Panchajanya1999
c120d3322b
boeffla_wl_blocker: Populate block list a bit
These wakelocks has pretty high wakeups [ rmnet_ipa had 496 wakeups in just 20 minutes, IPA_CLIENT_ had 329 wakeups in ~1hr]. Block them to ensure they aren't causing "unnecessary"(might vary) wakeups.

Signed-off-by: Panchajanya1999 <panchajanya@azure-dev.live>
Signed-off-by: Sudeep Duhoon <rishi.gothic@gmail.com>
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
2021-08-25 05:27:02 +02:00
Francisco Franco
08cd97ac60
wl_blocker: add more wakelocks to the default block list
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: Yasir-Siddiqui <www.mohammad.yasir.s@gmail.com>
Signed-off-by: billaids <jimmy.nelle@hsw-stud.de>
2021-08-25 05:26:57 +02:00
Joe Maples
c05b3ca9ec
wl_blocker: Populate default list
Signed-off-by: Joe Maples <joe@frap129.org>
Signed-off-by: Yasir-Siddiqui <www.mohammad.yasir.s@gmail.com>
Signed-off-by: billaids <jimmy.nelle@hsw-stud.de>
2021-08-25 05:26:51 +02:00
andip71
4ebf097f1f
boeffla_wl_blocker: update to wakelock blocker driver v1.1.0
There are now two lists:
- the previously existing list of user defined wakelocks to block
- a new list called "wakelock_blocker_default" which comes prepopulated with the most common
  and safe wakelocks to block:

    qcom_rx_wakelock;wlan;wlan_wow_wl;wlan_extscan_wl;netmgr_wl;NETLINK

A combination of both wakelock lists will be blocked finally.
2021-08-25 05:25:54 +02:00
andip71
488d0a40ba
boeffla_wl_blocker: update to wakelock blocker driver v1.0.1
- currently active wakelocks on the list are forcefully killed
2021-08-25 05:25:49 +02:00
andip71
c50c7ccf15
boeffla_wl_blocker: add generic wakelock blocker driver v1.0.0
Based on ideas of FranciscoFranco's non-generic driver.

Sysfs node:

	/sys/class/misc/boeffla_wakelock_blocker/wakelock_blocker

		- list of wakelocks to be blocked, separated by semicolons

	/sys/class/misc/boeffla_wakelock_blocker/debug

		- write: 0/1 to switch off and on debug logging into dmesg
		- read:  get current driver internals

	/sys/class/misc/boeffla_wakelock_blocker/version

		- show driver version

Signed-off-by: andip71 <andreasp@gmx.de>
2021-08-25 05:25:42 +02:00
Gagan Malvi
9352f491dd
drivers: video: fbdev: msm: enable ULPS, and phy-poweroff.
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
2021-08-23 19:31:28 +02:00
Sultan Alsawaf
a08b2f039e
msm: kgsl: Remove sync fence names
Generating a sync fence name by allocating memory dynamically and using
scnprintf in a hot path results in excessive CPU time wasted on unneeded
debug info. Remove the name generation entirely to cut down CPU waste in
the GPU's rendering hot path.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
2021-08-23 19:17:58 +02:00
Sultan Alsawaf
4de9de3a1e
msm: kgsl: Remove POPP
POPP constantly attempts to lower the GPU's frequency behind the
governor's back in order to save power; however, the GPU governor in use
(msm-adreno-tz) is very good at determining the GPU's load and selecting
an appropriate frequency to run the GPU at.

POPP was created long ago, perhaps when msm-adreno-tz didn't exist or
didn't work so well, so it is clearly deprecated. Remove it.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
2021-08-23 19:17:44 +02:00
Sultan Alsawaf
4df2819595
msm: kgsl: Wake GPU upon receiving an ioctl rather than upon touch input
Waking the GPU upon touch wastes power when the screen is being touched
in a way that does not induce animation or any actual need for GPU usage.
Instead of preemptively waking the GPU on touch input, wake it up upon
receiving a IOCTL_KGSL_GPU_COMMAND ioctl since it is a sign that the GPU
will soon be needed.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
2021-08-23 19:17:31 +02:00
Sultan Alsawaf
938a706b23
Makefile: Use -O3 optimization for CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
-O3 is much more stable with modern compilers these days than it was a
decade ago. Using -O3 on the kernel results in significantly improved
hackbench performance, which is a sign that overall performance in the
kernel is improved. It works especially well in conjunction with LTO.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
2021-08-23 19:14:58 +02:00
Gagan Malvi
67d97cca47
build: disable format warnings.
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
2021-08-23 18:58:23 +02:00
Gagan Malvi
0260e530fa
power: supply: remove redundant endif.
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
2021-08-23 18:32:03 +02:00
Gagan Malvi
00ad9455f6
tree: Add build script.
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
2021-08-23 18:20:04 +02:00
Gagan Malvi
29c034da72
tree: Init DroneCI
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
2021-08-23 18:17:43 +02:00
Danny Lin
16d194501e
arm64: Add missing dependency for ARM erratum 1188873 workaround
ARM erratum 1188873 can cause very severe issues if left unmitigated on
affected cores. However, if unrelated ARM arch timer mitigations are
disabled (e.g. Freescale, Hisilicon, and Cortex-A73 errata), the
mitigation for 1188873 will no longer be applied even if the config
option is on. This is because this mitigation is implemented as a
generic OOL erratum workaround, and disabling other mitigations will
cause the OOL workaround framework to stop being compiled.

Add an explicit dependency on the workaround framework to fix this, and
also add a dependency on ARM_ARCH_TIMER while we're at it.

On Android, leaving this erratum causes the AlarmManager thread in
system_server to use 100% CPU in the background after 20 minutes of
screen-off idle. The CPU hogging never stops until sytem_server is
killed and sometimes also causes system_server crashes due to invalid
negative durations in batterystats resulting from the corrupted timer
values.

Test: Let device idle for 20 minutes and check AlarmManager CPU usage
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
2021-08-23 18:02:38 +02:00
Sultan Alsawaf
02a5724e02
bengal-perf_defconfig: Disable unused errata fixes
The fix for ARM erratum 1188873 is the only configurable one in use.
Disable the rest.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
2021-08-23 18:02:13 +02:00
Sultan Alsawaf
aec9371d28
dma-buf/sync_file: Speed up ioctl by omitting debug names
A lot of CPU time is wasted on allocating, populating, and copying
debug names back and forth with userspace when they're not actually
needed. We can't just remove the name buffers from the various sync data
structures though because we must preserve ABI compatibility with
userspace, but instead we can just pretend the name fields of the
user-shared structs aren't there. This massively reduces the sizes of
memory allocated for these data structures and the amount of data passed
between userspace, as well as eliminates a kzalloc() entirely from
sync_file_ioctl_fence_info(), thus improving graphics performance.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
2021-08-23 17:59:09 +02:00
Danny Lin
d969d8bb17
cpuidle: lpm-levels: Remove debug event logging
A measurably significant amount of CPU time is spent on logging events
for debugging purposes in lpm_cpuidle_enter. Kill the useless logging to
reduce overhead.

Signed-off-by: Danny Lin <danny@kdrag0n.dev>
2021-08-23 17:41:46 +02:00