This reverts commit 1957601e86ae219cdbf83594bff8d1db9c418400.
We will fix the issue by adding related dts configuration on i2c_7.
Change-Id: I197b88025ad89f5a73c87a0c95fe3a2fb2218dec
Signed-off-by: wuwl10 <wuwl10@motorola.com>
Reviewed-on: https://gerrit.mot.com/1985492
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Since qcom baseline upgrade import the change which will
return -EACCESS when system in suspend to transfer spi message,
and this will conflict with single tap feature. For keep performance
and logic consistent with before, remove the new logic introduced
by Qcom after discussion with Qcom(SR: 05267011)
Change-Id: I6cbf9ca51b62dd9ca9519c762147f83cf3f47831
Signed-off-by: wengjun1 <wengjun1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1979369
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
The product is designed with charging pump and use
internal QG. If we don't disable CP, QG can't get valid
ESR value when CP enabe.
Porting from (CR)
Change-Id: I27ea8ae254555afdf37676124a859ce3a179fc76
Reviewed-on: https://gerrit.mot.com/1978508
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This reverts commit 152fd8f044.
Reason for revert: rolling the three fixes into one with feature flag
Bug: 174692664
Test: incfs_test passes
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I9a2e6faa0c2293b691efca8e985390fd94bcf01a
Mot-CRs-fixed: (CR)
Reviewed-on: https://gerrit.mot.com/1975977
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: gaoyx9 <gaoyx9@motorola.com>
Submit-Approved: gaoyx9 <gaoyx9@motorola.com>
Tested-by: gaoyx9 <gaoyx9@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
This reverts commit 75c93eb439.
Reason for revert: rolling the three fixes into one with feature flag
Bug: 174692664
Test: incfs_test passes
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I838bed85d6682aba44165a58c22e6a0e10c49d58
Mot-CRs-fixed: (CR)
Reviewed-on: https://gerrit.mot.com/1975975
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: gaoyx9 <gaoyx9@motorola.com>
Submit-Approved: gaoyx9 <gaoyx9@motorola.com>
Tested-by: gaoyx9 <gaoyx9@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Below change will cause i2c_7 bus hung.
Rever it change first until qcom provide new patch.
pinctrl: qcom: function group for qup11_f* instance for holi
This reverts commit 7a2620f882.
Change-Id: Ie7b47d1fc0dd6b3fe9537bf06ea6c79bff076773
Signed-off-by: wuwl10 <wuwl10@motorola.com>
Reviewed-on: https://gerrit.mot.com/1970100
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
-usbpd_get_pd_info:
get all PDO info from PD SOURCE, and save them to usbpd_pdo_info struct
-usbpd_select_pdo:
provide API to easy select the specific PDO, in order to program
its voltage and current.
Change-Id: I6663c04a9479b852449fa80e9e5c396ddfbc9e57
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1943692
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Could you please push this patch into stable@?
it fixes memory corruption in kernels v3.5 .. v4.10
Lost .data_len definition leads to write beyond end of
struct nf_ct_h323_master. Usually it corrupts following
struct nf_conn_nat, however if nat is not loaded it corrupts
following slab object.
In mainline this problem went away in v4.11,
after commit 9f0f3ebeda ("netfilter: helpers: remove data_len usage
for inkernel helpers") however many stable kernels are still affected.
Mot-CRs-fixed: (CR)
CVE-Fixed: CVE-2020-14305
Bug: 174904512
Change-Id: Ib96d3374766eecef01e92a4407ceca3f8e7c192e
Fixes: 1afc56794e ("netfilter: nf_ct_helper: implement variable length helper private data") # v3.5
cc: stable@vger.kernel.org
Reviewed-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Gajjala Chakradhar <gajjalac@motorola.com>
Reviewed-on: https://gerrit.mot.com/1957505
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Remark:
enable hpb and tw feature for corfu-5g and cypfg on mot4350
family.
disable for ibiza and denver, further project if reuse
currently baseline need define it accordingly.
Change-Id: I96b86b584521a88ba241b678f89332705e88e741
Signed-off-by: fuxm1 <fuxm1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1944778
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Since reading zram wb page is an async operation, we can not immediately
free the slot here. So we need to read the page via submit_bio and free
the slot in end_swap_bio_read. (bio chain will be used to handle bio here
and bio in zram driver for wb page).
Change-Id: I71b88c4a2388c086bd7e0cd63b8c632b93217a95
Signed-off-by: huangzq2 <huangzq2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1933720
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1952123
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
device name "cyprus" was already used by ODM1 project.
So need change device name from cyprus to cypfg for Cyprus 5G project.
Change-Id: I7b4ce66495d3232b928e0b6fdcfaa44d0e16e7f7
Reviewed-on: https://gerrit.mot.com/1940602
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
1.factory support only userdebug build,so it will include
many debug configs which lead to boot slowly.
2.remove qcom debug files as perf when factory build.
Change-Id: I7be5d0ba2379d61051b2e3c9d9b2cab4b5c36445
Signed-off-by: weimh1 <weimh1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1932024
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yiwen Liu <liuyw2@motorola.com>
Reviewed-by: Shicheng Gong <gongsc1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
set CONFIG_ZRAM_WRITEBACK to y
This config will split zram-writeback features in zram driver
Change-Id: Id6bffe9a1f42909cd2154b68751ae6198a4040c6
Reviewed-on: https://gerrit.mot.com/1902519
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhizhong Ge <gezz1@motorola.com>
Reviewed-by: Bin Liu <liubin7@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
set CONFIG_ZRAM_WRITEBACK to y
This config will split zram-writeback features in zram driver
Change-Id: I74013e18a1ec8d8245fab72f471456a4707a9f02
Reviewed-on: https://gerrit.mot.com/1902517
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Zhizhong Ge <gezz1@motorola.com>
Submit-Approved: Jira Key
QCOM allows us to boot into EDL mode, however, there is no reason
to do so outside the bootloader. Disabling is good security practice and
required for tracfone security submission.
Change-Id: Id859e88e1140f68521c0fd146444b2f7af34aaa5
Reviewed-on: https://gerrit.mot.com/1900249
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Joel Voss <jvoss@motorola.com>
Submit-Approved: Jira Key
The zram pages on backing store can not be freed when swap in,
becase they have swap cache. So before these pages become drity,
they will be always read from swap cache or backing store. If
these pages happens to be swap out again, the swap cahce will be
deleted, then they can only be loaded from backing store, not zram.
Change-Id: I59a4ef1f7b6fb4ce803a56a7eaae7693a69780d4
Signed-off-by: huangzq2 <huangzq2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1900258
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/1902453
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Zhizhong Ge <gezz1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Zram is a ram based swap, but Zram with writeback is ram + IO
based swap, so we still need readhead for the pages on backing
store, the page-cluster should be tuned on each chipset if we
enabled zram wb, beside this, we made this patch to skip readahead
on the page which has not been writebacked.
Change-Id: Ia219baf888cfc6ef4865f7c4d682ab4384de893c
Signed-off-by: huangzq2 <huangzq2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1900257
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1902452
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Zhizhong Ge <gezz1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Afer Zram backing dev setuped, zram will be treated as a ASYNC IO
swap device, no longer SYNC IO device, because WB pages do have IO
operation on swap in, so the optimization on skiping swapcache
for fast swap device will no longer be applyed on such case.
Now we refactor this optimization, skip the swapcache by checking
SYNC IO state on each swap page via ioctl. Reuse ioctl because we
should not break the GKI.
Change-Id: Ia1dc351eafc7c0b62126a3864a6da9136c2bfe6d
Signed-off-by: huangzq2 <huangzq2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1898090
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Zhizhong Ge <gezz1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
We cannot guarantee the Trustonic nq kthread is always uninterruptable,
atomic and SMP safe, so that we will send the command to the SCM and
wait for the command to finish processing from secure world in case
the QSEE might be busy at that point. This can be used in pre-emptible
context when the Trustonic fast call is invoked to run whereby the scm
handler happens to be owned by other threads.
Change-Id: I0aac105684c7b8b7bed7ab2146b8ef62dab42837
Signed-off-by: quebs2 <quebs2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1902496
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jefferson Rodrigo Capovilla <jeffecap@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
When enable"low-bl-disable-cabc" function,We must set the brightness to
"low_bl_remap_percent" when under the low-bl.
Change-Id: Ie4b17b0a46479726059af686c6cc5503141a6b49
Reviewed-on: https://gerrit.mot.com/1900712
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
When "mmi,low-bl-delay-ms" is not defined, the value of
low_bl_delay_ms is uncertain.
Change-Id: I7c2c2d185a31d6a7db9e39960532ca65f49cf6a9
Signed-off-by: houdz1 <houdz1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1899598
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
unit power off failed when removed charger in factory mode.
Because google android R define CONFIG_STATIC_USERMODEHELPER
and CONFIG_STATIC_USERMODEHELPER_PATH = "", so sub_info->path
is always empty.
Change-Id: If06b3a52e657e083ce89f2f75f717c753a57d685
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1899604
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This change is not need. Because we have changed the code
to reach the goal at https://gerrit.mot.com/#/c/1899604/
Mot-CRs-fixed:(CR)
This reverts commit d80c7cd6d49b21e72e2b91e9e5c556dbeb5b5e85.
Change-Id: I3a58e7d0153f0751f2e8714669683a980b1bf736
Reviewed-on: https://gerrit.mot.com/1900615
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Tbase load was failing intermittently during fc_init() operation
in __smc() with error:
Trustonic TEE: ERROR -14 __smc: fc_init failed (4dee8000)
The root cause has two components
1- qcom_scm_call() needs to be done atomically. Task reschedule was
causing a failure. Thus changed to the atomic call qcom_scm_call_atomic().
2- Qcom scm_call requires cache maintenance. API attests that any buffers
that are expected to be accessed by the secure world must be flushed before
invoking qcom_scm_call and invalidated in the cache immediately after
qcom_scm_call returns. Cache invalidation was missing, hence add it.
Change-Id: I83139fc5110eb3af536a30800c994c8e451df1fa
Signed-off-by: quebs2 <quebs2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1899491
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
if a prject need extra config, please add to the extra config
for example:
moto-holi-ibiza-cmcc-extra.config
match TARGET_PRODUCT_TYPE:
cmcc
factory
retail
...
Change-Id: I6157eee802bfe4cd11c5d6b76b518b04353c9c27
Signed-off-by: louhs1 <louhs1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1898417
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yiwen Liu <liuyw2@motorola.com>
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
In kernel 5.4, the old qcom interface scm_call2() has been abandoned, so
add new function trustonic_smc_fastcall() for Trustonic TEE driver module,
and it will send syscall to the secure world through new qcom scm interface.
Change-Id: Ib76c00e9910be6796fc71bdcfaf4352fd8f2806c
Signed-off-by: linyx10 <linyx10@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1836283
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
These ABI are used in mcDrvModule.ko and they have been added to GKI whitelist,
so add them to qcom whitelist:
d_path
get_task_exe_file
get_task_mm
ktime_get_raw_ts64
mmput
release_pages
Change-Id: If1d64546756b658e4e726ee8abef452d79a9aa5c
Signed-off-by: linyx10 <linyx10@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1892816
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Binsheng Que <quebs2@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
This l(CR) breaks tracing tools l(CR) trace-cmd. It logs in the same
format but now addresses are all 0x0.
Bug: 34277115
MOT-CRs-fixed: (CR)
Change-Id: Ifb0d4d2a184bf0d95726de05b1acee0287a375d9
Reviewed-on: https://gerrit.mot.com/1887836
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1892775
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
On kernel 4.14, no matter sd card type, all use max discard value.
However, kernel 5.4 remove this logical, and will cause system watchdog,
if user format 512GB/1TB class 10 card.
Change-Id: Idc6b00187b8800465fca4af8f720aaf87db5700b
Reviewed-on: https://gerrit.mot.com/1890338
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Disable cabc only when adjust to low brightnss.
Don't disable cabc when screen off/on, this causes big
voltage issue on pm6150l/7150l.
Change-Id: I510ea8d1e3de1cee1a612fec6a08d50792b8b0af
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1873482
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hua Tan <tanhua1@motorola.com>
Submit-Approved: Jira Key
Reason: zram-writeback will make 3 side effects
1. Swapcached too large
2. May cause CTS fail
3. May cause panic
This reverts commit db753c431b0b778e4f1824efe79718b5e3864839.
Change-Id: I61c6d2eb0222d8bd4d749971bdf5ccaacee854ab
Reviewed-on: https://gerrit.mot.com/1873703
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhizhong Ge <gezz1@motorola.com>
Reviewed-by: Bingqian Yang <yangbq1@lenovo.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
Remark:
vold doformat() will call ioctl(BLKDISCARD) before unmount
this blocked sdhci layer for current driver.
So, set max_timeout_counter to 0 to ensure larger discard size by
always setting max_busy_timeout to zero.
the change is from temp patch drop by QC SR:05069564
next QC drop will include the formal patch. that time we can
drop this commit.
Change-Id: I2950b42c01e04bd9cfb9a2a739d00cd35da800f3
Signed-off-by: fuxm1 <fuxm1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1868453
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Chuanchun Zhu <zhucc2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key