Commit graph

916,600 commits

Author SHA1 Message Date
Alessio Balsini
1f784ca6da FROMLIST: fuse: Allocate unl(CR) used ioctl number for passthrough V1
The current UAPI interface for FUSE passthrough is still under
discussion upstream, thus we are reserving this ioctl number to avoid
future conflicts with user space binaries.
The user space implementation in Android will take care of doing all the
checking to fall into the most appropriate ioctl number.

Mot-CRs-fixed: (CR)
Bug: 167695973
Link: https://lore.kernel.org/lkml/20210125153057.3623715-3-balsini@android.com/
Fixes: 9655e27a40d2 ("FROMLIST: fuse: Definitions and ioctl for passthrough")
Test: manual test with additional printks
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I658c5ab2ebfe2b76d20685a099ac1b1fee3549cc
Reviewed-on: https://gerrit.mot.com/2014525
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:10 +08:00
Alessio Balsini
201597f6c8 FROMLIST: fuse: Fix crediantials leak in passthrough read_iter
If the system doesn't have enough memory when fuse_passthrough_read_iter
is requested in asynchronous IO, an error is directly returned without
restoring the caller's credentials.
Fix by always ensuring credentials are restored.

Mot-CRs-fixed: (CR)
Fixes: 10b1e569ef010c240bfdaf1de1fb2360a4d08ead ("FROMLIST: fuse: Use daemon creds in passthrough mode")
Link: https://lore.kernel.org/lkml/YB0qPHVORq7bJy6G@google.com/
Reported-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Alessio Balsini <balsini@android.com>
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I4aff43f5dd8ddab2cc8871cd9f81438963ead5b6
Reviewed-on: https://gerrit.mot.com/2014524
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:10 +08:00
Alessio Balsini
7506f2d96b FROMLIST: fuse: Introduce passthrough for mmap
Enabling FUSE passthrough for mmap-ed operations not only affects
performance, but has also been shown as mandatory for the correct
functioning of FUSE passthrough.
yanwu noticed [1] that a FUSE file with passthrough enabled may suffer
data inconsistencies if the same file is also accessed with mmap. What
happens is that read/write operations are directly applied to the lower
file system (and its cache), while mmap-ed operations are affecting the
FUSE cache.

Extend the FUSE passthrough implementation to also handle memory-mapped
FUSE file, to both fix the cache inconsistencies and extend the
passthrough performance benefits to mmap-ed operations.

[1] https://lore.kernel.org/lkml/20210119110654.11817-1-wu-yan@tcl.com/

Mot-CRs-fixed: (CR)
Bug: 168023149
Link: https://lore.kernel.org/lkml/20210125153057.3623715-9-balsini@android.com/
Signed-off-by: Alessio Balsini <balsini@android.com>
Change-Id: Ifad4698b0380f6e004c487940ac6907b9a9f2964
Signed-off-by: Alessio Balsini <balsini@google.com>
Reviewed-on: https://gerrit.mot.com/2014523
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:10 +08:00
Alessio Balsini
6296c14ca0 FROMLIST: fuse: Use daemon creds in passthrough mode
When using FUSE passthrough, read/write operations are directly
forwarded to the lower file system file through VFS, but there is no
guarantee that the process that is triggering the request has the right
permissions to access the lower file system. This would cause the
read/write access to fail.

In passthrough file systems, where the FUSE daemon is responsible for
the enforcement of the lower file system access policies, often happens
that the process dealing with the FUSE file system doesn't have access
to the lower file system.
Being the FUSE daemon in charge of implementing the FUSE file
operations, that in the case of read/write operations usually simply
results in the copy of memory buffers from/to the lower file system
respectively, these operations are executed with the FUSE daemon
privileges.

This patch adds a reference to the FUSE daemon credentials, referenced
at FUSE_DEV_IOC_PASSTHROUGH_OPEN ioctl() time so that they can be used
to temporarily raise the user credentials when accessing lower file
system files in passthrough.
The process accessing the FUSE file with passthrough enabled temporarily
receives the privileges of the FUSE daemon while performing read/write
operations. Similar behavior is implemented in overlayfs.
These privileges will be reverted as soon as the IO operation completes.
This feature does not provide any higher security privileges to those
processes accessing the FUSE file system with passthrough enabled. This
is because it is still the FUSE daemon responsible for enabling or not
the passthrough feature at file open time, and should enable the feature
only after appropriate access policy checks.

Mot-CRs-fixed: (CR)
Bug: 168023149
Link: https://lore.kernel.org/lkml/20210125153057.3623715-8-balsini@android.com/
Signed-off-by: Alessio Balsini <balsini@android.com>
Change-Id: Idb4f03a2ce7c536691e5eaf8fadadfcf002e1677
Signed-off-by: Alessio Balsini <balsini@google.com>
Reviewed-on: https://gerrit.mot.com/2014522
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:10 +08:00
Alessio Balsini
0c66e8e771 FROMLIST: fuse: Handle asynchronous read and write in passthrough
Extend the passthrough feature by handling asynchronous IO both for read
and write operations.

When an AIO request is received, if the request targets a FUSE file with
the passthrough functionality enabled, a new identical AIO request is
created. The new request targets the lower file system file and gets
assigned a special FUSE passthrough AIO completion callback.
When the lower file system AIO request is completed, the FUSE
passthrough AIO completion callback is executed and propagates the
completion signal to the FUSE AIO request by triggering its completion
callback as well.

Mot-CRs-fixed: (CR)
Bug: 168023149
Link: https://lore.kernel.org/lkml/20210125153057.3623715-7-balsini@android.com/
Signed-off-by: Alessio Balsini <balsini@android.com>
Change-Id: I47671ef36211102da6dd3ee8b2f226d1e6cd9d5c
Signed-off-by: Alessio Balsini <balsini@google.com>
Reviewed-on: https://gerrit.mot.com/2014521
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:10 +08:00
Alessio Balsini
ca9fac415f FROMLIST: fuse: Introduce synchronous read and write for passthrough
All the read and write operations performed on fuse_files which have the
passthrough feature enabled are forwarded to the associated lower file
system file via VFS.

Sending the request directly to the lower file system avoids the
userspace round-trip that, because of possible context switches and
additional operations might reduce the overall performance, especially
in those cases where caching doesn't help, for example in reads at
random offsets.

Verifying if a fuse_file has a lower file system file associated with
can be done by checking the validity of its passthrough_filp pointer.
This pointer is not NULL only if passthrough has been successfully
enabled via the appropriate ioctl().
When a read/write operation is requested for a FUSE file with
passthrough enabled, a new equivalent VFS request is generated, which
instead targets the lower file system file.
The VFS layer performs additional checks that allow for safer operations
but may cause the operation to fail if the process accessing the FUSE
file system does not have access to the lower file system.

This change only implements synchronous requests in passthrough,
returning an error in the case of asynchronous operations, yet covering
the majority of the use cases.

Mot-CRs-fixed: (CR)
Bug: 168023149
Link: https://lore.kernel.org/lkml/20210125153057.3623715-6-balsini@android.com/
Signed-off-by: Alessio Balsini <balsini@android.com>
Change-Id: Ifbe6a247fe7338f87d078fde923f0252eeaeb668
Signed-off-by: Alessio Balsini <balsini@google.com>
Reviewed-on: https://gerrit.mot.com/2014520
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:10 +08:00
Alessio Balsini
57f2f8db34 FROMLIST: fuse: Passthrough initialization and release
Implement the FUSE passthrough ioctl that associates the lower
(passthrough) file system file with the fuse_file.

The file descriptor passed to the ioctl by the FUSE daemon is used to
access the relative file pointer, that will be copied to the fuse_file
data structure to consolidate the link between the FUSE and lower file
system.

To enable the passthrough mode, user space triggers the
FUSE_DEV_IOC_PASSTHROUGH_OPEN ioctl and, if the call succeeds, receives
back an identifier that will be used at open/create response time in the
fuse_open_out field to associate the FUSE file to the lower file system
file.
The value returned by the ioctl to user space can be:
- > 0: success, the identifier can be used as part of an open/create
reply.
- <= 0: an error occurred.
The value 0 represents an error to preserve backward compatibility: the
fuse_open_out field that is used to pass the passthrough_fh back to the
kernel uses the same bits that were previously as struct padding, and is
commonly zero-initialized (e.g., in the libfuse implementation).
Removing 0 from the correct values fixes the ambiguity between the case
in which 0 corresponds to a real passthrough_fh, a missing
implementation of FUSE passthrough or a request for a normal FUSE file,
simplifying the user space implementation.

For the passthrough mode to be successfully activated, the lower file
system file must implement both read_iter and write_iter file
operations. This extra check avoids special pseudo files to be targeted
for this feature.
Passthrough comes with another limitation: no further file system
stacking is allowed for those FUSE file systems using passthrough.

Mot-CRs-fixed: (CR)
Bug: 168023149
Link: https://lore.kernel.org/lkml/20210125153057.3623715-5-balsini@android.com/
Signed-off-by: Alessio Balsini <balsini@android.com>
Change-Id: I4d8290012302fb4547bce9bb261a03cc4f66b5aa
Signed-off-by: Alessio Balsini <balsini@google.com>
Reviewed-on: https://gerrit.mot.com/2014519
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:10 +08:00
Alessio Balsini
4e210ad39e FROMLIST: fuse: Definitions and ioctl for passthrough
Expose the FUSE_PASSTHROUGH interface to user space and declare all the
basic data structures and functions as the skeleton on top of which the
FUSE passthrough functionality will be built.

As part of this, introduce the new FUSE passthrough ioctl, which allows
the FUSE daemon to specify a direct connection between a FUSE file and a
lower file system file. Such ioctl requires user space to pass the file
descriptor of one of its opened files through the fuse_passthrough_out
data structure introduced in this patch. This structure includes extra
fields for possible future extensions.
Also, add the passthrough functions for the set-up and tear-down of the
data structures and locks that will be used both when fuse_conns and
fuse_files are created/deleted.

Mot-CRs-fixed: (CR)
Bug: 168023149
Link: https://lore.kernel.org/lkml/20210125153057.3623715-4-balsini@android.com/
Signed-off-by: Alessio Balsini <balsini@android.com>
Change-Id: I732532581348adadda5b5048a9346c2b0868d539
Signed-off-by: Alessio Balsini <balsini@google.com>
Reviewed-on: https://gerrit.mot.com/2014518
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:10 +08:00
Alessio Balsini
0ea440c499 FROMLIST: fuse: 32-bit user space ioctl compat for fuse device
With a 64-bit kernel build the FUSE device cannot handle ioctl requests
coming from 32-bit user space.
This is due to the ioctl command translation that generates different
command identifiers that thus cannot be used for direct comparisons
without proper manipulation.

Explicitly extract type and number from the ioctl command to enable
32-bit user space compatibility on 64-bit kernel builds.

Mot-CRs-fixed: (CR)
Bug: 168023149
Link: https://lore.kernel.org/lkml/20210125153057.3623715-3-balsini@android.com/
Signed-off-by: Alessio Balsini <balsini@android.com>
Change-Id: I595517c54d551be70e83c7fcb4b62397a3615004
Signed-off-by: Alessio Balsini <balsini@google.com>
Reviewed-on: https://gerrit.mot.com/2014517
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:10 +08:00
Alessio Balsini
7ffec8cda3 FROMLIST: fs: Generic function to convert iocb to rw flags
OverlayFS implements its own function to translate iocb flags into rw
flags, so that they can be passed into another vfs call.
With commit ce71bfea207b4 ("fs: align IOCB_* flags with RWF_* flags")
Jens created a 1:1 matching between the iocb flags and rw flags,
simplifying the conversion.

Reduce the OverlayFS code by making the flag conversion function generic
and reusable.

Mot-CRs-fixed: (CR)
Bug: 168023149
Link: https://lore.kernel.org/lkml/20210125153057.3623715-2-balsini@android.com/
Signed-off-by: Alessio Balsini <balsini@android.com>
Change-Id: I74aefeafd6ebbda2fbabee9024474dfe4cc6c2a7
Signed-off-by: Alessio Balsini <balsini@google.com>
Reviewed-on: https://gerrit.mot.com/2014516
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:10 +08:00
louhs1
7d796959be defconfig/rhodei: enable CHACHA20 crypto config
enable CHACHA20 crypto config
fix the CTS issue: CtsNetTestCases

Change-Id: I6697ca597eaddcb661e5493b1ca6dcaa15a4f920
Signed-off-by: louhs1 <louhs1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2293157
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yiqiang Feng <fengyq4@Lenovo.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:10 +08:00
caoqian4
91f3738276 configs: vendor/ext_config: init configuration for Penang to pass build
Init config for new product penang
Base on milanf

Change-Id: I410d125be762d36c9947c83b6cba91eea194fd95
Signed-off-by: caoqian4 <caoqian4@motorola.com>
Reviewed-on: https://gerrit.mot.com/2291641
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
2024-04-18 14:45:10 +08:00
liaohj
143da9c58f configs/rhodep: config aw882xx mapsize 16k
after aw882xx algo update to support get algo params from ram.
need enlarge afe mapsize to 16k.

Change-Id: I7079aaf7a2d239c90ce99d035f2d870e8b376ad7
Signed-off-by: liaohj <liaohj@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2262544
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wanlong Zhou <zhouwl@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:10 +08:00
xieqiong2
2bea5829da iio:add bc12 type read iio.
add bc12 type read iio
seperately

Change-Id: I72d0028ce0c58422671b5d6b5dc05f121df38752
Signed-off-by: xieqiong2 <xieqiong2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2273525
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
2024-04-18 14:45:10 +08:00
mahj8
f782bfe097 kernel: add PD VDM VERIFY IIO channel
add PD VDM VERIFY IIO channel
for moto protocol verify

Change-Id: Ieee4f7a4ae8d2f97ac7b08a7a96a126b5f191e77
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2259795
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:10 +08:00
zhucc2
d18b44a46b arm64/config: enable Micron HID on miami.
Miami have two Micron umcp, need enable HID function.
1.MT128GAXAU2U227Y  8+128
2.MT256GAXAU4U2281  8+256

Change-Id: Ic52a1f832e102c8870f5c4cd4b3351f6d7a901f0
Reviewed-on: https://gerrit.mot.com/2251006
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:09 +08:00
zhucc2
9cc8a19a74 arm64/config: disable SamSung TW and switch to WB
On Android S, SamSung TW performance is abnormal, after write about 30GB data continually,
the sequent write performance will drop from 450MB/s to 200MB/s.
After switch to WB, the sequent write speed will keep 450MB/s.

Change-Id: Ib0eec3aa3d737b740fb6691c408ba98422affad0
Reviewed-on: https://gerrit.mot.com/2251000
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:09 +08:00
chenlj26
614f40bfb8 camera-kernel: miami: front camera ov32c4c and ov32b40 compatible
details:
add kernel macro CONFIG_CAMERA_CCI_ADDR_SWITCH=y for ov32c4c used
front camera ov32c4c and ov32b40 compatible
front camera ov32c4c bring up on 8350 baseline

Change-Id: I92e2706e59edcf7914513d23ba774340e2024d3f
Signed-off-by: chenlj26 <chenlj26@motorola.com>
Reviewed-on: https://gerrit.mot.com/2246391
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Liu <liuwang2@lenovo.com>
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:09 +08:00
sunyue5
1fe500f6a4 remove "sock_from_file" symbol from qc white list
As this symbol has still not been supported in the lastest GKI
abi symbol manifest file, we have to implement this function
by ourselves

Change-Id: I1d898e0d3082815722c42d58ad22acf832379cbf
Signed-off-by: sunyue5 <sunyue5@motorola.com>
Reviewed-on: https://gerrit.mot.com/2245023
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Daniel Finimundi <danielrf@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit 765bedbc5102b33d1f11a59b949b5f43d11e5172)
Reviewed-on: https://gerrit.mot.com/2246086
Reviewed-by: Bin Liu <liubin7@motorola.com>
Reviewed-by: Yue Sun <sunyue5@lenovo.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
2024-04-18 14:45:09 +08:00
sunyue5
480c466493 abi: Fix wlan module build error in GKI build
qca_cld3_xxx.ko compile failure when make user build add whitelist

ERROR: "init_task" [../../vendor/qcom/opensource/wlan/qcacld-3.0/.qca6390/wlan.ko] undefined!
ERROR: "sock_from_file" [../../vendor/qcom/opensource/wlan/qcacld-3.0/.qca6390/wlan.ko] undefined!

Change-Id: Icb2c09bf24325d243939bec6c69a9ca36abce4c8
Signed-off-by: sunyue5 <sunyue5@motorola.com>
Reviewed-on: https://gerrit.mot.com/2244333
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit c284adb02295bb3957431144862ae19c96420a1e)
Reviewed-on: https://gerrit.mot.com/2244347
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:45:09 +08:00
mahj8
5f1f1dd223 kernel: export some api for user version build
As user version build error, so export some api
for miami

Change-Id: Icec594c6bde56e47baad6e482f486f8987761110
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2241288
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:09 +08:00
chenlj26
5935a56005 camera-kernel: sm6375/sm4350pro/sm4350: prevent read sensor id failure
-add CONFIG_CAM_SENSOR_PROBE_RETRY to increase times of sensor id matching
-relate product: corfu 5G/cyprus 5G/Cyprus 5G ip68/denver/ibiza-cmcc-extra
/ibiza/miami/rhode 5G/rhode 5G India/rhode 5G+

Change-Id: I94621d96c39413f25d2dc68ba226fb43c99f35ce
Signed-off-by: chenlj26 <chenlj26@motorola.com>
Reviewed-on: https://gerrit.mot.com/2240810
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Liu <liuwang2@lenovo.com>
Reviewed-by: Pengfei Qiao <qiaopf1@motorola.com>
Reviewed-by: <yangmf3@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:09 +08:00
zhouwl
48d7fc4374 fsa4480: change io-channel-names
Due to dtsi property name need to change according to
iio-channels usage, change this name:
typec_accessory_mode -> typec_accessory_mode.

Change-Id: I67c220b7b34257bd74ee7536662fddfb7f71883b
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2234591
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:09 +08:00
gaoyx9
3777eba3b1 Revert "UPSTREAM: binder: fix the missing BR_FROZEN_REPLY in binder_return_strings"
This reverts commit a4e84758f0.

Change-Id: Ibe3b8e21f0d42086816e0cd18b08e42457414b1c
Reviewed-on: https://gerrit.mot.com/2235002
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Submit-Approved: Jira Key
Tested-by: Jira Key
Reviewed-by: Lianlu Chen <chenll4@lenovo.com>
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
2024-04-18 14:45:09 +08:00
zhucc2
9b3f7b1f51 arm64/config: disable SamSung TW and switch to WB
On Android S, SamSung TW performance is abnormal, after write about 30GB data continually,
the sequent write performance will drop from 450MB/s to 200MB/s.
After switch to WB, the sequent write speed will keep 450MB/s.

Change-Id: I9833411a5f0acb37c33b45fa4fb9de39fbe5f27e
Reviewed-on: https://gerrit.mot.com/2232146
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:09 +08:00
hansx3
58d21ba28a rhodei: Separate QUPAC configuration for rhodei
TZ protect gpio45,46,56,57 for NFC SPI,
but the four of them are used for camera sensor power supply.
So we need to configure the QUPAC for TZ gpio protection removement.

Change-Id: Idab704e62bcab80259d9e9495e4d4431dc2e6a9c
Signed-off-by: hansx3 <hansx3@Lenovo.com>
Reviewed-on: https://gerrit.mot.com/2227603
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: XiaoFeng Wang <wangxf32@lenovo.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
2024-04-18 14:45:09 +08:00
chenlj26
e09793dbe3 Revert "(CR): camera-kernel: miami: add miami config for front camera"
This reverts commit aefc1ffdaecc61c26bf03f4e61d2854611af31fe.

Change-Id: I5059d5748cc88f156a68e798531f4629bfb66510
Reviewed-on: https://gerrit.mot.com/2229683
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:09 +08:00
xieqiong2
af15f14fb0 power:add read usbin iio channel.
Add the iio channel to read usbin voltage
from charger protocol IC.

Change-Id: Ifa1ac9eba4abb351387e0b1d54e283ac5fa73c38
Signed-off-by: xieqiong2 <xieqiong2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2228543
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:09 +08:00
chenlj26
49dcf205a6 camera-kernel: miami: add miami config for front camera
-add CONFIG_CAMERA_CCI_ADDR_SWITCH

Change-Id: I8f351b15baeba582da115432739600ae722dd007
Signed-off-by: chenlj26 <chenlj26@motorola.com>
Reviewed-on: https://gerrit.mot.com/2218762
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Wang Liu <liuwang2@lenovo.com>
Tested-by: Jira Key
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:09 +08:00
xieqiong2
1f4650c0ce charge:add bc12 detect channel definition.
add bc12 charge type detect iio channel
for bc1.2 protocol.

Change-Id: I55577363ab6634547b8a4fb9244590d79c2c9ff7
Signed-off-by: xieqiong2 <xieqiong2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2224727
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
2024-04-18 14:45:09 +08:00
louhs1
2153e67f78 miami: enable CONFIG_MIAMI_DTB
remark:
enable CONFIG_MIAMI_DTB for miami project

Change-Id: I3badc03ff0b88e95a3c024e34c0b6144a238d9bc
Signed-off-by: louhs1 <louhs1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2219968
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:09 +08:00
Chandana Kishori Chiluveru
e3a3006814 serial: msm_geni_serial: Update QUP clock ON/OFF sequence
This change is to update QUP clock ON/OFF sequence as per
recommendations. Disable the divider before SE clk off and
then enable it after SE clk ON.

CRs-Fixed: 3071458
Mot-CRs-fixed: (CR)

Change-Id: I5fd82be33d49de7a48159be969910097e88ab255
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
Reviewed-on: https://gerrit.mot.com/2216220
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Bin Liu <liubin7@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:09 +08:00
mahj8
45a4fa6351 arm/config: remove wt6670 ic for rhodep
remove wt6670 ic for rhodep,
because rhodep use sw solution.

Change-Id: Ib79dd6aab13e3c9c2e68ba0591400b193c0e3b81
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2215964
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:09 +08:00
Yiqiang Feng
c8bb17e9b8 arm64/defconfig: remove unused novatek touch configs
rhodei/defconfig:
Bringup nova touchscreen,need to mask unused touch config.
CONFIG_TOUCHSCREEN_NT36XXX, to avoid conflict with nova ko driver.

Change-Id: I080c4bd8644ec406612dc3da931ab10cba9e6db4
Signed-off-by: Yiqiang Feng <fengyq4@Lenovo.com>
Reviewed-on: https://gerrit.mot.com/2213476
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Tested-by: Jira Key
Reviewed-by: Hongshu Lou <louhs1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:09 +08:00
wanggc6
114fd7f2f7 config:Disable CONFIG_QCOM_I2C_NACK_ERR_WA
Disable CONFIG_QCOM_I2C_NACK_ERR_WA ,
because miami does not use wt6670
 (deivers/i2c/busses/i2c-msm-geni.c).

Change-Id: Ie7b48f925bc12e0766fbe9a36a2946e320db51d9
Signed-off-by: wanggc6 <wanggc6@motorola.com>
Reviewed-on: https://gerrit.mot.com/2212326
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
2024-04-18 14:45:09 +08:00
Chuanchun Zhu
30f7d6785f Revert "(CR) arm64/config: remove unnecessary configs"
Mot-CRs-fixed: (CR)

This reverts commit 1a13b7346498e3d6251d8f1eed2542a98d79458d.

Change-Id: Ie124b37c71403889187eadbc53f79ed44afebf96
Reviewed-on: https://gerrit.mot.com/2208380
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:08 +08:00
louhs1
4b2c8bda0a Rhodei change the kernel config from rhodec
remark:
change kernel config based rhodec

Change-Id: Ic76a6580da2a8fbe2bc051ac5f14c04520a97cf2
Signed-off-by: louhs1 <louhs1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2203000
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:08 +08:00
zhoujs3
4148db0fd2 Bring up miami on sm2021
Init config for new product miami
Base on rhodep

Change-Id: I680b5e4d272007f0e99b98609bbd7abf0ce8b7c4
Signed-off-by: zhoujs3 <zhoujs3@motorola.com>
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Submit-Approved: Jira Key
Tested-by: Jira Key
Reviewed-on: https://gerrit.mot.com/2205187
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
2024-04-18 14:45:08 +08:00
louhs1
4b7a563db6 defconfig/rhode5g enable CHACHA20 crypto config
enable CHACHA20 crypto config
fix the CTS issue:CtsNetTestCases

Change-Id: I947d6a45964c425c7e5c8522f3b97c93a72393be
Signed-off-by: louhs1 <louhs1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2203787
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Chuanchun Zhu <zhucc2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:08 +08:00
zhucc2
46e26d31e7 arm64/config: remove unnecessary configs
QC case: 05726418:
QC suggest to disbale below configs on user build to improve performance:
1. CONFIG_DEBUG_STACK_USAGE
2. CONFIG_DEBUG_MEMORY_INIT
3. CONFIG_LOCKUP_DETECTOR

however, CONFIG_SOFTLOCKUP_DETECTOR need disbale, or CONFIG_LOCKUP_DETECTOR will
auto selected.

Change-Id: I4b00cdad78c01791ba8e63846ccc76338ed9e138
Reviewed-on: https://gerrit.mot.com/2202807
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:08 +08:00
wangwang1
556a8e2870 kernel:ram overwritten by TZ logs
Ibiza and Denver have some crashes related to memory. We noticed that the
crashes only appeared in build user, as these devices use the same kernel
version, we propagated to the br-4350 branch and we will monitor future issues.

PROPAGATED_from (CR)

In SM7325 platform, there are lots of random crash issues on user build,
and not reproduced in userdebug builds.

in 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: I6c9bb8e44f77d9f68da8fc1f5e1d57a15666cb13
Signed-off-by: wangwang1 <wangwang1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1836661
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Signed-off-by: xizx <xizx@motorola.com>
Reviewed-on: https://gerrit.mot.com/1961925
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Signed-off-by: Robert Cabral <robertc@motorola.com>
Reviewed-on: https://gerrit.mot.com/2193587
2024-04-18 14:45:08 +08:00
panyq6
985c58b952 Rhode5g of india sku(rhodei)initial kernel defconfig
initial configs base on rhodep

Change-Id: I9bead9193552d7fe521e3a64780af849d4f700be
Reviewed-on: https://gerrit.mot.com/2193951
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: panyq6 <panyq6@motorola.com>
2024-04-18 14:45:08 +08:00
Sarthak Garg
1f59df2378 mmc: sdhci-msm: Send a disable vote to make RMP driver consistent
Removing SD card at UEFI/XBL stage can lead to regulator getting turned off
due to MGPI but RPM isn't aware of that.
Kernel comes up with vote_count = 0 and we call enable API but RPM
ignores this thinking that it is already turned on leading the vdd
regulator in OFF state despite our vote.
CMD timeouts are seen in our sd_init path due to this and card detection
fails.

After the first enable vote, send a disable vote followed by re-enable
vote to make the RPM driver consistent with the regulator state.

Change-Id: Ifb761d07f13daa271c10c5454195f9e55ef17833
Signed-off-by: Sarthak Garg <quic_sartgarg@quicinc.com>
Reviewed-on: https://gerrit.mot.com/2193867
Reviewed-by: Chuanchun Zhu <zhucc2@motorola.com>
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:08 +08:00
liuyc20
e0e0f33517 usb: remove LowPowMode when usb into host mode
01-25 15:40:18.596     0     0 I hub 3-0 : 1.0: USB hub found
01-25 15:40:18.597     0     0 I hub 3-0 : 1.0: 1 port detected
01-25 15:40:18.602     0     0 E msm_dwc3_perf_vote_update: latency updated to: 61
01-25 15:40:19.834     0     0 E msm-dwc3 4e00000.ssusb: DWC3-msm runtime idle
01-25 15:40:19.834     0     0 E msm-dwc3 4e00000.ssusb: DWC3-msm runtime suspend
typc-c headset connect failed sometimes,from above log,
the dwc3 into suspend mode when usb in host mode

QC case : 05701211

Change-Id: Id6c6f6bd9d49bfc303e329186491427115dc9d72
Signed-off-by: liuyc20 <liuyc20@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2190504
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
2024-04-18 14:45:08 +08:00
xiewen3
acad346aa3 devconfig: enable CHACHA20 crypto configs
Port from (CR)

enable CHACHA20 Crypto support
Fix cts cases: CtsNetTestCases

Change-Id: I9d0676e25d4e5753457d289adbf90f46b570d8f9
Signed-off-by: xiewen3 <xiewen3@motorola.com>
Reviewed-on: https://gerrit.mot.com/2189669
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/2190849
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:45:08 +08:00
liaohs
1f76f16f57 Revert "i2c: i2c-msm-geni: Do i2c transfer if GENI IOS in proper state"
GENI IOs read register - Allows a mean to SW for reading current GENI IOs
DATA might not reflect current bus status due to synchronization delay.
Let's revert it and monitor I2C crash issue some time .

This reverts commit 5ad2f9de06.

Change-Id: Ie4c9788976a0054dc7c945623b4d0562568f331d
Reviewed-on: https://gerrit.mot.com/2180331
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Reviewed-by: Minghui Wei <weimh1@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:08 +08:00
liuwang2
d84f09e293 arm64/config: milanf: disable ois vsync irq in factory build
[detail]
disable ois vsync irq in factory build

Change-Id: Ie131905c16eeecbb577fcb1a3b6044e5f5e48836
Signed-off-by: liuwang2 <liuwang2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2179331
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: <zhaoxy41@motorola.com>
Reviewed-by: XiaoFeng Wang <wangxf32@lenovo.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: gaoyx9 <gaoyx9@motorola.com>
2024-04-18 14:45:08 +08:00
liuwang2
ad64b620a6 arm64/config: rhodep: disbale ois vsync irq in factory build
[detail]
disbale ois vsync irq in factory build

Change-Id: I41fa1c69719270028eff61feb84f0a5ef721b796
Signed-off-by: liuwang2 <liuwang2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2179330
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: <zhaoxy41@motorola.com>
Reviewed-by: XiaoFeng Wang <wangxf32@lenovo.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: gaoyx9 <gaoyx9@motorola.com>
2024-04-18 14:45:08 +08:00
jixj
e5ab5b3421 fs: Remove "bind" flag check
Felica requires also prevent mount external storage to these
paths. The external storage mount is a real block device
instead of bind, so remove the "bind" check.

The secid of "u:r:su:s0" equals "u:r:init:s0" at init first stage,
it will also prevent the init first stage mount, only when current
secid is not same as "u:r:init:s0" and same as "u:r:su:s0", we
prevents the mount.

The below commands should be blocked.
adb shell mount -r -w /dev/block/vold/public:179,1 /system
adb shell mount -r -w /dev/block/vold/public:179,1 /system_ext
adb shell mount -r -w /dev/block/vold/public:179,1 /product
adb shell mount -r -w /dev/block/vold/public:179,1 /vendor

Change-Id: I0e3ca33b0dd4bd67910a9d2296e297cda542016a
Reviewed-on: https://gerrit.mot.com/2177550
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:08 +08:00
jixj
4c912f3429 fs: Check absolute path
The dir parameter passed maybe a relative path, so check
absolute path.

Change-Id: Ia413a97f5787aa2e6c7072485b715fe393a13cfe
Reviewed-on: https://gerrit.mot.com/2177549
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:08 +08:00