Commit Graph
821958 Commits
Author SHA1 Message Date
dengwei1 cd0530f62b guamp: emmc add ffu
Porting from (CR)
emmc add ffu
support

Change-Id: I1e736ef7989d3af1664afa0d967d17f7ced79b4b
Signed-off-by: dengwei1 <dengwei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1934932
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1961314
Reviewed-by: Ling Jin <lingjin@motorola.com>
Reviewed-by: Leandro Castelli Silverio <leandros@motorola.com>
2023-06-01 00:47:14 -03:00
huangdra 13447c9f2c Caprip: modify the actuator noise reduction work flow.
when app send "long vib+short vib"(such as 200+50) to driver.
Driver could not stop actuator correctly.

Change-Id: I83095079418f31b536ca00b88b4c7e19e07e2aa6
Signed-off-by: huangdra <huangdra@motorola.com>
Reviewed-on: https://gerrit.mot.com/1968503
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhangqing Huang <huangzq2@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:47:14 -03:00
huangdra 24b662adbd Caprip: modify the actuator noise reduction work flow.
when app send "long vib+short vib"(such as 200+50) to driver.
Driver could not stop actuator correctly.

Change-Id: I4ec72292cf9742176e59dc4fc37da602c6b16182
Signed-off-by: huangdra <huangdra@motorola.com>
Reviewed-on: https://gerrit.mot.com/1967013
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xu Ji <jixu@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Jian Zhang <zhangjo@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:47:14 -03:00
Luiz Cressoni 3bb6b25343 APP data lost after first R upgrade
Since the property ro.crypto.allow_encrypt_override wasn't set in Q
file data in SDcard mounted as internal storage is double encrypted.
So we need to revert the patch that skips encription if bio is
fscrypto or blk-crypto encrypted to avoid decryption errors.

Change-Id: Ic46973a092f00227e0fb2706788df4caa674607d
Signed-off-by: Luiz Cressoni <lutcho@motorola.com>
Reviewed-on: https://gerrit.mot.com/1952458
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:14 -03:00
Srihari Sathyanarayana 9aca9b9d18 Porting of (CR) replace WARN with pr_debug for IPA api
For not implemented apis, there is huge WARN prints as below

Introduced by QC commit
795434e6 msm: ipa: Add ipa rm support for ipa_v2

This caused regression in Rndis reverse path (DUT to PC)

W Call trace:
W         : ipa_pm_is_used+0x44/0x78
W         : rndis_ipa_start_xmit+0x2a0/0x708
W         : dev_hard_start_xmit+0x140/0x290
W         : sch_direct_xmit+0xd4/0x2e8
W         : __qdisc_run+0x348/0x790
W         : net_tx_action+0x274/0x2a8
W         : __do_softirq+0x18c/0x374
W         : run_ksoftirqd+0x24/0x40
W         : smpboot_thread_fn+0x20c/0x270
W         : kthread+0x140/0x150
W         : ret_from_fork+0x10/0x18
W         : ---[ end trace 4cfa2ba718c7aa80 ]---
W         : ------------[ cut here ]------------
W         : ipa_pm_is_used not implemented for IPA ver 18
W         : WARNING: CPU: 3 PID: 37 at
drivers/platform/msm/ipa/ipa_api.c:3806 ipa_pm_is_used+0x44/0x78

Right now replace them with pr_debug to not hamper throughput and it
just print as below when dynamic debug is enabled
E         : ipa_pm_is_used not implemented for IPA ver 18

Tests: iperf.exe -s -u -p5002 -w64M -i1 -t15 ( PC as server)
Seen 350+ Mbits/sec from DUT to PC with only USB tethering.

Change-Id: I67d9df7c1f77326f6172595967798e82c7f85175
Signed-off-by: Srihari Sathyanarayana <sriharis@motorola.com>
Reviewed-on: https://gerrit.mot.com/1877836
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Vijayakumar Gn <vijaygn@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
Signed-off-by: Robert Cabral <robertc@motorola.com>
Reviewed-on: https://gerrit.mot.com/1924169
2023-06-01 00:47:14 -03:00
Mike SU fc82a43871 MOTODESK-2239 Make NCM driver compatible with windows
1. Fix NTP-32 support
When connecting a CDC-NCM gadget to an host that uses the NTP-32 mode,
or that relies on the default CRC setting, the current implementation gets
confused, and does not expect the correct signature for its packets.
Fix this, by ensuring that the ndp_sign member in the f_ncm structure
always contain a valid value.
https://lore.kernel.org/patchwork/patch/1062690/

2. Add OS descriptor support
To be able to use the default USB class drivers available in Microsoft
Windows, we need to add OS descriptors to the exported USB gadget to
tell the OS that we are compatible with the built-in drivers.
Copy the OS descriptor support from f_rndis into f_ncm. As a result,
using the WINNCM compatible ID, the UsbNcm driver is loaded on
enumeration without the need for a custom driver or inf file.
https://lore.kernel.org/patchwork/patch/1062691/

3. Use "ncm0" interface name
The default interfacename "usb0" is confused. Use "ncm0" better.

Change-Id: I36d085c519f8205d7f9e0a1d9c669d3fb6623483
Reviewed-on: https://gerrit.mot.com/1872002
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit edda0121735f5436ef2287379fb6b57325ef04f4)
Reviewed-on: https://gerrit.mot.com/1916170
Reviewed-by: Xuejin Wang <wangxjn@motorola.com>
Tested-by: M(CR) SU <suzh1@lenovo.com>
2023-06-01 00:47:14 -03:00
Pedro Bertoleti 8d56fc509d disable CONFIG_SLUB_DEBUG for user builds
This gerrit disables CONFIG_SLUB_DEBUG for bengal user
builds. This configs tends to badly impact performance
on user builds. Therefore, it should be disabled.

Change-Id: I09c64131492af6217d3f645f0870b0c93b981492
Reviewed-on: https://gerrit.mot.com/1913031
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Rafael Ortolan <rafones@motorola.com>
Reviewed-by: Fernanda Schmidt <fschmidt@motorola.com>
Reviewed-by: Carlos Pinho <cpinho@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:14 -03:00
Pedro Bertoleti 1fa24c832f disable CONFIG_DEBUG_PANIC_ON_OOM in userdebug builds
This gerrit disables CONFIG_DEBUG_PANIC_ON_OOM in userdebug builds
(for cebu device). It prevents Kernel Panic generation when Kernel
memory allocation fails, due to an Out of Memory (OOM) detection.

As OOM condition isn't so unusual (specially for heavy users), it
won't be a good experience for users to face kernel panics everytime
this OOM condition is satisfied.

Reference gerrit: https://gerrit.mot.com/#/c/1732467/

Change-Id: I7c1d017daa1671eef9b723adb72391901a2aed27
Reviewed-on: https://gerrit.mot.com/1905120
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Tiago Ganselli <ganselli@motorola.com>
Reviewed-by: Joo Costa <jmcosta@motorola.com>
Reviewed-by: Fernanda Schmidt <fschmidt@motorola.com>
Reviewed-by: Rafael Ortolan <rafones@motorola.com>
Reviewed-by: Carlos Pinho <cpinho@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:14 -03:00
Bruno Oliveira 381c1189b7 Include inlinecrypt at config.gz to fix Q->R upgrade
Issue: At mot4250 android R is not supporting inline encryption
            This causes recovery mode with init_user0_failed log
            when upgrade from Q to R

Fix: Include inlinecrypt at fstab and config.gz

Change-Id: I2b20a7cbd3670e6b9bf5c9885a14a1b0e4ec2083
Reviewed-on: https://gerrit.mot.com/1896972
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:14 -03:00
yanyh2 7ac8923b0e usb: add xhci-hw-lpm-disable dt property support
PROPAGATED_from (CR)

Add device tree property xhci-hw-lpm-disable support for
xhci hardware lpm feature disabling.

For some connected devices the host phone, they may be some
detection issue if xhci hardware lpm feature is enabled.
For this case, add this property in device tree of usb controller
to disable xhci hardware lpm.
(pick from https://gerrit.mot.com/#/c/1426964/)

Change-Id: I3907c945dd83fdefdda597975318e45d8be047e1
Signed-off-by: yanyh2 <yanyh2@motorola.com>
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Signed-off-by: Robert Cabral <robertc@motorola.com>
Reviewed-on: https://gerrit.mot.com/1858485
2023-06-01 00:47:14 -03:00
wangwang1 f12accb185 kernel:ram overwritten by TZ logs to cause random panics
cherry-pick: (CR) kernel:ram overwritten by TZ logs to cause random panics

in panic RAMDump file, we can see the memory in kernel was overwritten by TZ logs
the tzlog strings corrupted the memory address to cause abort on VM to PHY-M
similar panic issue was frequently reported in User build which disable
DebugFS along with tzlog driver which depends on DebugFS. Add the tzlog driver
back, but remove the dependency of DebugFS, instead, use ProcFS for output

Change-Id: If6f9f0bf0fe3ce08c868582a457b207cee07923d
Signed-off-by: wangwang1 <wangwang1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1836697
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1836767
2023-06-01 00:47:14 -03:00
huangdra 9679534c60 caprip: Add start/stop vibrating notification to actuator.
Vibrator on phone main board can disturb camera AF VCM when it's vibrating.
To avoid the camera lens str(CR) noise during vibrating, power on AF and
push lens to certain position (for caprip DAC 154) can greatly reduce the
noise.This change is for notifying camera actuator that vibrator will start
or stop work, then camera can respond accordingly..

Change-Id: Ie26d6f811d6628f51045a853dc3e90f422481da9
Signed-off-by: huangdra <huangdra@motorola.com>
Reviewed-on: https://gerrit.mot.com/1836813
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:14 -03:00
huangdra 0891d8d1c1 arm64: defconfig: Actuator noise reduction.
Add CONFIG_AF_NOISE_ELIMINATION for enable/disable actuator separate controlling
to avoid resonance noise during vibrating.

Change-Id: I85d0b4b00a61c4761fa4e13d50da6367a4e3b87b
Signed-off-by: huangdra <huangdra@motorola.com>
Reviewed-on: https://gerrit.mot.com/1835496
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:14 -03:00
panzh2 4ca15142c9 kernel: driver/vibrator: diff vol for long/short vib
This is a workarround to reduce the vibrator strength for long vib.
Add attribute "qcom,vib-dis-short-long" in device-tree to enable the
function.
Now it is applied in caprip product.

Change-Id: I41c04e0dfb14c184f999d7d0a4121c10dd763cd5
Signed-off-by: panzh2 <panzh2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1805268
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:47:14 -03:00
lixh8 f043cb1d82 skip ipa assert for debug build (patch 2)
ipa assert will break userdebug build in secure hw for logs.
skip ipa assert for debug build.

Change-Id: I5ff5c719c17748274837b543bbc1d1113a4a5812
Signed-off-by: lixh8 <lixh8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1803987
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:47:14 -03:00
lixh8 a3511519b3 skip ipa assert for debug build
ipa assert will break userdebug build in secure hw for logs.
skip ipa assert for debug build.

Change-Id: I52d5433282ce9bb24e954bca9e3d0c04fe5bedc5
Signed-off-by: lixh8 <lixh8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1799258
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:47:14 -03:00
huangzq2 347882f665 limit ion cache size
We often see lost ram is still very high even we close the camera app.
That's because camera's ion memory goes into ion cache after use, not
buddy system. And this cache was not counted in proc/meminfo/memAvailable,
so it can not reflect the true memAvailable in this state. It may affects
some components l(CR) camera or lmkd which need evaluate true memAvailable
in system. Take camera as example, while launching camera, camera app needs
calcuate the available memory then call framework api to kill processes,
without this patch, we will see overkill.

This patch is only for 4.14 & 4.19, on kernel 5.4, ion cache will
be counted in memAvailable, so memAvailable is always trustable.

Change-Id: I4a9678530d387bd8da404d797f7d6e33bd258ac4
Signed-off-by: huangzq2 <huangzq2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1792299
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit a9acaa732c7fcb5e9ec9eea08bb6bb390c316722)
Reviewed-on: https://gerrit.mot.com/1795665
2023-06-01 00:47:14 -03:00
zhangly19 f0ecb153ea Revert "(CR) power: Add wakeup source in battery historian logging"
This reverts commit 3a7c2ddda918ea0ba239c51d74984a499c392942.

This change has been included in new base .so revert it

Change-Id: I50210a029c2f69b8561a7cae2f4b87b190b8a842
Reviewed-on: https://gerrit.mot.com/1791620
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Submit-Approved: Jira Key
Tested-by: Jira Key
Reviewed-by: gaoyx9 <gaoyx9@motorola.com>
2023-06-01 00:47:14 -03:00
xieqiong2 5e3f51191a power: print active wakeup source before suspend.
porting (CR)

1. Print active wakeup source before entering suspend
2. Use to monitor the kernel long term wake lock issue

Change-Id: Icee9744da0c46fbb56d516e996eed7115f754931
Signed-off-by: xieqiong2 <xieqiong2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1788058
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:13 -03:00
Ryan Lattrel b7d1d52266 alarmtimer: add debug to identify alarmtimers
porting (CR).Based on KBA-200505201040

Print out timer wake-up info to debug the sources
of pm8xxx_rtc_alarm wake-ups.

Change-Id: I39f24dad0613a08844eefcd25076831589256e52
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1668046
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit 0aa8db75da991b42037336ad28cbd629f3483636)
Reviewed-on: https://gerrit.mot.com/1781686
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
2023-06-01 00:47:13 -03:00
xieqiong2 17231f700a charger:driver:fix non power off issue for factory kill.
In P, run_cmd(poweroff_cmd) can work to trigger /sbin/poweroff. Now in
R, it can not work but still return success. We need to use
kernel_power_off() to trigger power off for factory kill.
The change is referring to (CR).

Change-Id: Ia18faee3138259c7ee35946313e9b0dac75dd244
Signed-off-by: xieqiong2 <xieqiong2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1763914
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:13 -03:00
panzh2 8cf8451e1f arm64/defconfig: capri: open nfc driver for capri
set CONFIG_NFC_NQ=y
include the build of nfc driver

Change-Id: I1614984a89fffe00a808216c9d36ca1e13292cfc
Signed-off-by: panzh2 <panzh2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1758609
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:13 -03:00
zhaoxp3 1a9142aca8 arm64/defconfig: disable debug fs on user build
cherry-pick from:
(CR): arm64/defconfig: disable debug fs on user build

according to android R,
disable debug fs for user build

Change-Id: I985888644c92e14205f7260c423bb88bad026dd9
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1752415
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1753930
Reviewed-by: Jianguo Liu <liujg6@motorola.com>
2023-06-01 00:47:13 -03:00
xuwei9 5928525b6a charger:support typec high 2A current at non-turbo product
Support drive 2A current from type-c high charger
at non-support turbo charger project

Change-Id: Id41a4a307b519e6ae23dce1503de81386a77671c
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1750006
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit f70893606fbb3b7d9a074cdd382aa977a797745e)
Reviewed-on: https://gerrit.mot.com/1751199
2023-06-01 00:47:13 -03:00
liujg6 354cb7eae3 arm/defconfig: enable CONFIG_DEBUG_LIST on R
For kernel requirements at matrix level 5, Missing config CONFIG_DEBUG_LIST
Add CONFIG_DEBUG_LIST into moto-bengal.config on R

Change-Id: Ia2f1ad1f6425d2b08e14000a7bf69b85e6bdfae6
Reviewed-on: https://gerrit.mot.com/1745633
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:47:13 -03:00
zhouwl c63b249f26 soc: qcom: service-locator: enlarge timeout value
Propogate changes from (CR).
Dogfooder reported call has no sound issue, it happens on the first
bootup after BOTA upgrading. According to kernel log, filesystem
mount more than 5 minutes, causes locator service timed out.

After discussing with Qcom, they suggest to enlarge this timeout value.

Propagted: https://gerrit.mot.com/#/c/1538288/

Change-Id: I2457b452d21c7396d6a314ae5307c225c52d83da
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1740479
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit 9f2105e6420cf9871b3c4b494f70dc98a8449379)
Reviewed-on: https://gerrit.mot.com/1744516
Reviewed-by: Yunfei Guo <guoyf2@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
2023-06-01 00:47:13 -03:00
liujg6 e1262d253c arm/defconfig: caprip: init kernel deconfig
add caprip kernel config files
enable caprip dtb

Change-Id: Ie14b901781594e032e7643dd003e0db35f28101e
Reviewed-on: https://gerrit.mot.com/1743872
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:47:13 -03:00
liujg6 fd6621880c arm/defconfig: capri: init kernel deconfig
add capri kernel config files
enable capri dtb

Change-Id: I8498875a67ac7d335dd58a034aae97192c5a72bf
Reviewed-on: https://gerrit.mot.com/1743605
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:47:13 -03:00
Vikash Garodia 7d4edd8312 Revert "Revert "msm: media: uapi: Redefine NV12 format with different alignment""
This reverts commit f90529f1dec9bdf47082ed0c4d279918459b1be0.

This gerrit was temporarily reverted so as to align all the other
dependent gerrits to merge together.

Mot-CRs-Fixed:(CR)

Change-Id: Idcb99939488d6d83aee1a9c9af4e613820a3a181
Signed-off-by: V(CR) Garodia <vgarodia@codeaurora.org>
Reviewed-on: https://gerrit.mot.com/1730952
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zilong Zhang <zhangzl7@lenovo.com>
Reviewed-by: Ji Zhao <zhaoji1@lenovo.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:13 -03:00
xiaojj1 2c5bc95478 Revert "msm: media: uapi: Redefine NV12 format with different alignment"
Mot-CRs-Fixed: (CR)
This reverts commit cf7d4c0cc7eb9130ccac08cd7f4e08cfe0d267b3.

Change-Id: I187977996b5ffc483c4ff2eba0e625717d7a2b5c
Signed-off-by: xiaojj1 <xiaojj1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1730949
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zilong Zhang <zhangzl7@lenovo.com>
Reviewed-by: Ji Zhao <zhaoji1@lenovo.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:13 -03:00
xieqiong2 6c3c736daf clear SDAM for new battery profile loading.
QCOM KBA-191111223725
[Platform]:
SM6150, SM7150, SM7250, Any platforms use PMI632
[Issue Description]:
If ever use a mismatched temporary profile before receive the matched profile, it may lead to
unexpected inaccurate/nonlinear soc issue, even though you have replaced the correct one, issue
still remains.
[Solution]:
The reason of this issue is because of the saving of incorrect battery info in SDAM, Qcom battery
gauge save the calculated battery info(l(CR) ESR, Capacity...) into the SDAM of PMIC, when reload
a new battery profile, these info will not be cleared, in other words, device will use the incorrect
data to calculate the Soc even though you have loaded a correct matched profile.
To solve this issue, there're two options, one is to re-plug the battery, so that SDAM data will be
cleared. The other option is to merge below workaround, and add device tree property "qcom,
oem-batt-profile-ver" to identify profile change, then driver code will do SDAM clear.

Change-Id: I9fa176cb75da6f9b584553888afa66453576db4e
Signed-off-by: xieqiong2 <xieqiong2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1732309
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:13 -03:00
huangzq2 42a1e7c0ee disable DEBUG_PANIC_ON_OOM on 3G ram device
3G ram device has bigger memory pressure than 4G ram device, hence it
has more misreport bugs if we enabled DEBUG_PANIC_ON_OOM. Though we
disable this on 3G ram device, we still can catch oom once device has
no killable process.

Change-Id: Ie12e7c96bac3049031e1e73ce22207df5ae2a8b1
Signed-off-by: huangzq2 <huangzq2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1732467
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:13 -03:00
xieqiong2 e783fbe7aa driver:qg:enale QG_DEBUG_SOC.
Enable QG_DEBUG_SOC debug mask in QCOM
qg module for soc related issue.

Change-Id: Ia7546a9bcea3d71b1b7a5dfd65a675e06b932e4c
Signed-off-by: xieqiong2 <xieqiong2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1728275
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:13 -03:00
chailu1 2562e90500 Charge: fix slab out of bounds risk
There is a risk if mmi->pres_temp_zone value >= num_temp_zones.
This will casue pointer point to a illegal memory address.

Change-Id: Ic7c3d62c5c59bd41d9fd4f77cd537782c734a486
Reviewed-on: https://gerrit.mot.com/1725712
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:13 -03:00
chailu1 7fe85e21d3 charge: qc2.0 adapter charge slow
resolve qc2.0 adapter charge slow
refer to https://gerrit.mot.com/947317

Change-Id: I97a133b2661e31b816e1f97e1b66d31bd6ca52f9
Signed-off-by: chailu1 <chailu1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1716838
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:13 -03:00
chailu1 fe183ea9c0 charge: Handle QC2.0 charger vbus rise 12V
some non-standard QC2.0 charger (e.g. Tronsmart) will rise
vbus to 12V when phone do HVDCP3 detect protocol.
So when vbus reach 12V, we disable HVDCP to workaround it.

refer to (CR)

Change-Id: I1a1fbf1715ac6fbd12a9cd550207b210f16a951d
Signed-off-by: chailu1 <chailu1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1709435
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:13 -03:00
chailu1 4a8fffaf9c BCL: Enable charge bcl feature
When SOC < 10% will mitigate CPU,for improved
performance at turbo charging scene, will not
mitigate CPU.

Change-Id: I2b88806781fa1dae0f0ce2c15d2a9f1b74d00298
Reviewed-on: https://gerrit.mot.com/1707400
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:13 -03:00
huangzq2 62fd3bc61c arm: setup: support mem= memory limit
Change-Id: I7d5e5e7f9b2d97fc6a0d1c0ea3e4e767e9730a7f
Signed-off-by: huangzq2 <huangzq2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1704937
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:47:13 -03:00
zhaoxp3 f589f25f57 arm: call idle notifiers in CPU idle
When CPU idle is enabled, the idle call should also notifiy the
idle_notifier_call_chain of the change in status. Otherwise some
processes will think the CPU is always active.
Then it will cause some tasks occupy more cpu

Change-Id: Ie11770330bee93ce0e4622a3127ca4850abfb4ba
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1688959
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:47:13 -03:00
xuwei9 205e724ed6 charger:improve micro-b input current to 1.9A per HW
Per HW evaluation, improve micro-b input current to 1.9A
for charging time optimization

Change-Id: Ib538118ff78b8605f979701e9a88769f814905b5
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1680936
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:12 -03:00
liujg6 9b096edd19 Capri bring up
fix compile erro on r due to qcom api changes

Change-Id: I0730df353be93f6f1f06193ddad651b18c399cc1

add R kernel compatibility requirement configs

Change-Id: If67721ab5abd57ad78160d59364e4ed9dd708fbc

config guam R

Change-Id: I1ecb8583728776be53a580c3251a2456713a3723

temp export kallsyms_lookup_name for fail loading some moto kos

Change-Id: I0f22aabb249219a587e696db3d1853a5dcd01afc
2023-06-01 00:47:12 -03:00
xuwei9 26fdb536dc kernel:distinguish type-c and microb cdp input setting
Distinguish type-c and micro-b
input setting

Change-Id: Ibe01d2ea82821fe813389d6d861276f96021f800
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1670666
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:12 -03:00
huangzq2 dd4e38c2ee disable SPLIT_RSS_COUNTING to fix zero RSS issue
Change-Id: Iee0bdf2534fee660e64d8e8221c4dc571e13921e
Signed-off-by: huangzq2 <huangzq2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1668699
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Reviewed-by: Bingqian Yang <yangbq1@lenovo.com>
2023-06-01 00:47:12 -03:00
xieqiong2 37abee060a charger:add battery test mode support for cebu.
Porting from https://gerrit.mot.com/#/c/1434780/
Add battey test mode in smbchg for simulate the battery
temperature and battery soc.

Change-Id: I23cd23dd686b144ed26ba9f5c55df83986c57690
Signed-off-by: xieqiong2 <xieqiong2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1666808
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:12 -03:00
Haijian Ma 676f8fd1e4 spi: disable_depth > 0 when pm runtime get sync
when unit suspend, pm_runtime_disalbe() would be called. And
then dev.power.disable_depth number will +1. And its value
will be -1 when pm_runtime_enable() is called.
And if spi bus want to work as soon as system resume, it will call
pm_runtime_get_sync(), which would check the value of
disable_depth. If its value is not 0, spi operation will fail.
The sequence is as following:

runtime_suspend
pm_runtime_disable()-> disable_depth +1
rumtime_resume
pm_runtime_eanble() -> disable_depth -1
spi_sync()
pm_runtime_get_sync -> check the value of disable_depth

But for sometimes, spi operation will earlier than pm_runtime_enable()
called. Then spi_sync() will fail duel to non-zero disable_depth value.
So we add a checking logic before pm_runtime_get_sync() to make sure
disable_depth is 0.
(pick from https://gerrit.mot.com/#/c/1500296/)

Change-Id: I69a0ee3d728ffe3c13d95208f203bd9ed22249b2
Signed-off-by: wengjun1 <wengjun1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1654438
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:12 -03:00
weiweij c3682b0adb driver/spi: spi driver suspend changes
Port the spi changes from bq-6125.
- Do not force suspend for all spi bus.
This will not cause power issue, and can fix clock is closed when SPI
sync message.
- SPI driver missed to check spi runtime status in device suspend.
This may cause spi clocks not closed before device enter deep sleep
So check this status in spi suspend function, if bus not suspened,
break device suspend.
(pick from https://gerrit.mot.com/#/c/1498807/)

Change-Id: Id31492702506361a4ae5e2ccb9c5d381d321e143
Signed-off-by: wengjun1 <wengjun1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1654409
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:12 -03:00
wangyq13 d97f64bdbe kernel: panel_notifier: Add new panel notify event type
panel_notifier:
Add new panel notify event type, after panel reset, before
sending panel on init commands.

Change-Id: I9cc37530ca610060fd122da52bd2edba995ceee4
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1651425
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Dezhen Hou <houdz1@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:12 -03:00
a17671 bcff10d535 mmc:host:sdhci:Fix host->claimer NULL pointer problem
Once the SD card is removed,
MMC core will set the the host->claimer=NULL & host->claimer->task=NULL 
So sdhci_dump_state shall check this condition
To avoid using the host->claimer pointer directly
Below shows the parsed call stack and logs:
Unable to handle kernel NULL pointer dereference at virtual address 0000
<6> Mem abort info:
<6>   ESR = 0x96000005
<6>   Exception class = DABT (current EL), IL = 32 bits
<6>   SET = 0, FnV = 0
<6>   EA = 0, S1PTW = 0
<6> Data abort info:
<6>   ISV = 0, ISS = 0x00000005
<6>   CM = 0, WnR = 0
<6> user pgtable: 4k pages, 39-bit VAs, pgdp = 000000000e17a57e
6> [0000000000000000] pgd=0000000000000000, pud=0000000000000000
<6> Internal error: Oops: 96000005 [#1] PREEMPT SMP
<2> pstate: 60000085 (nZCv daIf -PAN -UAO)
<2> pc : sdhci_dumpregs+0xf1c/0x1250
<2> lr : sdhci_dumpregs+0xef0/0x1250
<2> sp : ffffff8008003d60
<2> x29: ffffff8008003dc0 x28: 0000000000000012 
<2> x27: ffffffc0f76b47c0 x26: ffffff800aebc038 
<2> x25: 0000000003ff100b x24: ffffffc0f76b47b8 
<2> x23: ffffff800aebc058 x22: 0000000000000000 
<2> x21: 0000000000000003 x20: ffffffc0f76b4000 
<2> x19: ffffffc0f76b4780 x18: 0000000000000090 
<2> x17: ffffff800abb8598 x16: 3030303030307830 
<2> x15: 0000000000000040 x14: 0000000000000048 
<2> x13: 0000000000000008 x12: 0000000000000000 
<2> x11: 0000000000000001 x10: 0000000000000007 
<2> x9 : 7c9075bd256d4900 x8 : 0000000000000000 
<2> x7 : 0000000000000000 x6 : ffffff800a35f428 
<2> x5 : 0000000000000000 x4 : 000000000000000c 
<2> x3 : 0000000000000000 x2 : 000000000c0a4680 
<2> x1 : ffffffc0f764c100 x0 : ffffff800994b313   

Call stack:-
-012|sdhci_dump_state(inline)
-012|sdhci_dumpregs([X19] host = 0xFFFFFFC0F76B4780 = end+0x40ECFA2780)
-013|sdhci_data_irq(inline)
-013|sdhci_irq()
-014|__read_once_size(inline)
-014|static_key_count(inline)
-014|static_key_false(inline)
-014|trace_irq_handler_exit(inline)
-014|__handle_irq_event_percpu()
-015|handle_irq_event_percpu(inline)
-015|handle_irq_event([X19] desc = 0xFFFFFFC0FA892200 = end+0x40F0180200)
-016|cond_unmask_eoi_irq(inline)
-016|handle_fasteoi_irq([X21] desc = 0xFFFFFFC0FA892200 = end+0x40F0180200)
-017|__handle_domain_irq([X20] domain = 0xFFFFFFC005FF9800 = end+0x3FFB8E7800, ?, [X22] lookup = TRUE, [X
---|end of frame

Instruction set:-
NSX:FFFFFF8008B04A98|F942CA88 ldr x8,[x20,#0x590] ; x8,[mmc,#1424] 
-->>x8 = 0xFFFFFFC0F76B4000+0x590
= 0xFFFFFFC0F76B4590 (correct address)
NSX:FFFFFF8008B04A9C|F0007220 adrp x0,0xFFFFFF800994B000
NSX:FFFFFF8008B04AA0|B9432662 ldr w2,[x19,#0x324] ; w2,[host,#804]
NSX:FFFFFF8008B04AA4|910C4C00 add x0,x0,#0x313 ; x0,x0,#787
NSX:FFFFFF8008B04AA8|394CA264 ldrb w4,[x19,#0x328] ; w4,[host,#808]
NSX:FFFFFF8008B04AAC|F9400108 ldr x8,[x8] ---->> point of crash //x8=0x0

Change-Id: I9f8edc96c2da93caf423a78610dead0d30921542
Signed-off-by: a17671 <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/1635488
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:12 -03:00
huangzq2 4a736b3596 Change ION fill mark from 100M to 16M to reduce the Lost RAM
Change-Id: I81823f124b16a6ba3a2fa232b47e1877d816cd9b
Signed-off-by: huangzq2 <huangzq2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1638222
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:12 -03:00
liujg6 fcadaaf1c2 arm/defconfig: cebu: init kernel deconfig
add cebu kernel config files
enable cebu dtb

Change-Id: Ie7b8d3db3211d58353f92173d8b4bbf7f84bea8b
Reviewed-on: https://gerrit.mot.com/1630565
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:47:12 -03:00