811279 Commits

Author SHA1 Message Date
Heiner Kallweit
f5a529216e i2c: i801: Annotate apanel_addr as __ro_after_init
[ Upstream commit 355b1513b1e97b6cef84b786c6480325dfd3753d ]

Annotate this variable as __ro_after_init to protect it from being
overwritten later.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 1a1f7053437d0f27534ecc9ec7e5d441c082b81c)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-08-23 16:43:23 +00:00
Ricardo Ribalda
cf654f32bb media: dvb-frontends: tda10048: Fix integer overflow
[ Upstream commit 1aa1329a67cc214c3b7bd2a14d1301a795760b07 ]

state->xtal_hz can be up to 16M, so it can overflow a 32 bit integer
when multiplied by pll_mfactor.

Create a new 64 bit variable to hold the calculations.

Link: https://lore.kernel.org/linux-media/20240429-fix-cocci-v3-25-3c4865f5a4b0@chromium.org
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 8167e4d7dc086d4f7ca7897dcff3827e4d22c99a)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-08-23 16:43:23 +00:00
Ricardo Ribalda
909138842f media: s2255: Use refcount_t instead of atomic_t for num_channels
[ Upstream commit 6cff72f6bcee89228a662435b7c47e21a391c8d0 ]

Use an API that resembles more the actual use of num_channels.

Found by cocci:
drivers/media/usb/s2255/s2255drv.c:2362:5-24: WARNING: atomic_dec_and_test variation before object free at line 2363.
drivers/media/usb/s2255/s2255drv.c:1557:5-24: WARNING: atomic_dec_and_test variation before object free at line 1558.

Link: https://lore.kernel.org/linux-media/20240429-fix-cocci-v3-11-3c4865f5a4b0@chromium.org
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 32f2f5385eefa73aaebefda419147ac8599ba9e6)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-08-23 16:43:23 +00:00
Ricardo Ribalda
a65c17e8b9 media: dvb-frontends: tda18271c2dd: Remove casting during div
[ Upstream commit e9a844632630e18ed0671a7e3467431bd719952e ]

do_div() divides 64 bits by 32. We were adding a casting to the divider
to 64 bits, for a number that fits perfectly in 32 bits. Remove it.

Found by cocci:
drivers/media/dvb-frontends/tda18271c2dd.c:355:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_u64 instead.
drivers/media/dvb-frontends/tda18271c2dd.c:331:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_u64 instead.

Link: https://lore.kernel.org/linux-media/20240429-fix-cocci-v3-8-3c4865f5a4b0@chromium.org
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 2401cbc0f5d4bd1e327d247548cc6ee57bc76c53)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-08-23 16:43:23 +00:00
Simon Horman
9c1cb2b6cb net: dsa: mv88e6xxx: Correct check for empty list
[ Upstream commit 4c7f3950a9fd53a62b156c0fe7c3a2c43b0ba19b ]

Since commit a3c53be55c95 ("net: dsa: mv88e6xxx: Support multiple MDIO
busses") mv88e6xxx_default_mdio_bus() has checked that the
return value of list_first_entry() is non-NULL.

This appears to be intended to guard against the list chip->mdios being
empty.  However, it is not the correct check as the implementation of
list_first_entry is not designed to return NULL for empty lists.

Instead, use list_first_entry_or_null() which does return NULL if the
list is empty.

Flagged by Smatch.
Compile tested only.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240430-mv88e6xx-list_empty-v3-1-c35c69d88d2e@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 47d28dde172696031c880c5778633cdca30394ee)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-08-23 16:43:23 +00:00
Erick Archer
d2b33d0a14 Input: ff-core - prefer struct_size over open coded arithmetic
[ Upstream commit a08b8f8557ad88ffdff8905e5da972afe52e3307 ]

This is an effort to get rid of all multiplications from allocation
functions in order to prevent integer overflows [1][2].

As the "ff" variable is a pointer to "struct ff_device" and this
structure ends in a flexible array:

struct ff_device {
	[...]
	struct file *effect_owners[] __counted_by(max_effects);
};

the preferred way in the kernel is to use the struct_size() helper to
do the arithmetic instead of the calculation "size + count * size" in
the kzalloc() function.

The struct_size() helper returns SIZE_MAX on overflow. So, refactor
the comparison to take advantage of this.

This way, the code is more readable and safer.

This code was detected with the help of Coccinelle, and audited and
modified manually.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments [1]
Link: https://github.com/KSPP/linux/issues/160 [2]
Signed-off-by: Erick Archer <erick.archer@outlook.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/AS8PR02MB72371E646714BAE2E51A6A378B152@AS8PR02MB7237.eurprd02.prod.outlook.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit e52cfcf68df0b52565be68106e9f65ab8077b48a)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-08-23 16:43:23 +00:00
Jean Delvare
b0f4f0d200 firmware: dmi: Stop decoding on broken entry
[ Upstream commit 0ef11f604503b1862a21597436283f158114d77e ]

If a DMI table entry is shorter than 4 bytes, it is invalid. Due to
how DMI table parsing works, it is impossible to safely recover from
such an error, so we have to stop decoding the table.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Link: https://lore.kernel.org/linux-kernel/Zh2K3-HLXOesT_vZ@liuwe-devbox-debian-v2/T/
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit c2a350a3fa622a174e3704691d05989cdfde4d51)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-08-23 16:43:23 +00:00
Erick Archer
fca275dacc sctp: prefer struct_size over open coded arithmetic
[ Upstream commit e5c5f3596de224422561d48eba6ece5210d967b3 ]

This is an effort to get rid of all multiplications from allocation
functions in order to prevent integer overflows [1][2].

As the "ids" variable is a pointer to "struct sctp_assoc_ids" and this
structure ends in a flexible array:

struct sctp_assoc_ids {
	[...]
	sctp_assoc_t	gaids_assoc_id[];
};

the preferred way in the kernel is to use the struct_size() helper to
do the arithmetic instead of the calculation "size + size * count" in
the kmalloc() function.

Also, refactor the code adding the "ids_size" variable to avoid sizing
twice.

This way, the code is more readable and safer.

This code was detected with the help of Coccinelle, and audited and
modified manually.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments [1]
Link: https://github.com/KSPP/linux/issues/160 [2]
Signed-off-by: Erick Archer <erick.archer@outlook.com>
Acked-by: Xin Long <lucien.xin@gmail.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/PAXPR02MB724871DB78375AB06B5171C88B152@PAXPR02MB7248.eurprd02.prod.outlook.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 03f37e56305156bd25c5c237d1cc7f5c75495ef2)
[Vegard: add #include that was pulled in through some other unknown
 header on 4.19.y]
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-08-23 16:40:43 +00:00
Tashfin Shakeer Rhythm
1668b4c520 incfs: Use ARM64 v8 ASM to accelerate lz4 decompression
Change-Id: Ied66bf0037e6669870667acdf55866bc61245508
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-18 03:56:56 -03:00
Tashfin Shakeer Rhythm
7bd5b033d5 lz4: Use ARM64 v8 ASM to accelerate decompression
Change-Id: I2c14ffc6ee9dcc0f2170f9f90169a08505dc43ed
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-18 03:56:56 -03:00
Dark-Matter7232
539a2175c0 lz4: Add ARM64 acceleration and enhance decompression
Extracted from Huawei's kernel source drop, this patch adds ARM64 optimizations for LZ4 decompression:

- Adds ARM64 acceleration support.
- Introduces new ARM64-specific files and updates the Makefile.
- Enhances __LZ4_decompress_generic for partial decompression.
- Adds bounds checks for safer decompression.

Originally intended as optimizations for Huawei's EROFS driver.

Change-Id: I438b79e43bbacd08a047d037a1eeac8ff89b4aff
Signed-off-by: Dark-Matter7232 <me@const.eu.org>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-18 03:56:56 -03:00
Tashfin Shakeer Rhythm
454dc2f706 lz4: Reduce memory usage to 1KB
As per Sony, 1KB of memory size for LZ4 is enough as we only
use LZ4 for zRAM and so our blocks are 4KB in size.

Therefore, reduce the LZ4 memory usage to 1KB. This can enhance
the speed of LZ4.

Change-Id: Iafead09b28c5989c9991163fcc1ce17cb06ba0fc
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-18 03:55:22 -03:00
Tashfin Shakeer Rhythm
42a7777993 lz4: Eliminate unused functions
This fixes the following warnings by Clang:

../lib/lz4/lz4_decompress.c:904:12: warning: unused function 'LZ4_decompress_fast' [-Wunused-function]
static int LZ4_decompress_fast(const char *source, char *dest, int originalSize)
           ^
../lib/lz4/lz4_decompress.c:941:12: warning: unused function 'LZ4_decompress_fast_extDict' [-Wunused-function]
static int LZ4_decompress_fast_extDict(const char *source, char *dest,
           ^
../lib/lz4/lz4_decompress.c:1052:12: warning: unused function 'LZ4_decompress_fast_continue' [-Wunused-function]
static int LZ4_decompress_fast_continue(LZ4_streamDecode_t *LZ4_streamDecode,
           ^
../lib/lz4/lz4_decompress.c:1099:12: warning: unused function 'LZ4_decompress_safe_usingDict' [-Wunused-function]
static int LZ4_decompress_safe_usingDict(const char *source, char *dest,
           ^
../lib/lz4/lz4_decompress.c:1118:12: warning: unused function 'LZ4_decompress_fast_usingDict' [-Wunused-function]
static int LZ4_decompress_fast_usingDict(const char *source, char *dest,
           ^

Change-Id: Ieea187c98a10ee55da02f67615f25b6cd0ed13ba
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-18 03:55:22 -03:00
Tashfin Shakeer Rhythm
cf980ad5d1 lz4: Staticize some functions
This fixes the following warnings by sparse:

../lib/lz4/lz4_compress.c:838:5: warning: symbol 'LZ4_compress_fast_extState' was not declared. Should it be static?
../lib/lz4/lz4_decompress.c:141:8: warning: symbol 'read_long_length_no_check' was not declared. Should it be static?
../lib/lz4/lz4_decompress.c:904:5: warning: symbol 'LZ4_decompress_fast' was not declared. Should it be static?
../lib/lz4/lz4_decompress.c:1052:5: warning: symbol 'LZ4_decompress_fast_continue' was not declared. Should it be static?
../lib/lz4/lz4_decompress.c:1099:5: warning: symbol 'LZ4_decompress_safe_usingDict' was not declared. Should it be static?
../lib/lz4/lz4_decompress.c:1118:5: warning: symbol 'LZ4_decompress_fast_usingDict' was not declared. Should it be static?

Since some of the functions have been marked as static now, there is no
need to export them. Remove the redundant export symbols as well.

Change-Id: Idf1e7a83ceba9f582e22df51ebe687585334abec
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-18 03:55:22 -03:00
Sultan Alsawaf
a7a26b3ec5 f2fs: Force strict fsync mode
To help mitigate data loss potential in the event of an unclean
shutdown. The small performance hit is worth the trade-off for improved
data integrity, especially since custom kernels are more susceptible to
unclean shutdowns (panics) during development.

Change-Id: I4d114ba632faaeb82ea1fdf8f354b0a2f46d8407
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-18 03:55:22 -03:00
liuchao12
a39604d402 f2fs: Avoid needless checkpoint during fsync
MIUI-1728660

This patch enhances the performance of fsync.

Doing checkpoint every time when setting xattr for dir can seriously
affect the performance of fsync. By adding the inode to the tracking
list when setting up xattr, we can avoid doing checkpoint when xattr
of the parent directory is not set.

Change-Id: I0ccf34212f77fb686dd86b705b78554c29bd38f8
Signed-off-by: liuchao12 <liuchao12@xiaomi.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-18 03:55:22 -03:00
Richard Raya
28d9baa9be Revert "sched/fair: Don't allow boosted tasks to be migrated to small cores"
This reverts commit d5afaaf78fc6335662448dcc3202c0b6f5917000.

Change-Id: Ifca9223a0b308bd3abe6628f3b34335d26313a99
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:45:07 -03:00
Richard Raya
5d8ec03b95 Revert "sched/fair: Make stune boost > 0 tasks stay in big cluster"
This reverts commit 9a96accad1fc2d228f2c3a7f527694fe42da7405.

Change-Id: I55d5c4034c19cc2d63e97611e2f7cd1d88188f13
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:45:06 -03:00
Richard Raya
2b7c0a9d8d Revert "sched/tune: only force UX tasks to big cores"
This reverts commit 89746abced305c81c70bb594445632743504b02c.

Change-Id: I903ace5520e79975fc3ad73822e193b2abaadaed
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:45:05 -03:00
Richard Raya
6603b051dd drm/msm/sde: Configure default KCAL parameters
Change-Id: Ifa7a6627fb717def9bd3bc30416e184a7ae42100
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:37:39 -03:00
Richard Raya
1af43dc9da msm-4.14: Run dos2unix treewide
find . -type f -print0 | xargs -0 -n 1 -P 12 dos2unix

Change-Id: I0a93052f5b83de7ee3d66ab372280f5401b8d00b
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:37:38 -03:00
Richard Raya
3ffdace992 exec: Guard SLMK hack
Change-Id: I863a9dfda9aeea6ec61aa9536c86838614520ece
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:05 -03:00
Andrzej Perczak
1efee42c5c defconfig: Disable DEBUG_ALIGN_RODATA
In recent Linux v5.7 release this option has been removed as its real
performance impact is doubtful.
What's more, disabling it can save memory.

Change-Id: Ie2f77ee5bd9e3e7fa7e0e22a2196cd2fc3e81a89
Signed-off-by: Andrzej Perczak <linux@andrzejperczak.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:05 -03:00
Panchajanya1999
d321a83c5c techpack/audio: Target user build variants
Change-Id: I481c891b8e853d272cfbe2b6b912dc767f74c710
Signed-off-by: Panchajanya1999 <panchajanya@azure-dev.live>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:05 -03:00
Richard Raya
3dc59ee906 ARM64/dts: sdmmagpie-thermal: Switch to user_space governor
Change-Id: Ic257d21c7907d6a0cad3a8b04fcf219ff6a4f693
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:05 -03:00
Kuba Wojciechowski
73f8afcbd5 power/supply: Report fast charging when a proprietary charger is attached
Android figures out if charging is "rapid" by checking
POWER_SUPPLY_PROP_CURRENT_MAX and when the proprietary charger tech
Xiaomi's using is active that value isn't always reported correctly.
Work around that by reporting an arbitrary value that's high enough to
qualify as "rapid" when a proprietary charger is attached and fully
authenticated (by checking smblib_get_fastcharge_mode() which is a
custom utility function added by Xiaomi). Other charger types (HVDCP/PD)
still use standard smblib_get_prop_input_current_max().

Test: original 33W charger is reported as "rapid" immediately after
plugging it in, a slow charger is still detected as "slow".

Change-Id: If9247081f2eae8132857be44487f83ba36b4c129
Signed-off-by: Kuba Wojciechowski <nullbytepl@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:05 -03:00
Richard Raya
d64ab44fec workqueue: Force non power efficient workqueues
Change-Id: If4f2f8de7bab5208f36c00fe6d3e55d8b5079fd1
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:04 -03:00
Richard Raya
5ba7c278e6 Revert "rcu: Fix a performance regression"
This reverts commit 462ce2c18d19552736842483f1c3ce1c7554ccba.

Change-Id: Ied28218b62fe2240483dfbb9a5193a586b76839e
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:04 -03:00
Kazuki Hashimoto
da73a77df7 qos: Inline latency critical functions
Change-Id: Ic534adc173689d96fd22b557822dee8844f46451
Signed-off-by: Kazuki Hashimoto <kaz205@tuta.io>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:04 -03:00
Sultan Alsawaf
a42bd2ac50 qos: Don't allow userspace to impose restrictions on CPU idle levels
Giving userspace intimate control over CPU latency requirements is
nonsense. Userspace can't even stop itself from being preempted, so
there's no reason for it to have access to a mechanism primarily used to
eliminate CPU delays on the order of microseconds.

Remove userspace's ability to send pm_qos requests so that it can't hurt
power consumption.

Change-Id: Ie505ac3647258c375387875199bb831a8c208e4f
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:04 -03:00
Richard Raya
4d98a55499 defconfig: Fine tune boost freqs
Change-Id: Ia8aec6f13537eca800233b89c1538a8786e78615
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:04 -03:00
Sultan Alsawaf
67de7a9c1d cpufreq: Kill userspace CPU boosting entirely
Kernel-based CPU boosting is used now, so stop userspace from messing with
it by turning scaling_min_freq into a no-op. Note that this is done instead
of making scaling_min_freq read-only so that userspace doesn't spit out
error messages when it can't do its boosting.

Change-Id: I7c8f07cfc02ba719bfc883c9ecd2954f9cbda76f
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:04 -03:00
Richard Raya
f110fe3f86 adreno_tz: Boost GPU target frequency at any refresh rate
Change-Id: Ia888f618686bc4a599b6fcbaf88ae69557b67eec
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:04 -03:00
Sultan Alsawaf
bd79183928 adreno_tz: Fix GPU target frequency calculation for high refresh rates
It seems that the black-box GPU frequency selection algorithm is unaware
of high refresh rates, and assumes a refresh rate of 60 Hz for its
target frequencies. This results in frequencies that are too low being
selected when a higher refresh rate, such as 90 Hz, is used.

To remedy this, multiply the GPU's busy time by a ratio of the current
refresh rate to 60 Hz. This makes msm-adreno-tz select the right
frequencies needed to avoid stuttering.

[ghostrider-reborn]
- Actually make it work with real-time dynamic refresh rate

Change-Id: Idb8e033bbbd1e6e6ebf1a47d4f9bd618df812658
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:04 -03:00
Richard Raya
8a4484ea84 adreno_tz: Revert some changes
Revert "adreno_tz: Adjust GPU target frequency calculation"

This reverts commit e13ea7323c674fa9a6b70b82c89e94bfb0008ae4.

Revert "adreno_tz: Util inflation improvements"

This reverts commit b2125a41832d2c94cf2b3c6b88d8c7b981eb1c2f.

Revert "devfreq/adreno_tz: make high refresh multiplier configurable"

This reverts commit 863f6821522d3ffbb1a598b75396ee357500614b.

Revert "adreno_tz: Fix GPU target frequency calculation for high refresh rates"

This reverts commit 9b7169dba8a882ad3a7584da337a2fb875e31174.

Change-Id: Idd139250e21efebead872ecbbdebc2529aec22b5
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:04 -03:00
DespairFactor
3d6a41c6a4 cfq: Disable slice_idle
Change-Id: Icfd93f36cdf96fefa22d908eda899f13c1bf39b1
Signed-off-by: Cyber Knight <cyberknight755@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:04 -03:00
Panchajanya1999
1b31da0cba cfq: Apply RedHat suggested tunings for fast storage
[1]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/pdf/performance_tuning_guide/red_hat_enterprise_linux-7-performance_tuning_guide-en-us.pdf
(Section 8.4.5.1)

Change-Id: Ie8e3f7898d661362212d3eac5fe854362048ce94
Signed-off-by: Panchajanya1999 <panchajanya@azure-dev.live>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:04 -03:00
Maciej S. Szmigiero
0c831197cc cfq: Clear queue pointers after unpinning them in cfq_pd_offline
BFQ is already doing a similar thing in its .pd_offline_fn() method
implementation.

While it seems that after commit 4c6994806f70
("blk-throttle: fix race between blkcg_bio_issue_check() and cgroup_rmdir()")
was reverted leaving these pointers intact no longer causes crashes
clearing them is still a sensible thing to do to make the code more robust.

Change-Id: I132ed621e2fbd6c61aae0564b1756202c7d944b2
Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:04 -03:00
Omar Sandoval
3851202d01 cfq: Use ktime_get_ns() instead of sched_clock()
cfq have some internal fields that use sched_clock() which can
trivially use ktime_get_ns() instead. Their timestamp fields in struct
request can also use ktime_get_ns(), which resolves the 8 year old
comment added by commit 28f4197e5d47 ("block: disable preemption before
using sched_clock()").

Change-Id: Iaf49272c124fda5a070ac25ca9698d5cb32e6689
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:04 -03:00
Park Ju Hyung
2021026503 drm/msm: Do not notify events during system shutdown
It's been observed that a panic could occur due to a race with
a MSM_DRM_BLANK_POWERDOWN handler and a driver removal function
upon shutdown while the screen is on.

Since this shouldn't happen, send DRM events only when the system is running.

This doesn't seem to be easy to detect as the events are sent after the
userspace drm process terminates, which is before init binary notifies
the kernel about the shutdown.

Workaround this by detecting shutdown upon sysrq kill-all-tasks(i),
sent from the init binary.

Change-Id: Ibb79bda42af633c957e1f5ec436355d5bfdec21e
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:04 -03:00
Sultan Alsawaf
0a2e0a5f75 drm/msm: Speed up interrupt processing upon commit
Since we know an interrupt will be arriving soon when a frame is
committed, we can anticipate it and prevent the CPU servicing that
interrupt from entering deep idle states. This reduces display rendering
latency.

Change-Id: Ic6fc1c041a5f0903216e98f1a552ec388c6f3517
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:04 -03:00
Sultan Alsawaf
d526a7d721 drm/msm: Reduce latency while completing non-blocking commits
In order to complete a commit, we must first wait for the previous
commit to finish up. This is done by sleeping, during which time the CPU
can enter a deep idle state and take a while to finish processing the
commit after the wait is over. We can alleviate this by optimistically
assuming that the kthread this commit worker is running on won't migrate
to another CPU partway through. We only do this for the non-blocking
case where the commit completion is done in an asynchronous worker
because the generic DRM code already does this for atomic ioctls.

Change-Id: I57728e83cada5bbc1d28ae2f201bcf9cf47e97c7
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:04 -03:00
Richard Raya
81ab8ce2d5 Revert "f2fs: Update congestion timeout for 100Hz"
This reverts commit 1978d9314a699d25dbb3cfef1eea4117743f7a87.

Change-Id: I83b9f7257d16941cc73034437ab2c781881c1535
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:04 -03:00
Richard Raya
b420b47cf3 Revert "defconfig: Use a timer frequency of 100 Hz"
This reverts commit 5459eb8901f47d52ac9a0d8c294f6814edd0a8f2.

Change-Id: I46c4643d4055e28153b5ff9e2207ce3166e1bd5e
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:04 -03:00
Richard Raya
1235f0470b nt36xxx: Enable lyb changes
Change-Id: Ic142c627d03f56c5e5c8571c198ce86378f08ec4
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:04 -03:00
Richard Raya
75e8491a5e Revert "msm-4.14: Cleanup xiaomi touchscreen drivers"
This reverts commit 8b8c91fe51a285c51bd2453566c8ff6e9ea262b9.

Change-Id: Ibc59d482cb458df1dd8c393b2a0efe1fcc8ef6fa
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:04 -03:00
Richard Raya
10c7b9c46a sysctl: Move two_hundred_fifty_five out of PELT compatibility layer
Change-Id: Ied8170585c0c00b1b2f6a899a2bfb5881caf2de2
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:03 -03:00
Richard Raya
1b79fec903 Revert "ARM64/dts: sdmmagpie-gpu: Allow Adreno 618 to nap"
This reverts commit 53e8303ec661701961bcecb1b487f9ce91da7af3.

Change-Id: Ia1c0aa8c9a8065ebff407421d4ea59c13fc892cc
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 16:31:36 -03:00
Richard Raya
2aa45b7da9 defconfig: Regenerate full defconfig
Change-Id: Ic0293ec1ed8b9eba0a402cd5e38852ef0829a9e3
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-16 22:09:19 -03:00
Richard Raya
15a5216c8c Merge branch 'linux-4.14.y' of https://github.com/openela/kernel-lts
* 'linux-4.14.y' of https://github.com/openela/kernel-lts: (133 commits)
  LTS: Update to 4.14.350
  SUNRPC: Fix RPC client cleaned up the freed pipefs dentries
  arm64: dts: rockchip: Add sound-dai-cells for RK3368
  tcp: Fix data races around icsk->icsk_af_ops.
  ipv6: Fix data races around sk->sk_prot.
  ipv6: annotate some data-races around sk->sk_prot
  pwm: stm32: Refuse too small period requests
  ftruncate: pass a signed offset
  batman-adv: Don't accept TT entries for out-of-spec VIDs
  batman-adv: include gfp.h for GFP_* defines
  drm/nouveau/dispnv04: fix null pointer dereference in nv17_tv_get_hd_modes
  drm/nouveau/dispnv04: fix null pointer dereference in nv17_tv_get_ld_modes
  hexagon: fix fadvise64_64 calling conventions
  tty: mcf: MCF54418 has 10 UARTS
  usb: atm: cxacru: fix endpoint checking in cxacru_bind()
  usb: musb: da8xx: fix a resource leak in probe()
  usb: gadget: printer: SS+ support
  net: usb: ax88179_178a: improve link status logs
  iio: adc: ad7266: Fix variable checking bug
  mmc: sdhci-pci: Convert PCIBIOS_* return codes to errnos
  ...

Change-Id: I0ab862e0932a48f13c64657e5456f3034b766445
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-16 22:07:21 -03:00