799819 Commits

Author SHA1 Message Date
Tyler Nijmeh
80633e9edf
block: Do not wake the request CPU if idle
Refrain from waking up an idle CPU if possible since the exit latency
of taking req->cpu out of an idle cstate will likely exceed the
rq->deadline constraint compared to executing the request locally
instead.

Signed-off-by: Tyler Nijmeh <tylernij@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 15:00:50 +07:00
Andrzej Perczak
51d80fec8f
net: qualcomm: rmnet: Add changes from msm-4.19
These changes were applied but there are no corresponding commits for
them (added in import commit).

Signed-off-by: Andrzej Perczak <linux@andrzejperczak.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:59:39 +07:00
Colin Ian King
9b2a47317c
net: qualcomm: rmnet: move null check on dev before dereferecing it
[ Upstream commit 3c18aa1464f9232d6abac8d7b4540f61b0658d62 ]

Currently dev is dereferenced by the call dev_net(dev) before dev is null
checked.  Fix this by null checking dev before the potential null
pointer dereference.

Detected by CoverityScan, CID#1462955 ("Dereference before null check")

Fixes: 23790ef12082 ("net: qualcomm: rmnet: Allow to configure flags for existing devices")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrzej Perczak <linux@andrzejperczak.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:59:39 +07:00
Taehee Yoo
86ebb26d9c
net: rmnet: fix lower interface leak
commit 2a762e9e8cd1cf1242e4269a2244666ed02eecd1 upstream.

There are two types of the lower interface of rmnet that are VND
and BRIDGE.
Each lower interface can have only one type either VND or BRIDGE.
But, there is a case, which uses both lower interface types.
Due to this unexpected behavior, lower interface leak occurs.

Test commands:
    ip link add dummy0 type dummy
    ip link add dummy1 type dummy
    ip link add rmnet0 link dummy0 type rmnet mux_id 1
    ip link set dummy1 master rmnet0
    ip link add rmnet1 link dummy1 type rmnet mux_id 2
    ip link del rmnet0

The dummy1 was attached as BRIDGE interface of rmnet0.
Then, it also was attached as VND interface of rmnet1.
This is unexpected behavior and there is no code for handling this case.
So that below splat occurs when the rmnet0 interface is deleted.

Splat looks like:
[   53.254112][    C1] WARNING: CPU: 1 PID: 1192 at net/core/dev.c:8992 rollback_registered_many+0x986/0xcf0
[   53.254117][    C1] Modules linked in: rmnet dummy openvswitch nsh nf_conncount nf_nat nf_conntrack nf_defrag_ipv6 nfx
[   53.254182][    C1] CPU: 1 PID: 1192 Comm: ip Not tainted 5.8.0-rc1+ #620
[   53.254188][    C1] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
[   53.254192][    C1] RIP: 0010:rollback_registered_many+0x986/0xcf0
[   53.254200][    C1] Code: 41 8b 4e cc 45 31 c0 31 d2 4c 89 ee 48 89 df e8 e0 47 ff ff 85 c0 0f 84 cd fc ff ff 0f 0b e5
[   53.254205][    C1] RSP: 0018:ffff888050a5f2e0 EFLAGS: 00010287
[   53.254214][    C1] RAX: ffff88805756d658 RBX: ffff88804d99c000 RCX: ffffffff8329d323
[   53.254219][    C1] RDX: 1ffffffff0be6410 RSI: 0000000000000008 RDI: ffffffff85f32080
[   53.254223][    C1] RBP: dffffc0000000000 R08: fffffbfff0be6411 R09: fffffbfff0be6411
[   53.254228][    C1] R10: ffffffff85f32087 R11: 0000000000000001 R12: ffff888050a5f480
[   53.254233][    C1] R13: ffff88804d99c0b8 R14: ffff888050a5f400 R15: ffff8880548ebe40
[   53.254238][    C1] FS:  00007f6b86b370c0(0000) GS:ffff88806c200000(0000) knlGS:0000000000000000
[   53.254243][    C1] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   53.254248][    C1] CR2: 0000562c62438758 CR3: 000000003f600005 CR4: 00000000000606e0
[   53.254253][    C1] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   53.254257][    C1] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[   53.254261][    C1] Call Trace:
[   53.254266][    C1]  ? lockdep_hardirqs_on_prepare+0x379/0x540
[   53.254270][    C1]  ? netif_set_real_num_tx_queues+0x780/0x780
[   53.254275][    C1]  ? rmnet_unregister_real_device+0x56/0x90 [rmnet]
[   53.254279][    C1]  ? __kasan_slab_free+0x126/0x150
[   53.254283][    C1]  ? kfree+0xdc/0x320
[   53.254288][    C1]  ? rmnet_unregister_real_device+0x56/0x90 [rmnet]
[   53.254293][    C1]  unregister_netdevice_many.part.135+0x13/0x1b0
[   53.254297][    C1]  rtnl_delete_link+0xbc/0x100
[   53.254301][    C1]  ? rtnl_af_register+0xc0/0xc0
[   53.254305][    C1]  rtnl_dellink+0x2dc/0x840
[   53.254309][    C1]  ? find_held_lock+0x39/0x1d0
[   53.254314][    C1]  ? valid_fdb_dump_strict+0x620/0x620
[   53.254318][    C1]  ? rtnetlink_rcv_msg+0x457/0x890
[   53.254322][    C1]  ? lock_contended+0xd20/0xd20
[   53.254326][    C1]  rtnetlink_rcv_msg+0x4a8/0x890
[ ... ]
[   73.813696][ T1192] unregister_netdevice: waiting for rmnet0 to become free. Usage count = 1

Fixes: 037f9cdf72fb ("net: rmnet: use upper/lower device infrastructure")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrzej Perczak <linux@andrzejperczak.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:59:38 +07:00
Subash Abhinov Kasiviswanathan
87802af3bd
net: qualcomm: rmnet: Fix incorrect allocation flag in receive path
The incoming skb needs to be reallocated in case the headroom
is not sufficient to adjust the ethernet header. This allocation
needs to be atomic otherwise it results in this splat

 [<600601bb>] ___might_sleep+0x185/0x1a3
 [<603f6314>] ? _raw_spin_unlock_irqrestore+0x0/0x27
 [<60069bb0>] ? __wake_up_common_lock+0x95/0xd1
 [<600602b0>] __might_sleep+0xd7/0xe2
 [<60065598>] ? enqueue_task_fair+0x112/0x209
 [<600eea13>] __kmalloc_track_caller+0x5d/0x124
 [<600ee9b6>] ? __kmalloc_track_caller+0x0/0x124
 [<602696d5>] __kmalloc_reserve.isra.34+0x30/0x7e
 [<603f629b>] ? _raw_spin_lock_irqsave+0x0/0x3d
 [<6026b744>] pskb_expand_head+0xbf/0x310
 [<6025ca6a>] rmnet_rx_handler+0x7e/0x16b
 [<6025c9ec>] ? rmnet_rx_handler+0x0/0x16b
 [<6027ad0c>] __netif_receive_skb_core+0x301/0x96f
 [<60033c17>] ? set_signals+0x0/0x40
 [<6027bbcb>] __netif_receive_skb+0x24/0x8e

Fixes: 74692caf1b0b ("net: qualcomm: rmnet: Process packets over ethernet")
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrzej Perczak <linux@andrzejperczak.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:59:38 +07:00
Sean Tranchetti
e7188147df
net: qualcomm: rmnet: flush uplink aggregation on priority tx
If the RmNet driver needs to transmit a packet marked as needing
prioritization, it should skip uplink aggregation of the packet to avoid
adding additional delay. Additionally, any aggregated packets should be
flushed prior to sending the prioritized packet to avoid any ordering
issues.

Change-Id: Ia3063ec3f0553693a0f66c8eb5bbb88d250f7523
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
Signed-off-by: Andrzej Perczak <linux@andrzejperczak.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:59:38 +07:00
azrim
d3b165b000
Revert "soc: qcom: smp2p_sleepstate: Add suspend delay"
This reverts commit 03bbcd6aa1ba42324744e8ace0856b48d55c8d26.

Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:59:38 +07:00
azrim
a3343e3e54
Revert "soc: qcom: smp2p: keeping inbound entry on freeze"
This reverts commit 7ab48cdec73855153afd7784596b2a7be8266139.

Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:59:37 +07:00
dianlujitao
07110d9976
techpack/audio: sm6150: Report correct key code of headset buttons
Change-Id: I8ecc1609d929ac5a8d4d73711b15b4a741d910a3
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:59:37 +07:00
Yaroslav Furman
739c411a8f
teckpack: codecs: Use scnprintf() for robustness
Reasoning explained here 06236821ae

Also fixes this warning:
../techpack/audio/asoc/codecs/wcd-clsh.c:73:9: warning: ‘snprintf’ argument 4 overlaps destination object ‘buf’ [-Wrestrict]
   73 |   cnt = snprintf(buf, buflen - cnt - 1, "%s%s%s", buf,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   74 |           buf[0] == '\0' ? "[" : "|",
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~
   75 |           states[i]);
      |

Signed-off-by: Yaroslav Furman <yaro330@gmail.com>
Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
Signed-off-by: Fiqri Ardyansyah <fiqri15072019@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:59:37 +07:00
Sultan Alsawaf
fe39ec00a0
ASoC: codecs: Fix uninitialized variable usage
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Fiqri Ardyansyah <fiqri15072019@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:59:37 +07:00
Sultan Alsawaf
0992e6df01
ASoC: dsp: msm-dts-srs-tm-config: Fix trivial unguarded pr_debug()
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Fiqri Ardyansyah <fiqri15072019@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:59:36 +07:00
Albert I
8e6c67a544
techpack/audio: codecs: Fix potential buffer overflows
* detected by Clang 9+'s -Wfortify-source.

[Adapted to techpack/audio]
Signed-off-by: Albert I <kras@raphielgang.org>
Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
Signed-off-by: Nauval Rizky <enuma.alrizky@gmail.com>
Signed-off-by: Fiqri Ardyansyah <fiqri15072019@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:59:36 +07:00
Sultan Alsawaf
c547e28cf1
ASoC: dsp: q6afe: Fix uninitialized th_vi_v_vali variable usage
The on-stack th_vi_v_vali struct is not fully initialized by
afe_get_sp_th_vi_v_vali_data(), leaving members of the th_vi_v_vali
struct used despite not being initialized. Fix it by zeroing out the
memory in afe_get_sp_th_vi_v_vali_data().

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Fiqri Ardyansyah <fiqri15072019@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:59:36 +07:00
Panchajanya1999
6244ad6826
techpack/audio/asoc: msm-pcm-routing: Drop cal_data comparison with NULL
The comparison will never be NULL. Fixes an address[Werror=address] error.
Captured by gcc-12.

Change-Id: I2c48526d7f4e16b862bf225d95e72879457aec95
Signed-off-by: Panchajanya1999 <panchajanya@azure-dev.live>
Signed-off-by: Fiqri Ardyansyah <fiqri15072019@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:59:36 +07:00
Tyler Nijmeh
82f506f187
drivers: thermal: Don't qualify thermal polling as high priority
Don't take priority over other workqueues.

Signed-off-by: Tyler Nijmeh <tylernij@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:58:32 +07:00
azrim
56a0d71002
Revert "drm/msm/sde: Don't clear dim layer settings if there are none"
This reverts commit 3f4edda888af467528df0f2549a17f28308c608e.

Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:58:31 +07:00
azrim
025e191ecb
configs: surya: Regenerate full defconfig
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:58:31 +07:00
Wei Wang
9811d56b79
FROMLIST: thermal: make thermal_cooling_device_register accepts const string
Change the argument similarly to thermal_zone_device_register. This will
help register names get from of_property_read_string during probe.

LKML link: https://lkml.org/lkml/2019/5/14/631

Bug: 128625129
Test: Build
Change-Id: I966fbe10ac84705f5dd4d26af4d0a848a2f36b68
Signed-off-by: Wei Wang <wvw@google.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:58:31 +07:00
YiHo Cheng
6f9748b14f
drivers: thermal: lmh_dcvs: Correct limits initial value
The lmh_dcvs limits initial value is U32_MAX which is unreasonable high.
Set initial limits value as cluster maximum frequency which is readable.

Bug: 130617766
Test: adb shell cat /sys/bus/platform/drivers/msm_lmh_dcvs/18*/lmh*

Change-Id: I3cff40fa70d51876f66f79c2936a37a02d9cbcf3
Signed-off-by: YiHo Cheng <yihocheng@google.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:58:31 +07:00
davidchao
7b9052f16f
thermal: core: Use high value to init low temp tracking thermal_zone
When the thermal_zone property is set to “tracks-low” we should init with
THERMAL_TEMP_INVALID_LOW (274000), not THERMAL_TEMP_INVALID (-274000).

Bug: 111683694
Test: Build and thermal mitigation works properly.
Change-Id: I2824809fdfb47c544d30fde6e4866c3ee4e7b25c
Signed-off-by: davidchao <davidchao@google.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:58:31 +07:00
Wei Wang
66349815cd
thermal: core: skip update disabled thermal zones after suspend
It is unnecessary to update disabled thermal zones post suspend and
sometimes leads error/warning in bad behaved thermal drivers.

Bug: 129435616
Change-Id: If5d3bfe84879779ec1ee024c0cf388ea3b4be2ea
Signed-off-by: Wei Wang <wvw@google.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:58:31 +07:00
George Lee
21506c6a13
Thermal: Added VIRT_COUNT_THRESHOLD to virtual sensor
VIRT_COUNT_THRESHOLD added to qti_virtual_sensor for combining multiple
sensors triggered condition.

Bug: 128625129
Change-Id: Ib0dcb753180f0cec72b1cc4e5c3b2b899abbb9ea
Signed-off-by: George Lee <geolee@google.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:58:30 +07:00
Manaf Meethalavalappu Pallikunhi
04d1f8d2fa
drivers: thermal: Ignore spurious BCL interrupts whenever BCL is in polling
Whenever BCL interrupt triggers, it notifies thermal framework.
The framework disables the BCL interrupt and initiates a passive
polling to monitor clear threshold. But BCL peripheral interrupts
are lazy IRQ disable in nature by default. Even if BCL has initiated
disable interrupt, there is a chance it may take some time to disable
in hardware. During this time hardware can trigger interrupt again.
But BCL driver assumes it as spurious interrupt and disables the
interrupt again which will cause permanent disablement of that
interrupt.

If BCL interrupt is triggering again post BCL interrupt
disable, just ignore that interrupt to avoid nested interrupt
disablement. From above scenario, BCL is already in polling mode,
ignoring this spurious interrupt doesn't cause any issue.

Bug: 118493676
Change-Id: Ia77fc66eaf66f97bacee96906cc6a5735a6ed158
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
Signed-off-by: Wei Wang <wvw@google.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:58:30 +07:00
Miguel de Dios
73c5284a46
thermal: fix lockdep splat from qcom driver
The attribute dynamically allocated should be initialized
with sysfs_attr_init. Otherwise, lockdep slaps us.

Bug: 122096541
Bug: 123720375
Change-Id: I5f8aa327729fb51b955b148b7fb5dc0f85d3fbbb
Signed-off-by: Minchan Kim <minchan@google.com>
Signed-off-by: Miguel de Dios <migueldedios@google.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:58:30 +07:00
Wei Wang
dea0b48d06
drivers: arch_topology: wire up thermal limit for arch_scale_max_freq_capacity
before patch and "echo 50000 > /sys/class/thermal/tz-by-name/sdm-therm/emul_temp"
com.android.uibench.janktests.UiBenchJankTests#testInvalidateTree: PASSED (02m6.247s)
        gfx-avg-slow-ui-thread: 0.07110321338664297
        gfx-avg-missed-vsync: 0.0
        gfx-avg-high-input-latency: 74.25140826299423
        gfx-max-frame-time-50: 12
        gfx-min-total-frames: 2250
        gfx-avg-frame-time-99: 11.8
        gfx-avg-num-frame-deadline-missed: 1.6
        gfx-avg-frame-time-50: 9.6
        gfx-max-high-input-latency: 99.86666666666667
        gfx-avg-frame-time-90: 11.0
        gfx-avg-frame-time-95: 11.0
        gfx-max-frame-time-95: 13
        gfx-max-frame-time-90: 13
        gfx-max-slow-draw: 0.0
        gfx-max-frame-time-99: 13
        gfx-avg-slow-draw: 0.0
        gfx-max-total-frames: 2251
        gfx-avg-jank: 43.678000000000004
        gfx-max-slow-bitmap-uploads: 0.0
        gfx-max-missed-vsync: 0.0
        gfx-avg-total-frames: 2250
        gfx-max-jank: 96.67
        gfx-max-slow-ui-thread: 0.13333333333333333
        gfx-max-num-frame-deadline-missed: 3
        gfx-avg-slow-bitmap-uploads: 0.0

aefore patch and "echo 50000 > /sys/class/thermal/tz-by-name/sdm-therm/emul_temp"
google/perf/jank/UIBench/UIBench (1 Test)
----------------------------------------
[1/1] com.android.uibench.janktests.UiBenchJankTests#testInvalidateTree: PASSED (02m7.027s)
        gfx-avg-slow-ui-thread: 0.0
        gfx-avg-missed-vsync: 0.0
        gfx-avg-high-input-latency: 11.53777777777778
        gfx-max-frame-time-50: 7
        gfx-min-total-frames: 2250
        gfx-avg-frame-time-99: 8.0
        gfx-avg-num-frame-deadline-missed: 0.0
        gfx-avg-frame-time-50: 7.0
        gfx-max-high-input-latency: 41.15555555555556
        gfx-avg-frame-time-90: 7.2
        gfx-avg-frame-time-95: 7.8
        gfx-max-frame-time-95: 8
        gfx-max-frame-time-90: 8
        gfx-max-slow-draw: 0.0
        gfx-max-frame-time-99: 8
        gfx-avg-slow-draw: 0.0
        gfx-max-total-frames: 2250
        gfx-avg-jank: 0.0
        gfx-max-slow-bitmap-uploads: 0.0
        gfx-max-missed-vsync: 0.0
        gfx-avg-total-frames: 2250
        gfx-max-jank: 0.0
        gfx-max-slow-ui-thread: 0.0
        gfx-max-num-frame-deadline-missed: 0
        gfx-avg-slow-bitmap-uploads: 0.0

Bug: 143162654
Test: use emul_temp to change thermal condition and see capacity changed
Change-Id: Idbf943f9c831c288db40d820682583ade3bbf05e
Signed-off-by: Wei Wang <wvw@google.com>
(cherry picked from commit 1a1b85b536651daa3dc7dab4fcd155c8cfe1b9a0)
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:58:30 +07:00
Sultan Alsawaf
6361b50b4a
thermal: tsens: Fix exported function marked as static
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
Signed-off-by: Nauval Rizky <enuma.alrizky@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:58:30 +07:00
Julian Liu
7bfb73a864
thermal: Don't register for non-existing thermal zone
Signed-off-by: Julian Liu <wlootlxt123@gmail.com>
Signed-off-by: Nauval Rizky <enuma.alrizky@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:58:30 +07:00
Yaroslav Furman
ba961c1309
drivers: thermal_core: add sysfs nodes to silence mi_thermald
Signed-off-by: Yaroslav Furman <yaro330@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:58:30 +07:00
azrim
3040d40e3a
[SQUASH] Drop current thermal implementation
Revert "drivers: thermal: limits-dcvs: Always build driver"

This reverts commit 04d77a1dabb861a1fc336f3d96cfb0bdaa19b7ac.

Revert "FROMLIST: thermal: make thermal_cooling_device_register accepts const string"

This reverts commit eecebe489a4fa25ec79ef84a7697cb508931f610.

Revert "drivers: thermal: lmh_dcvs: Correct limits initial value"

This reverts commit 1445cfc8152fd5ddf261acd06429fdd22eaba6e7.

Revert "thermal: core: Use high value to init low temp tracking thermal_zone"

This reverts commit 76c26384028935881db42c3a6418c69c84f81b51.

Revert "Thermal: Added VIRT_COUNT_THRESHOLD to virtual sensor"

This reverts commit 29a70471713e25c40b04a02dfce74a9a9c4da0b6.

Revert "thermal: fix lockdep splat from qcom driver"

This reverts commit b601a8d3477a167e74b1bd46c975f86ab1befe54.

Revert "drivers: thermal: Use platform mitigation for mithermal helper"

This reverts commit cf4a5702ea77837300bdef232ced2d5cc9ba232b.

Revert "Revert "thermal: core: Workaround for xiaomi thermal mitigation""

This reverts commit 9f3d735d89024483f6adc44f6f2d22a7bd2b8b95.

Revert "thermal: Don't register for non-existing thermal zone"

This reverts commit a54ab1729d1563c6ab638966a5d5571f64c4ac9a.

Revert "thermal: adc_tm: Remove HIGHPRI flag on workqueue"

This reverts commit e61d7f97a667748d0de2953fb312d937f1a1daa4.

Revert "arch_topology: Wire up thermal limit for arch_scale_max_freq_capacity"

This reverts commit 67fefd15de4c5baf1fb27678353ae8a6566cd912.

Revert "thermal: core: Skip update disabled thermal zones after suspend"

This reverts commit a9a4b482f43b1daa6bcc69e0fadcd5344fc16445.

Revert "thermal: cpu_cooling: Fix a throttling bug"

This reverts commit 9c9056f434f5a7d33ddc319819242901f60936f9.

Revert "thermal: core: Workaround for xiaomi thermal mitigation"

This reverts commit 58a67f0647e416e1ab8fc2731ae523db55b2e7e8.

Revert "thermal: core: Fix snprintf usage"

This reverts commit b5f8c5ae020936a2c7ab09cc4c20984e4691602d.

Revert "thermal: qcom: bcl: Return before thermal trip evaluates"

This reverts commit ef66548bf00599d6a40686ea6776cf7f01f3b768.

Revert "thermal: tsens: Comment out tsens_mtc_reset_history_counter"

This reverts commit ce62bc1f9a798321cb6658bbbe52fc4509edbaf1.

Revert "drivers: thermal: Don't qualify thermal polling as high priority"

This reverts commit ebc063413f9ec507a6c5ee6f52acdca945858cf9.

Revert "thermal: cpu_cooling: Simplify cpu_limits_set_level"

This reverts commit e4a675d89044858ea313bf6c1bcecb6401e8c5bf.

Revert "thermal: core: Use qcom drm notifier"

This reverts commit df79851c1789bbad5bd7f4f3cf7ff3cdaaba8252.

Revert "thermal: core: Import Xiaomi board_sensor and thermal message changes"

This reverts commit 9e53ddbe2075dc1d28dab5dfe1c59fcf9488de90.

Revert "thermal: core: Custom thermal limits handling"

This reverts commit 01054d5c600cdcc7d4f96e3134401714ab04874c.

Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:58:29 +07:00
azrim
be2d2172fb
configs: surya: Regenerate full defconfig 2022-04-26 14:57:18 +07:00
John Galt
bae84108a0
kernel: affine surfaceflinger to big cluster
oneplus did something similar in sched that was killed. There are often migrations occurring upon
interactions.

Signed-off-by: alanndz <alanndz7@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:56:18 +07:00
Panchajanya1999
281475b0ae
power: process: Use lesser time to enter sleep
Revise
803b0f827c

Signed-off-by: Panchajanya1999 <rsk52959@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:56:18 +07:00
myfluxi
d79806e11a
msm: kgsl: Report correct GPU frequency in sysfs
Change-Id: I1aac90d0554b9de0511ffb78042177a5a23855ce
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
Signed-off-by: atndko <z1281552865@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:56:17 +07:00
Park Ju Hyung
49feb90ede
drm/msm: use kmem_cache pool for struct vblank_work
These get allocated and freed millions of times on this kernel tree.

Use a dedicated kmem_cache pool and avoid costly dynamic memory allocations.

Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
Signed-off-by: Nauval Rizky <enuma.alrizky@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:56:17 +07:00
azrim
241a81ebcb
Revert "msm: adreno: Relax CPU latency requirements to save power"
This reverts commit 582b23590ceba71b1ed78982db6b880e1da0ee6c.

Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:55:45 +07:00
Park Ju Hyung
3a36008952
zram: use crc32c instead of jhash in dedup
crc32c is accelerated in arm64 and is faster than jhash.

Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Change-Id: Ic4040e5ee941dca61fbfa6ac3b0f8d9a5f22a3dc
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:55:45 +07:00
Cosmin Tanislav
9a640a495a
display: sde: do not pass around offset string
Signed-off-by: Andrzej Perczak <linux@andrzejperczak.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:55:26 +07:00
Vaisakh Murali
4aac8ab4db
input/fp: goodix: Inline resume, suspend and cleanup functions
These functions are small and queried extensively, making them inlined
and static should speed up the function

[ghostrider-reborn]: Silence logging while we're at it

Signed-off-by: Vaisakh Murali <mvaisakh@statixos.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:55:26 +07:00
azrim
0ab970b946
msm: dsi-staging: Force enable ULPS
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:55:26 +07:00
Yaroslav Furman
62ef810a0b
msm: npu_dev: Initialize mutex_lock earlier
It's needed in npu_hw_info_init.
Warning is a bit dirty, idk why.

[    7.090579] ------------[ cut here ]------------
[    7.095339] WARNING: CPU: 6 PID: 1 at __mutex_lock_common+0xcc0/0x102c
[    7.096826] i2c_geni 884000.i2c: i2c error :-107
[    7.102045] CPU: 6 PID: 1 Comm: swapper/0 Tainted: G S      W       4.14.207-F1xy-Q-surya/6feb547eb0 #148
[    7.102046] Hardware name: Qualcomm Technologies, Inc. SDMMAGPIE PM6150 IDP (DT)
[    7.102049] task: 00000000a1ec88c7 task.stack: 00000000efa6f57d
[    7.106801] aw8624_i2c_read: i2c_read cnt=0 error=-107
[    7.116611] pc : __mutex_lock_common+0xcc0/0x102c
[    7.116613] lr : __mutex_lock_common+0xcc0/0x102c
[    7.116615] sp : ffffff801005b940 pstate : 60c00005
[    7.124400] aw8624_read_chipid  reg 24
[    7.130287] x29: ffffff801005b9a0 x28: ffffffdbf090f800
[    7.130290] x27: 0000000000000012 x26: 0000000000000002
[    7.135573] aw8624_read_chipid aw8624 detected
[    7.140398] x25: ffffff976fe6cf8c x24: 0000000000000000
[    7.140401] x23: 0000000000000000
[    7.150052] aw8624_haptic 3-005a: aw8624_i2c_probe: aw8624_read_chipid ret=0
[    7.150239] x22: ffffff976f3cc67c
[    7.154365] aw8624_interrupt_setup: reg SYSINT=0x0
[    7.159642] x21: 0000000000000000 x20: 0000000000000000
[    7.159645] x19: ffffffdbecfb4080 x18: ffffff977081a8d0
[    7.166825] genirq: irq_chip msmgpio-dc did not update eff. affinity mask of irq 259
[    7.213125] x17: ffffff977166d000 x16: 0000000000000001
[    7.218586] x15: ffffff97702c6d99 x14: 0000000000003739
[    7.224049] x13: 0000000000000004 x12: 00000000081cb39f
[    7.229512] x11: 0000000000000015 x10: ffffff97705a6d48
[    7.234973] x9 : f74f7dd9b21f2400 x8 : f74f7dd9b21f2400
[    7.240435] x7 : ffffff976eb2c544 x6 : 0000000000000000
[    7.245897] x5 : ffffff976eb2f0d8 x4 : ffffff976eb2c6f8
[    7.251359] x3 : ffffff976eb2be08 x2 : ffffff976eae9b04
[    7.256822] x1 : 0000000000000000 x0 : 0000000000000028
[    7.262285]
[    7.262285] PC: 0xffffff976fc6583c:
[    7.267388] 583c  97fff55d 17ffff38 12800e39 17ffff37 d4210000 17fffe30 97c8920c 34ff9f40
[    7.275797] 585c  f000d188 b94a7908 35ff9ee8 b0001520 910d1400 900011e1 9123c821 97bb14de
[    7.284198] 587c  d4210000 17fffcf0 91002276 aa1603e0 94000a20 f0004dda b943b748 340000a8
[    7.292595] 589c  91008260 12800001 97bad64f 340019c0 aa1303fb f8458f77 eb1b02ff 54001400
[    7.300995]
[    7.300995] LR: 0xffffff976fc6583c:
[    7.306096] 583c  97fff55d 17ffff38 12800e39 17ffff37 d4210000 17fffe30 97c8920c 34ff9f40
[    7.314504] 585c  f000d188 b94a7908 35ff9ee8 b0001520 910d1400 900011e1 9123c821 97bb14de
[    7.322902] 587c  d4210000 17fffcf0 91002276 aa1603e0 94000a20 f0004dda b943b748 340000a8
[    7.331300] 589c  91008260 12800001 97bad64f 340019c0 aa1303fb f8458f77 eb1b02ff 54001400
[    7.339699]
[    7.339699] SP: 0xffffff801005b900:
[    7.340283] aw8624_haptic_get_f0 t_f0_trace_ms:136
[    7.344800] b900  6fc6587c ffffff97 60c00005 00000000 ffffffc8 ffffff80 b21f2400 f74f7dd9
[    7.351282] aw8624->f0_calib_data=60
[    7.358218] b920  ffffffff ffffffff 6fc6587c ffffff97 1005b9a0 ffffff80 6fc6587c ffffff97
[    7.362196] aw8624_haptic_f0_calibration final trim_lra=0x3c
[    7.370297] b940  1005b960 ffffff80 6eb5ce38 ffffff97 00000028 00000000 6fc68208 ffffff97
[    7.378898] input: aw8624_haptic as /devices/platform/soc/884000.i2c/i2c-3/3-005a/input/input2
[    7.384505] b960  1005b990 ffffff80 6eae9bf0 ffffff97 aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa
[    7.393448] aw8624_i2c_probe probe completed successfully!
[    7.401750]
[    7.401752] Call trace:
[    7.401754] __mutex_lock_common+0xcc0/0x102c
[    7.401756] mutex_lock_nested+0x24/0x2c
[    7.408320] i2c_geni a8c000.i2c: Bus frequency not specified, default to 400KHz.
[    7.408927] npu_enable_core_power+0x1c/0x258
[    7.409192] nq-nci 0-0028: nqx_probe: probing NFCC NQxxx exited successfully
[    7.411990] wl2866d_probe,enrty
[    7.415909] npu_probe+0x3ac/0xc0c
[    7.415915] platform_drv_probe+0x64/0xb8
[    7.415918] driver_probe_device+0x418/0x450
[    7.415920] __driver_attach+0xd0/0x108
[    7.420223] wl2866d_init: en_gpio is 1262
[    7.427538] bus_for_each_dev+0x88/0xd0
[    7.427540] driver_attach+0x20/0x28
[    7.427542] bus_add_driver+0x11c/0x1d8
[    7.427544] driver_register+0xa4/0xf0
[    7.427546] __platform_driver_register+0x40/0x48
[    7.433565] wl2866d_get_id:wl2866d id is 85
[    7.439247] npu_init+0x1c/0x44
[    7.439250] do_one_initcall+0x138/0x210
[    7.453560] wl2866d_print_reg:wl2866d info is reg 3, value 85
[    7.454476] kernel_init_freeable+0x1f8/0x288
[    7.458595] wl2866d_print_reg:wl2866d info is reg 4, value 85
[    7.462536] kernel_init+0x10/0x1f8
[    7.462540] ret_from_fork+0x10/0x18
[    7.462542] ---[ end trace bce58fa0c97bea72 ]---

Signed-off-by: Yaroslav Furman <yaro330@gmail.com>
Signed-off-by: Panchajanya1999 <panchajanya@azure-dev.live>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:55:26 +07:00
Tyler Nijmeh
994baac2fd
media: v4l: Use interruptible waits
Allow these tasks to be preempted in order to reduce latency.

Signed-off-by: Tyler Nijmeh <tylernij@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:55:26 +07:00
Park Ju Hyung
de3664c9ac
msm: camera: Use kmem_cache pool for struct sync_user_payload
These get allocated and freed millions of times on this kernel tree.

Use a dedicated kmem_cache pool and avoid costly dynamic memory allocations.

Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:55:25 +07:00
Park Ju Hyung
ee048b3737
msm: vidc: Use kmem_cache pool for struct msm_vidc_buffer
These get allocated and freed millions of times on this kernel tree.

Use a dedicated kmem_cache pool and avoid costly dynamic memory allocations.

Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:55:25 +07:00
Sultan Alsawaf
ea3f44576c
msm/sde/rotator: Remove unneeded PM QoS requests
When the rotator is actually used (still an unsolved question in
computer science), these PM QoS requests block some CPUs in the LITTLE
cluster from entering deep idle because the driver assumes that display
rotating work occurs on a hardcoded set of CPUs, which is false. We
already have the IRQ PM QoS machinery for display rendering operations
that actually matter, so this cruft is unneeded.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:55:25 +07:00
Anil Kumar Kanakanti
cb757e702d
msm: camera: cci: Fix logic to update cci clk freq
When multiple frequency slaves running on a same I2C bus,
then there is a chance of overriding I2C bus frequency
even if another I2C operation is running. This could lead
to CCI timeout at driver level. Updated synchronization logic,
to properly update I2C clock frequency, only when no other
I2C operation running.

CRs-Fixed: 2800250
Change-Id: Ia341d7cda118497bf1acea8ea59f7f03124f31c3
Signed-off-by: Anil Kumar Kanakanti <akanakan@codeaurora.org>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:55:25 +07:00
guocx4
c3db76993d
msm: camera: Fix out of memory issue
When initialize front sensor, allocating i2c_list failed sometimes
Then camera showed blank screen, so change kzalloc to kvzalloc to
ensure request memory success.

Change-Id: Ifcc5911c5a7eeb05641deed44edb4d96f4aa7e4b
Signed-off-by: guocx4 <guocx4@mt.com>
Reviewed-on: https://gerrit.mot.com/1300923
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jian Zhang <zhangjo@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:55:25 +07:00
a7301c
b484580a6f
Revert "msm: camera: eeprom: Fix OOB read/write in EEPROM"
This reverts commit 53a55fb72a89684035b6b5533943f8c1769f439d.
Which causes camera failed to launch.

Change-Id: I3ab3d41cbdb8d48945319adc17a06b9368646245
Signed-off-by: a7301c <a7301c@motorola.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:55:25 +07:00
a7301c
1da57ea806
Revert "msm: camera: eeprom: Fix OOB condition for memory map count"
This reverts commit b3fd77235fa23e048ca94bd1048876aa9b432030.
So that it can pick up:
8303c7e (CR) Revert "msm: camera: eeprom: Fix OOB read/write in EEPROM"

Change-Id: Ifa8cfe4fe6876420e2cdd2e702dcc2670cd66538
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:55:24 +07:00
chenglong1
127dff4f94
msm: camera: Fix EEPROM device handle leak.
When EEPROM read failed, the EEPROM device handle was created,
but not released. That will cause EEPROM device acquire be rejected
till phone reboot.

Change-Id: Ife5ea9b4866f33aee137a60328530a3b4c7cb08b
Signed-off-by: chenglong1 <chenglong1@mt.com>
Reviewed-on: https://gerrit.mot.com/1313487
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zilong Zhang <zhangzl7@mt.com>
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Chuanxin Guo <guocx4@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:55:24 +07:00