Merge Android 14 QPR1
Merged-In: I12add8918fb1922029cbbee130be33a3a36e44a4 Bug: 315507370 Change-Id: I1327fae09a2fa96de643bce11ece9e98eaada3b2
This commit is contained in:
commit
3db3ce96a7
24 changed files with 770 additions and 113 deletions
|
@ -36,7 +36,6 @@ BOARD_KERNEL_CMDLINE += earlycon=exynos4210,0x10870000 console=ttySAC0,115200 an
|
|||
BOARD_KERNEL_CMDLINE += cma_sysfs.experimental=Y
|
||||
BOARD_KERNEL_CMDLINE += cgroup_disable=memory
|
||||
BOARD_KERNEL_CMDLINE += rcupdate.rcu_expedited=1 rcu_nocbs=all
|
||||
BOARD_KERNEL_CMDLINE += stack_depot_disable=off page_pinner=on
|
||||
BOARD_KERNEL_CMDLINE += swiotlb=1024
|
||||
BOARD_KERNEL_CMDLINE += cgroup.memory=nokmem
|
||||
BOARD_KERNEL_CMDLINE += sysctl.kernel.sched_pelt_multiplier=4
|
||||
|
@ -229,6 +228,9 @@ BOARD_USES_SYSTEM_DLKMIMAGE := true
|
|||
BOARD_SYSTEM_DLKMIMAGE_FILE_SYSTEM_TYPE := ext4
|
||||
TARGET_COPY_OUT_SYSTEM_DLKM := system_dlkm
|
||||
|
||||
# Testing related defines
|
||||
BOARD_PERFSETUP_SCRIPT := platform_testing/scripts/perf-setup/p23-setup.sh
|
||||
|
||||
#
|
||||
# AUDIO & VOICE
|
||||
#
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Android fstab file.
|
||||
# <src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
|
||||
# Create the specific fstab file for modem partition as flexibility
|
||||
/dev/block/platform/13200000.ufs/by-name/modem /mnt/vendor/modem_img ext4 ro,defaults,context=u:object_r:modem_img_file:s0,barrier=1 wait,slotselect
|
||||
/dev/block/platform/13200000.ufs/by-name/modem /mnt/vendor/modem_img ext4 noatime,ro,context=u:object_r:modem_img_file:s0 wait,slotselect
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
|
||||
#
|
||||
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
|
||||
system /system ext4 ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128
|
||||
system /system ext4 noatime,ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128
|
||||
# During compliance testing, the previous line would fail (because GSI is ext4), and the next line would be used to mount GSI.
|
||||
system /system ext4 ro,barrier=1 wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128
|
||||
system_dlkm /system_dlkm ext4 ro wait,slotselect,avb=vbmeta_system,avb_keys=no_such_key,logical,first_stage_mount,readahead_size_kb=128
|
||||
system_ext /system_ext ext4 ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128
|
||||
product /product ext4 ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128
|
||||
vendor /vendor ext4 ro wait,slotselect,avb=vbmeta_vendor,logical,first_stage_mount,readahead_size_kb=128
|
||||
vendor_dlkm /vendor_dlkm ext4 ro wait,slotselect,avb=vbmeta,avb_keys=no_such_key,logical,first_stage_mount
|
||||
system /system ext4 noatime,ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128
|
||||
system_dlkm /system_dlkm ext4 noatime,ro wait,slotselect,avb=vbmeta_system,avb_keys=no_such_key,logical,first_stage_mount,readahead_size_kb=128
|
||||
system_ext /system_ext ext4 noatime,ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128
|
||||
product /product ext4 noatime,ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128
|
||||
vendor /vendor ext4 noatime,ro wait,slotselect,avb=vbmeta_vendor,logical,first_stage_mount,readahead_size_kb=128
|
||||
vendor_dlkm /vendor_dlkm ext4 noatime,ro wait,slotselect,avb=vbmeta,avb_keys=no_such_key,logical,first_stage_mount
|
||||
/dev/block/platform/13200000.ufs/by-name/boot /boot emmc defaults slotselect,avb=boot,first_stage_mount
|
||||
/dev/block/platform/13200000.ufs/by-name/init_boot /init_boot emmc defaults slotselect,avb=init_boot,first_stage_mount
|
||||
/dev/block/platform/13200000.ufs/by-name/efs /mnt/vendor/efs f2fs noatime,sync wait,check,formattable
|
||||
|
|
|
@ -5,6 +5,7 @@ import init.exynos.sensorhub.rc
|
|||
on early-init
|
||||
mount_all /vendor/etc/fstab.persist --early
|
||||
write /proc/sys/kernel/sched_pelt_multiplier 1
|
||||
write /sys/kernel/mm/lru_gen/enabled n
|
||||
|
||||
on init
|
||||
# CPU0 cannot be offline
|
||||
|
@ -240,6 +241,7 @@ on init
|
|||
chown system system /sys/devices/platform/10970000.hsi2c/i2c-5/5-0050/eeprom
|
||||
chown system system /sys/devices/platform/10970000.hsi2c/i2c-4/4-0050/eeprom
|
||||
chown system system /sys/devices/platform/10da0000.hsi2c/i2c-6/6-0050/eeprom
|
||||
chown system system /sys/devices/platform/10c90000.hsi2c/i2c-6/6-0050/eeprom
|
||||
chown system system /sys/devices/platform/10c90000.hsi2c/i2c-7/7-0050/eeprom
|
||||
chown system system /dev/battery_history
|
||||
chmod 0644 /dev/battery_history
|
||||
|
@ -594,6 +596,10 @@ on boot
|
|||
chown audioserver system /sys/devices/platform/17c50000.abox/0.abox_debug/calliope_iva
|
||||
chown audioserver system /sys/kernel/debug/abox/log-00
|
||||
|
||||
# Change sched lib affinity
|
||||
write /proc/vendor_sched/sched_lib_name libunity.so
|
||||
write /proc/vendor_sched/sched_lib_mask_out 0x1f0
|
||||
|
||||
# Permission for USB SELECT
|
||||
chown system system /sys/class/android_usb/android0/enable
|
||||
chmod 0660 /sys/class/android_usb/android0/enable
|
||||
|
@ -835,10 +841,15 @@ on property:sys.boot_completed=1
|
|||
write /proc/vendor_sched/ug_bg_group_throttle ${persist.device_config.vendor_system_native.ug_bg_group_throttle:-308}
|
||||
|
||||
# Set uclamp.max for some groups, which could indicate cpu importance used in scheduling
|
||||
write /proc/vendor_sched/bg_uclamp_max 512
|
||||
write /proc/vendor_sched/auto_uclamp_max "130 130 130 130 512 512 512 512 670"
|
||||
write /proc/vendor_sched/bg_uclamp_max 130
|
||||
write /proc/vendor_sched/sysbg_uclamp_max 512
|
||||
write /proc/vendor_sched/ota_uclamp_max 512
|
||||
write /proc/vendor_sched/dex2oat_uclamp_max 615
|
||||
write /proc/vendor_sched/dex2oat_uclamp_max -2
|
||||
|
||||
write /proc/vendor_sched/uclamp_max_filter_divider 4
|
||||
write /proc/vendor_sched/uclamp_max_filter_rt 16
|
||||
write /proc/vendor_sched/uclamp_max_filter_enable 1
|
||||
|
||||
# Set PMU freq limit parameters
|
||||
write /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/lcpi_threshold 0
|
||||
|
@ -904,7 +915,7 @@ on property:sys.boot_completed=1
|
|||
# Enable SICD
|
||||
write /sys/devices/system/cpu/cpupm/cpupm/sicd 1
|
||||
|
||||
on property:sys.boot_completed=1 && property:persist.sys.device_provisioned=1 && property:ro.boot.flash.locked=1
|
||||
on property:sys.boot_completed=1 && property:persist.sys.device_provisioned=1
|
||||
write /sys/class/power_supply/battery/first_usage_date 0
|
||||
|
||||
# IMS WiFi Calling
|
||||
|
@ -995,6 +1006,7 @@ on post-fs-data
|
|||
chown bluetooth system /proc/bluetooth/sleep/btwake
|
||||
chown bluetooth system /proc/bluetooth/sleep/lpm
|
||||
chown bluetooth system /proc/bluetooth/sleep/btwrite
|
||||
chown bluetooth system /sys/devices/platform/155d0000.serial/uart_dbg
|
||||
mkdir /data/vendor/bluetooth 0770 bluetooth system
|
||||
|
||||
# ODPM
|
||||
|
@ -1166,3 +1178,30 @@ on property:ro.boot.mode=charger && property:init.svc.vendor.charger=running
|
|||
# Enable UFS powersaving in Off Mode Charger
|
||||
write /dev/sys/block/bootdevice/clkgate_enable 1
|
||||
|
||||
# MTE
|
||||
on property:persist.device_config.runtime_native_boot.mode_override=sync
|
||||
# Per-core mode overrides.
|
||||
# Little Cores: sync
|
||||
write /sys/devices/system/cpu/cpu0/mte_tcf_preferred sync
|
||||
write /sys/devices/system/cpu/cpu1/mte_tcf_preferred sync
|
||||
write /sys/devices/system/cpu/cpu2/mte_tcf_preferred sync
|
||||
write /sys/devices/system/cpu/cpu3/mte_tcf_preferred sync
|
||||
# Mid Cores: sync
|
||||
write /sys/devices/system/cpu/cpu4/mte_tcf_preferred sync
|
||||
write /sys/devices/system/cpu/cpu5/mte_tcf_preferred sync
|
||||
write /sys/devices/system/cpu/cpu6/mte_tcf_preferred sync
|
||||
write /sys/devices/system/cpu/cpu7/mte_tcf_preferred sync
|
||||
# Big Core: sync mode performance is prohibitively bad
|
||||
write /sys/devices/system/cpu/cpu8/mte_tcf_preferred asymm
|
||||
|
||||
on property:persist.device_config.runtime_native_boot.mode_override=asymm
|
||||
# Per-core mode overrides.
|
||||
write /sys/devices/system/cpu/cpu0/mte_tcf_preferred asymm
|
||||
write /sys/devices/system/cpu/cpu1/mte_tcf_preferred asymm
|
||||
write /sys/devices/system/cpu/cpu2/mte_tcf_preferred asymm
|
||||
write /sys/devices/system/cpu/cpu3/mte_tcf_preferred asymm
|
||||
write /sys/devices/system/cpu/cpu4/mte_tcf_preferred asymm
|
||||
write /sys/devices/system/cpu/cpu5/mte_tcf_preferred asymm
|
||||
write /sys/devices/system/cpu/cpu6/mte_tcf_preferred asymm
|
||||
write /sys/devices/system/cpu/cpu7/mte_tcf_preferred asymm
|
||||
write /sys/devices/system/cpu/cpu8/mte_tcf_preferred asymm
|
||||
|
|
|
@ -71,6 +71,108 @@ on early-boot
|
|||
# acm function for uwb
|
||||
mkdir /config/usb_gadget/g1/functions/acm.uwb0
|
||||
|
||||
# uvc function
|
||||
mkdir /config/usb_gadget/g1/functions/uvc.0
|
||||
write /config/usb_gadget/g1/functions/uvc.0/function_name "Android Webcam"
|
||||
write /config/usb_gadget/g1/functions/uvc.0/streaming_maxpacket 3072
|
||||
# write /config/usb_gadget/g1/functions/uvc.0/streaming_maxburst 5
|
||||
# write /config/usb_gadget/g1/functions/uvc.0/streaming_interval 2
|
||||
# setup control params
|
||||
mkdir /config/usb_gadget/g1/functions/uvc.0/control/header/h
|
||||
symlink /config/usb_gadget/g1/functions/uvc.0/control/header/h /config/usb_gadget/g1/functions/uvc.0/control/class/fs/h
|
||||
symlink /config/usb_gadget/g1/functions/uvc.0/control/header/h /config/usb_gadget/g1/functions/uvc.0/control/class/ss/h
|
||||
# advertise mjpeg streams
|
||||
mkdir /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m
|
||||
# advertise 360p resolution for webcam encoded as mjpeg
|
||||
mkdir /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p
|
||||
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/wHeight 360
|
||||
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/wWidth 640
|
||||
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/dwMaxVideoFrameBufferSize 460800
|
||||
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/dwDefaultFrameInterval 333333
|
||||
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/dwFrameInterval "166666
|
||||
333333
|
||||
416666
|
||||
666666"
|
||||
# advertise 480p resolution for webcam encoded as mjpeg
|
||||
mkdir /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p
|
||||
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/wHeight 480
|
||||
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/wWidth 640
|
||||
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/dwMaxVideoFrameBufferSize 614400
|
||||
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/dwDefaultFrameInterval 333333
|
||||
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/dwFrameInterval "166666
|
||||
333333
|
||||
416666
|
||||
666666"
|
||||
# advertise 720p resolution for webcam encoded as mjpeg
|
||||
mkdir /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p
|
||||
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/wHeight 720
|
||||
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/wWidth 1280
|
||||
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/dwMaxVideoFrameBufferSize 1843200
|
||||
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/dwDefaultFrameInterval 333333
|
||||
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/dwFrameInterval "166666
|
||||
333333
|
||||
416666
|
||||
666666"
|
||||
# advertise 1080p resolution for webcam encoded as mjpeg
|
||||
mkdir /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p
|
||||
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/wHeight 1080
|
||||
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/wWidth 1920
|
||||
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/dwMaxVideoFrameBufferSize 4147200
|
||||
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/dwDefaultFrameInterval 333333
|
||||
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/dwFrameInterval "166666
|
||||
333333
|
||||
416666
|
||||
666666"
|
||||
# TODO: Add uncompressed streams
|
||||
# setup streaming params
|
||||
mkdir /config/usb_gadget/g1/functions/uvc.0/streaming/header/h
|
||||
symlink /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m /config/usb_gadget/g1/functions/uvc.0/streaming/header/h/m
|
||||
symlink /config/usb_gadget/g1/functions/uvc.0/streaming/header/h /config/usb_gadget/g1/functions/uvc.0/streaming/class/fs/h
|
||||
symlink /config/usb_gadget/g1/functions/uvc.0/streaming/header/h /config/usb_gadget/g1/functions/uvc.0/streaming/class/hs/h
|
||||
symlink /config/usb_gadget/g1/functions/uvc.0/streaming/header/h /config/usb_gadget/g1/functions/uvc.0/streaming/class/ss/h
|
||||
# remove write permissions for 'others'
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/control/header/h/bcdUVC
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/control/header/h/dwClockFrequency
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/control/terminal/output/default/bSourceID
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/function_name
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming_interval
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming_maxburst
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming_maxpacket
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/bmCapabilities
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/dwDefaultFrameInterval
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/dwFrameInterval
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/dwMaxBitRate
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/dwMaxVideoFrameBufferSize
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/dwMinBitRate
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/wHeight
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/wWidth
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/bmCapabilities
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/dwDefaultFrameInterval
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/dwFrameInterval
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/dwMaxBitRate
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/dwMaxVideoFrameBufferSize
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/dwMinBitRate
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/wHeight
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/wWidth
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/bmCapabilities
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/dwDefaultFrameInterval
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/dwFrameInterval
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/dwMaxBitRate
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/dwMaxVideoFrameBufferSize
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/dwMinBitRate
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/wHeight
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/wWidth
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/bmCapabilities
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/dwDefaultFrameInterval
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/dwFrameInterval
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/dwMaxBitRate
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/dwMaxVideoFrameBufferSize
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/dwMinBitRate
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/wHeight
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/wWidth
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/bDefaultFrameIndex
|
||||
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/bmaControls
|
||||
|
||||
# chown file/folder permission
|
||||
chown system system /config/usb_gadget/
|
||||
chown system system /config/usb_gadget/g1
|
||||
|
@ -135,6 +237,119 @@ on early-boot
|
|||
chown system system /config/usb_gadget/g1/functions/rndis.gs4/protocol
|
||||
chown system system /config/usb_gadget/g1/functions/rndis.gs4/qmult
|
||||
chown system system /config/usb_gadget/g1/functions/rndis.gs4/subclass
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/bInterfaceNumber
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/class
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/class/fs
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/class/fs/h
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/class/ss
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/class/ss/h
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/header
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/header/h
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/header/h/bcdUVC
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/header/h/dwClockFrequency
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/processing
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/processing/default
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/processing/default/bmControls
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/processing/default/bSourceID
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/processing/default/bUnitID
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/processing/default/iProcessing
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/processing/default/wMaxMultiplier
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/terminal
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/terminal/camera
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/terminal/camera/default
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/terminal/camera/default/bAssocTerminal
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/terminal/camera/default/bmControls
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/terminal/camera/default/bTerminalID
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/terminal/camera/default/iTerminal
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/terminal/camera/default/wObjectiveFocalLengthMax
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/terminal/camera/default/wObjectiveFocalLengthMin
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/terminal/camera/default/wOcularFocalLength
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/terminal/camera/default/wTerminalType
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/terminal/output
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/terminal/output/default
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/terminal/output/default/bAssocTerminal
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/terminal/output/default/bSourceID
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/terminal/output/default/bTerminalID
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/terminal/output/default/iTerminal
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/control/terminal/output/default/wTerminalType
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/function_name
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming_interval
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming_maxburst
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming_maxpacket
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/bInterfaceNumber
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/class
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/class/fs
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/class/fs/h
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/class/hs
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/class/hs/h
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/class/ss
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/class/ss/h
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/color_matching
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/color_matching/default
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/color_matching/default/bColorPrimaries
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/color_matching/default/bMatrixCoefficients
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/color_matching/default/bTransferCharacteristics
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/header
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/header/h
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/header/h/bmInfo
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/header/h/bStillCaptureMethod
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/header/h/bTerminalLink
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/header/h/bTriggerSupport
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/header/h/bTriggerUsage
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/header/h/m
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/bFrameIndex
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/bmCapabilities
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/dwDefaultFrameInterval
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/dwFrameInterval
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/dwMaxBitRate
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/dwMaxVideoFrameBufferSize
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/dwMinBitRate
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/wHeight
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/wWidth
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/bFrameIndex
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/bmCapabilities
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/dwDefaultFrameInterval
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/dwFrameInterval
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/dwMaxBitRate
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/dwMaxVideoFrameBufferSize
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/dwMinBitRate
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/wHeight
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/wWidth
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/bFrameIndex
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/bmCapabilities
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/dwDefaultFrameInterval
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/dwFrameInterval
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/dwMaxBitRate
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/dwMaxVideoFrameBufferSize
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/dwMinBitRate
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/wHeight
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/wWidth
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/bFrameIndex
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/bmCapabilities
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/dwDefaultFrameInterval
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/dwFrameInterval
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/dwMaxBitRate
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/dwMaxVideoFrameBufferSize
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/dwMinBitRate
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/wHeight
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/wWidth
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/bAspectRatioX
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/bAspectRatioY
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/bDefaultFrameIndex
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/bFormatIndex
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/bmaControls
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/bmFlags
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/bmInterlaceFlags
|
||||
chown system system /config/usb_gadget/g1/functions/uvc.0/streaming/uncompressed
|
||||
chown system system /config/usb_gadget/g1/idProduct
|
||||
chown system system /config/usb_gadget/g1/idVendor
|
||||
chown system system /config/usb_gadget/g1/max_speed
|
||||
|
@ -190,6 +405,7 @@ on property:sys.usb.config=charger && property:sys.usb.configfs=1
|
|||
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "midi"
|
||||
symlink /config/usb_gadget/g1/functions/midi.gs5 /config/usb_gadget/g1/configs/b.1/f1
|
||||
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
write /sys/class/typec/port0/device/update_sdp_enum_timeout 0x1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:ro.bootmode=usbuwb
|
||||
|
|
|
@ -151,6 +151,10 @@
|
|||
/dev/acd-com.google.usf 0660 system system
|
||||
/dev/acd-com.google.usf.non_wake_up 0660 system system
|
||||
|
||||
# CHRE (USF)
|
||||
/dev/acd-com.google.chre 0660 system system
|
||||
/dev/acd-com.google.chre.non_wake_up 0660 system system
|
||||
|
||||
# LWIS
|
||||
/dev/lwis* 0660 system system
|
||||
|
||||
|
|
|
@ -51,6 +51,14 @@
|
|||
<permission name="android.permission.BLUETOOTH_CONNECT" fixed="false"/>
|
||||
</exception>
|
||||
|
||||
<exception package="com.google.android.apps.camera.services">
|
||||
<!-- Camera -->
|
||||
<permission name="android.permission.CAMERA" fixed="false"/>
|
||||
<permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/>
|
||||
<permission name="android.permission.BLUETOOTH_CONNECT" fixed="false"/>
|
||||
<permission name="android.permission.BLUETOOTH_SCAN" fixed="false"/>
|
||||
</exception>
|
||||
|
||||
<exception package="com.google.android.apps.cbrsnetworkmonitor">
|
||||
<!-- Location access to create CBRS geofences-->
|
||||
<permission name="android.permission.ACCESS_FINE_LOCATION" fixed="true"/>
|
||||
|
|
|
@ -44,6 +44,13 @@ PRODUCT_PRODUCT_PROPERTIES += \
|
|||
PRODUCT_PRODUCT_PROPERTIES += \
|
||||
ro.thermal_warmreset = true
|
||||
|
||||
# Set the max page size to 4096 (b/300367402)
|
||||
PRODUCT_MAX_PAGE_SIZE_SUPPORTED := 4096
|
||||
|
||||
# Trigger fsck on upgrade (305658663)
|
||||
PRODUCT_PRODUCT_PROPERTIES += \
|
||||
ro.preventative_fsck = 1
|
||||
|
||||
# Indicate that the bootloader supports the MTE developer option switch
|
||||
# (MISC_MEMTAG_MODE_MEMTAG_ONCE), with the exception of _fullmte products that
|
||||
# force enable MTE.
|
||||
|
@ -53,4 +60,6 @@ PRODUCT_PRODUCT_PROPERTIES += persist.arm64.memtag.app.com.android.se=off
|
|||
PRODUCT_PRODUCT_PROPERTIES += persist.arm64.memtag.app.com.google.android.bluetooth=off
|
||||
PRODUCT_PRODUCT_PROPERTIES += persist.arm64.memtag.app.com.android.nfc=off
|
||||
PRODUCT_PRODUCT_PROPERTIES += persist.arm64.memtag.system_server=off
|
||||
else
|
||||
PRODUCT_PRODUCT_PROPERTIES += persist.arm64.memtag.app.com.android.chrome=off
|
||||
endif
|
||||
|
|
26
device.mk
26
device.mk
|
@ -38,18 +38,10 @@ include device/google/gs-common/umfw_stat/umfw_stat.mk
|
|||
include device/google/gs-common/widevine/widevine.mk
|
||||
include device/google/gs-common/sota_app/factoryota.mk
|
||||
include device/google/gs-common/misc_writer/misc_writer.mk
|
||||
include device/google/gs-common/gyotaku_app/gyotaku.mk
|
||||
|
||||
include device/google/zuma/dumpstate/item.mk
|
||||
|
||||
ifneq ($(BOARD_WITHOUT_RADIO),true)
|
||||
# Release stable version to factory image
|
||||
ifneq ($(filter factory_%,$(TARGET_PRODUCT)),)
|
||||
include device/google/gs-common/gps/brcm/device.mk
|
||||
else
|
||||
include device/google/gs-common/gps/brcm/device_v2.mk
|
||||
endif
|
||||
endif
|
||||
|
||||
TARGET_BOARD_PLATFORM := zuma
|
||||
ALLOW_MISSING_DEPENDENCIES := true
|
||||
|
||||
|
@ -204,14 +196,6 @@ PRODUCT_PROPERTY_OVERRIDES += \
|
|||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
telephony.active_modems.max_count=2
|
||||
|
||||
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
persist.vendor.usb.displayport.enabled=0
|
||||
else
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
persist.vendor.usb.displayport.enabled=0
|
||||
endif
|
||||
|
||||
USE_LASSEN_OEMHOOK := true
|
||||
|
||||
# Use for GRIL
|
||||
|
@ -397,6 +381,7 @@ PRODUCT_COPY_FILES += \
|
|||
|
||||
## Enable the CHRE Daemon
|
||||
CHRE_USF_DAEMON_ENABLED := true
|
||||
CHRE_DEDICATED_TRANSPORT_CHANNEL_ENABLED := true
|
||||
PRODUCT_PACKAGES += \
|
||||
chre \
|
||||
preloaded_nanoapps.json
|
||||
|
@ -666,7 +651,8 @@ endif
|
|||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
debug.sf.disable_backpressure=0 \
|
||||
debug.sf.enable_gl_backpressure=1 \
|
||||
debug.sf.enable_sdr_dimming=1
|
||||
debug.sf.enable_sdr_dimming=1 \
|
||||
debug.sf.dim_in_gamma_in_enhanced_screenshots=1
|
||||
|
||||
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.use_phase_offsets_as_durations=1
|
||||
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.late.sf.duration=10500000
|
||||
|
@ -707,7 +693,7 @@ PRODUCT_COPY_FILES += \
|
|||
device/google/zuma/display/display_colordata_cal0.pb:$(TARGET_COPY_OUT_VENDOR)/etc/display_colordata_cal0.pb
|
||||
|
||||
# limit DPP downscale ratio
|
||||
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.hwc.dpp.downscale=3
|
||||
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.hwc.dpp.downscale=4
|
||||
|
||||
# Cannot reference variables defined in BoardConfig.mk, uncomment this if
|
||||
# BOARD_USES_EXYNOS_DSS_FEATURE is true
|
||||
|
@ -951,6 +937,7 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk)
|
|||
#$(call inherit-product-if-exists, vendor/google_devices/common/exynos-vendor.mk)
|
||||
#$(call inherit-product-if-exists, hardware/broadcom/wlan/bcmdhd/firmware/bcm4375/device-bcm.mk)
|
||||
include device/google/gs-common/sensors/sensors.mk
|
||||
$(call soong_config_set,usf,target_soc,zuma)
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/zuma/default-permissions.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/default-permissions/default-permissions.xml \
|
||||
|
@ -1016,7 +1003,6 @@ $(call soong_config_set,aoc,target_product,$(TARGET_PRODUCT))
|
|||
## Audio properties
|
||||
##Audio Vendor property
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
persist.vendor.audio.cca.enabled=false \
|
||||
persist.vendor.audio.cca.unsupported=false
|
||||
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
</hal>
|
||||
<hal format="aidl" optional="true">
|
||||
<name>com.google.face.debug</name>
|
||||
<version>3</version>
|
||||
<version>4</version>
|
||||
<interface>
|
||||
<name>IDebugHost</name>
|
||||
<instance>default</instance>
|
||||
|
@ -106,7 +106,7 @@
|
|||
</hal>
|
||||
<hal format="aidl" optional="true">
|
||||
<name>com.google.hardware.pixel.display</name>
|
||||
<version>8</version>
|
||||
<version>9</version>
|
||||
<interface>
|
||||
<name>IDisplay</name>
|
||||
<instance>default</instance>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/vendor/bin/sh
|
||||
build_type="$(getprop ro.build.type)"
|
||||
|
||||
echo "\n------ Power Stats Times ------"
|
||||
echo -n "Boot: " && /vendor/bin/uptime -s && echo -n "Now: " && date;
|
||||
|
||||
|
@ -242,6 +241,11 @@ then
|
|||
xxd /sys/devices/platform/10c90000.hsi2c/i2c-7/7-0050/eeprom
|
||||
fi
|
||||
|
||||
if [ -e "/sys/devices/platform/10c90000.hsi2c/i2c-6/6-0050/eeprom" ]
|
||||
then
|
||||
xxd /sys/devices/platform/10c90000.hsi2c/i2c-6/6-0050/eeprom
|
||||
fi
|
||||
|
||||
echo "\n------ Charger Stats ------"
|
||||
cat "/sys/class/power_supply/battery/charge_details"
|
||||
if [ $build_type = "userdebug" ]
|
||||
|
|
|
@ -31,6 +31,7 @@ PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
|
|||
# Disable camera related features for factory builds
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
persist.vendor.camera.af.ignore_gyro=1 \
|
||||
persist.vendor.camera.multicam.framesync=0 \
|
||||
vendor.camera.debug.bypass_face_ssd_processor=1 \
|
||||
vendor.camera.debug.csi_ebuf_enable=0 \
|
||||
vendor.camera.debug.enable_face_detection=0 \
|
||||
|
|
|
@ -124,8 +124,7 @@
|
|||
<Limit name="measured-frame-rate-1920x1080" range="25-26" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true">
|
||||
<!-- measured 90%:295-301 med:296 N=2 -->
|
||||
<Limit name="measured-frame-rate-352x288" range="295-298" /> <!-- v90%=1.0 -->
|
||||
<Limit name="measured-frame-rate-352x288" range="583-674" />
|
||||
<!-- measured 90%:196-207 med:196 N=2 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="196-201" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:177-180 med:178 N=2 -->
|
||||
|
|
|
@ -284,4 +284,7 @@
|
|||
<!-- Boolean indicating if restoring network selection should be skipped -->
|
||||
<!-- The restoring is handled by modem if it is true -->
|
||||
<bool translatable="false" name="skip_restoring_network_selection">true</bool>
|
||||
|
||||
<!-- Enable variable refresh rate when typing. -->
|
||||
<bool name="config_variableRefreshRateTypingSupported">false</bool>
|
||||
</resources>
|
||||
|
|
|
@ -26,5 +26,5 @@
|
|||
<!-- Doze: does this device support STATE_DOZE_SUSPEND? -->
|
||||
<bool name="doze_suspend_display_state_supported">false</bool>
|
||||
|
||||
<string name="config_rounded_mask">M21,0C19.94,0.01 18.83,0.04 17.73,0.11C16.91,0.17 16.09,0.25 15.3,0.36C14.5,0.48 13.72,0.62 12.95,0.81C11.42,1.19 9.97,1.72 8.65,2.43C7.32,3.14 6.12,4.02 5.08,5.07C4.04,6.11 3.15,7.31 2.44,8.64C1.73,9.97 1.19,11.42 0.82,12.94C0.63,13.7 0.48,14.49 0.37,15.29C0.25,16.09 0.17,16.9 0.12,17.72C0.05,18.82 0.02,19.93 0.01,21.55</string>
|
||||
<string name="config_rounded_mask" translatable="false">M21,0C19.94,0.01 18.83,0.04 17.73,0.11C16.91,0.17 16.09,0.25 15.3,0.36C14.5,0.48 13.72,0.62 12.95,0.81C11.42,1.19 9.97,1.72 8.65,2.43C7.32,3.14 6.12,4.02 5.08,5.07C4.04,6.11 3.15,7.31 2.44,8.64C1.73,9.97 1.19,11.42 0.82,12.94C0.63,13.7 0.48,14.49 0.37,15.29C0.25,16.09 0.17,16.9 0.12,17.72C0.05,18.82 0.02,19.93 0.01,21.55</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
on property:sys.boot_completed=1
|
||||
start vendor.pixelstats_vendor
|
||||
|
||||
on post-fs-data
|
||||
chown system system /sys/kernel/metrics/irq/stats_reset
|
||||
service vendor.pixelstats_vendor /vendor/bin/pixelstats-vendor
|
||||
class hal
|
||||
user system
|
||||
|
|
|
@ -70,6 +70,8 @@ const struct SysfsCollector::SysfsPaths sysfs_paths = {
|
|||
},
|
||||
.ResumeLatencyMetricsPath = "/sys/kernel/metrics/resume_latency/resume_latency_metrics",
|
||||
.LongIRQMetricsPath = "/sys/kernel/metrics/irq/long_irq_metrics",
|
||||
.StormIRQMetricsPath = "/sys/kernel/metrics/irq/storm_irq_metrics",
|
||||
.IRQStatsResetPath = "/sys/kernel/metrics/irq/stats_reset",
|
||||
.TempResidencyAndResetPaths = {
|
||||
{
|
||||
"/sys/kernel/metrics/thermal/tr_by_group/tmu/stats",
|
||||
|
@ -92,7 +94,10 @@ const struct SysfsCollector::SysfsPaths sysfs_paths = {
|
|||
.WavesPath = "/sys/devices/platform/audiometrics/waves",
|
||||
.AdaptedInfoCountPath = "/sys/devices/platform/audiometrics/adapted_info_active_count",
|
||||
.AdaptedInfoDurationPath = "/sys/devices/platform/audiometrics/adapted_info_active_duration",
|
||||
.CCARatePath = "/sys/devices/platform/audiometrics/cca_rate_read_once"
|
||||
.CCARatePath = "/sys/devices/platform/audiometrics/cca_count_read_once",
|
||||
.PcmLatencyPath = "/sys/devices/platform/audiometrics/pcm_latency",
|
||||
.PcmCountPath = "/sys/devices/platform/audiometrics/pcm_count",
|
||||
.TotalCallCountPath = "/sys/devices/platform/audiometrics/call_count"
|
||||
};
|
||||
|
||||
const struct UeventListener::UeventPaths ueventPaths = {
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <android/binder_manager.h>
|
||||
#include <android/binder_process.h>
|
||||
#include <log/log.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
using aidl::android::hardware::power::stats::AdaptiveDvfsStateResidencyDataProvider;
|
||||
using aidl::android::hardware::power::stats::AocStateResidencyDataProvider;
|
||||
|
@ -681,6 +682,14 @@ void addNFC(std::shared_ptr<PowerStats> p) {
|
|||
cfgs.emplace_back(generateGenericStateResidencyConfigs(nfcStateConfig, nfcStateHeaders),
|
||||
"NFC", "NFC subsystem");
|
||||
|
||||
std::string path;
|
||||
struct stat buffer;
|
||||
for (int i = 0; i < 10; i++) {
|
||||
std::string idx = std::to_string(i);
|
||||
path = "/sys/devices/platform/10c80000.hsi2c/i2c-" + idx + "/" + idx + "-0008/power_stats";
|
||||
if (!stat(path.c_str(), &buffer))
|
||||
break;
|
||||
}
|
||||
p->addStateResidencyDataProvider(std::make_unique<GenericStateResidencyDataProvider>(
|
||||
"/sys/devices/platform/10c80000.hsi2c/i2c-6/6-0008/power_stats", cfgs));
|
||||
path, cfgs));
|
||||
}
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <android-base/properties.h>
|
||||
|
||||
#include <aidl/android/frameworks/stats/IStats.h>
|
||||
|
||||
namespace aidl {
|
||||
|
@ -34,11 +36,38 @@ namespace hardware {
|
|||
namespace usb {
|
||||
namespace gadget {
|
||||
|
||||
using ::android::base::GetBoolProperty;
|
||||
using ::android::hardware::google::pixel::usb::kUvcEnabled;
|
||||
|
||||
string enabledPath;
|
||||
constexpr char kHsi2cPath[] = "/sys/devices/platform/10cb0000.hsi2c";
|
||||
constexpr char kI2CPath[] = "/sys/devices/platform/10cb0000.hsi2c/i2c-";
|
||||
constexpr char kAccessoryLimitCurrent[] = "-0025/usb_limit_accessory_current";
|
||||
constexpr char kAccessoryLimitCurrentEnable[] = "-0025/usb_limit_accessory_enable";
|
||||
constexpr char kUpdateSdpEnumTimeout[] = "-0025/update_sdp_enum_timeout";
|
||||
|
||||
Status getI2cBusHelper(string *name) {
|
||||
DIR *dp;
|
||||
|
||||
dp = opendir(kHsi2cPath);
|
||||
if (dp != NULL) {
|
||||
struct dirent *ep;
|
||||
|
||||
while ((ep = readdir(dp))) {
|
||||
if (ep->d_type == DT_DIR) {
|
||||
if (string::npos != string(ep->d_name).find("i2c-")) {
|
||||
std::strtok(ep->d_name, "-");
|
||||
*name = std::strtok(NULL, "-");
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir(dp);
|
||||
return Status::SUCCESS;
|
||||
}
|
||||
|
||||
ALOGE("Failed to open %s", kHsi2cPath);
|
||||
return Status::ERROR;
|
||||
}
|
||||
|
||||
UsbGadget::UsbGadget() : mGadgetIrqPath("") {
|
||||
if (access(OS_DESC_PATH, R_OK) != 0) {
|
||||
|
@ -92,6 +121,7 @@ Status UsbGadget::getUsbGadgetIrqPath() {
|
|||
void currentFunctionsAppliedCallback(bool functionsApplied, void *payload) {
|
||||
UsbGadget *gadget = (UsbGadget *)payload;
|
||||
gadget->mCurrentUsbFunctionsApplied = functionsApplied;
|
||||
gadget->updateSdpEnumTimeout();
|
||||
}
|
||||
|
||||
ScopedAStatus UsbGadget::getCurrentUsbFunctions(const shared_ptr<IUsbGadgetCallback> &callback,
|
||||
|
@ -302,6 +332,28 @@ static Status validateAndSetVidPid(uint64_t functions) {
|
|||
ret = Status(setVidPid("0x18d1", "0x4eec"));
|
||||
}
|
||||
break;
|
||||
case GadgetFunction::UVC:
|
||||
if (!(vendorFunctions == "user" || vendorFunctions == "")) {
|
||||
ALOGE("Invalid vendorFunctions set: %s", vendorFunctions.c_str());
|
||||
ret = Status::CONFIGURATION_NOT_SUPPORTED;
|
||||
} else if (!GetBoolProperty(kUvcEnabled, false)) {
|
||||
ALOGE("UVC function not enabled by config");
|
||||
ret = Status::CONFIGURATION_NOT_SUPPORTED;
|
||||
} else {
|
||||
ret = Status(setVidPid("0x18d1", "0x4eed"));
|
||||
}
|
||||
break;
|
||||
case GadgetFunction::ADB | GadgetFunction::UVC:
|
||||
if (!(vendorFunctions == "user" || vendorFunctions == "")) {
|
||||
ALOGE("Invalid vendorFunctions set: %s", vendorFunctions.c_str());
|
||||
ret = Status::CONFIGURATION_NOT_SUPPORTED;
|
||||
} else if (!GetBoolProperty(kUvcEnabled, false)) {
|
||||
ALOGE("UVC function not enabled by config");
|
||||
ret = Status::CONFIGURATION_NOT_SUPPORTED;
|
||||
} else {
|
||||
ret = Status(setVidPid("0x18d1", "0x4eee"));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ALOGE("Combination not supported");
|
||||
ret = Status::CONFIGURATION_NOT_SUPPORTED;
|
||||
|
@ -336,6 +388,22 @@ ScopedAStatus UsbGadget::reset(const shared_ptr<IUsbGadgetCallback> &callback,
|
|||
return ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
void UsbGadget::updateSdpEnumTimeout() {
|
||||
string i2c_node, update_sdp_enum_timeout_path;
|
||||
|
||||
Status status = getI2cBusHelper(&i2c_node);
|
||||
if (status != Status::SUCCESS) {
|
||||
ALOGE("%s: Unable to locate i2c bus node", __func__);
|
||||
}
|
||||
|
||||
update_sdp_enum_timeout_path = kI2CPath + i2c_node + "/" + i2c_node + kUpdateSdpEnumTimeout;
|
||||
if (!WriteStringToFile("1", update_sdp_enum_timeout_path)) {
|
||||
ALOGE("%s: Unable to write to %s.", __func__, update_sdp_enum_timeout_path.c_str());
|
||||
} else {
|
||||
ALOGI("%s: Updated SDP enumeration timeout value.", __func__);
|
||||
}
|
||||
}
|
||||
|
||||
Status UsbGadget::setupFunctions(long functions,
|
||||
const shared_ptr<IUsbGadgetCallback> &callback, uint64_t timeout,
|
||||
int64_t in_transactionId) {
|
||||
|
@ -394,6 +462,7 @@ Status UsbGadget::setupFunctions(long functions,
|
|||
mCurrentUsbFunctionsApplied = true;
|
||||
if (callback)
|
||||
callback->setCurrentUsbFunctionsCb(functions, Status::SUCCESS, in_transactionId);
|
||||
updateSdpEnumTimeout();
|
||||
return Status::SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -418,29 +487,6 @@ Status UsbGadget::setupFunctions(long functions,
|
|||
return Status::SUCCESS;
|
||||
}
|
||||
|
||||
Status getI2cBusHelper(string *name) {
|
||||
DIR *dp;
|
||||
|
||||
dp = opendir(kHsi2cPath);
|
||||
if (dp != NULL) {
|
||||
struct dirent *ep;
|
||||
|
||||
while ((ep = readdir(dp))) {
|
||||
if (ep->d_type == DT_DIR) {
|
||||
if (string::npos != string(ep->d_name).find("i2c-")) {
|
||||
std::strtok(ep->d_name, "-");
|
||||
*name = std::strtok(NULL, "-");
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir(dp);
|
||||
return Status::SUCCESS;
|
||||
}
|
||||
|
||||
ALOGE("Failed to open %s", kHsi2cPath);
|
||||
return Status::ERROR;
|
||||
}
|
||||
|
||||
ScopedAStatus UsbGadget::setCurrentUsbFunctions(long functions,
|
||||
const shared_ptr<IUsbGadgetCallback> &callback,
|
||||
int64_t timeout,
|
||||
|
|
|
@ -115,6 +115,10 @@ struct UsbGadget : public BnUsbGadget {
|
|||
|
||||
ScopedAStatus setVidPid(const char *vid,const char *pid);
|
||||
|
||||
// Indicates to the kernel that the gadget service is ready and the kernel can
|
||||
// set SDP timeout to a lower value.
|
||||
void updateSdpEnumTimeout();
|
||||
|
||||
private:
|
||||
Status tearDownGadget();
|
||||
Status getUsbGadgetIrqPath();
|
||||
|
|
372
usb/usb/Usb.cpp
372
usb/usb/Usb.cpp
|
@ -35,6 +35,7 @@
|
|||
#include <cutils/uevent.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <sys/eventfd.h>
|
||||
#include <sys/timerfd.h>
|
||||
#include <utils/Errors.h>
|
||||
#include <utils/StrongPointer.h>
|
||||
|
||||
|
@ -47,6 +48,7 @@
|
|||
using aidl::android::frameworks::stats::IStats;
|
||||
using android::base::GetProperty;
|
||||
using android::base::Join;
|
||||
using android::base::ParseUint;
|
||||
using android::base::Tokenize;
|
||||
using android::base::Trim;
|
||||
using android::hardware::google::pixel::getStatsService;
|
||||
|
@ -91,6 +93,8 @@ constexpr char kIrqHpdCounPath[] = "-0025/irq_hpd_count";
|
|||
constexpr int kSamplingIntervalSec = 5;
|
||||
void queryVersionHelper(android::hardware::usb::Usb *usb,
|
||||
std::vector<PortStatus> *currentPortStatus);
|
||||
AltModeData::DisplayPortAltModeData constructAltModeData(string hpd, string pin_assignment,
|
||||
string link_status, string vdo);
|
||||
|
||||
ScopedAStatus Usb::enableUsbData(const string& in_portName, bool in_enable,
|
||||
int64_t in_transactionId) {
|
||||
|
@ -124,7 +128,7 @@ ScopedAStatus Usb::enableUsbData(const string& in_portName, bool in_enable,
|
|||
}
|
||||
|
||||
if (!WriteStringToFile("0", USB_DATA_PATH)) {
|
||||
ALOGE("Not able to turn on usb connection notification");
|
||||
ALOGE("Not able to turn off usb connection notification");
|
||||
result = false;
|
||||
}
|
||||
|
||||
|
@ -452,6 +456,9 @@ Usb::Usb()
|
|||
ZoneInfo(TemperatureType::UNKNOWN, kThermalZoneForTempReadSecondary2,
|
||||
ThrottlingSeverity::NONE)}, kSamplingIntervalSec),
|
||||
mUsbDataEnabled(true),
|
||||
mDisplayPortPollRunning(false),
|
||||
mDisplayPortPollStarting(false),
|
||||
mDisplayPortCVLock(PTHREAD_MUTEX_INITIALIZER),
|
||||
mDisplayPortLock(PTHREAD_MUTEX_INITIALIZER) {
|
||||
pthread_condattr_t attr;
|
||||
if (pthread_condattr_init(&attr)) {
|
||||
|
@ -466,6 +473,10 @@ Usb::Usb()
|
|||
ALOGE("pthread_cond_init failed: %s", strerror(errno));
|
||||
abort();
|
||||
}
|
||||
if (pthread_cond_init(&mDisplayPortCV, &attr)) {
|
||||
ALOGE("usbdp: pthread_cond_init failed: %s", strerror(errno));
|
||||
abort();
|
||||
}
|
||||
if (pthread_condattr_destroy(&attr)) {
|
||||
ALOGE("pthread_condattr_destroy failed: %s", strerror(errno));
|
||||
abort();
|
||||
|
@ -475,6 +486,11 @@ Usb::Usb()
|
|||
ALOGE("mDisplayPortEventPipe eventfd failed: %s", strerror(errno));
|
||||
abort();
|
||||
}
|
||||
mDisplayPortDebounceTimer = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK);
|
||||
if (mDisplayPortDebounceTimer == -1) {
|
||||
ALOGE("mDisplayPortDebounceTimer timerfd failed: %s", strerror(errno));
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
ScopedAStatus Usb::switchRole(const string& in_portName, const PortRole& in_role,
|
||||
|
@ -814,14 +830,137 @@ done:
|
|||
return Status::ERROR;
|
||||
}
|
||||
|
||||
/* DisplayPort Helper Functions Start */
|
||||
|
||||
DisplayPortAltModePinAssignment parsePinAssignmentHelper(string pinAssignments) {
|
||||
size_t pos = pinAssignments.find("[");
|
||||
if (pos != string::npos) {
|
||||
pinAssignments = pinAssignments.substr(pos+1, 1);
|
||||
if (pinAssignments == "C") {
|
||||
return DisplayPortAltModePinAssignment::C;
|
||||
} else if (pinAssignments == "D") {
|
||||
return DisplayPortAltModePinAssignment::D;
|
||||
} else if (pinAssignments == "E") {
|
||||
return DisplayPortAltModePinAssignment::E;
|
||||
}
|
||||
}
|
||||
return DisplayPortAltModePinAssignment::NONE;
|
||||
}
|
||||
|
||||
LinkTrainingStatus parseLinkTrainingStatusHelper(string linkTrainingStatus) {
|
||||
linkTrainingStatus = Trim(linkTrainingStatus);
|
||||
if (linkTrainingStatus == LINK_TRAINING_STATUS_SUCCESS) {
|
||||
return LinkTrainingStatus::SUCCESS;
|
||||
} else if (linkTrainingStatus == LINK_TRAINING_STATUS_FAILURE || \
|
||||
linkTrainingStatus == LINK_TRAINING_STATUS_FAILURE_SINK) {
|
||||
return LinkTrainingStatus::FAILURE;
|
||||
}
|
||||
return LinkTrainingStatus::UNKNOWN;
|
||||
}
|
||||
|
||||
bool isDisplayPortPlugHelper(string vdoString) {
|
||||
unsigned long vdo;
|
||||
unsigned long receptacleFlag = 1 << DISPLAYPORT_CAPABILITIES_RECEPTACLE_BIT;
|
||||
|
||||
vdoString = Trim(vdoString);
|
||||
if (ParseUint(vdoString.c_str(), &vdo)) {
|
||||
/* We check to see if receptacleFlag is 0, meaning that the DP interface is presented on a
|
||||
* USB-C plug.
|
||||
*/
|
||||
return !(vdo & receptacleFlag);
|
||||
} else {
|
||||
ALOGE("usbdp: isDisplayPortPlugHelper: errno:%d", errno);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
AltModeData::DisplayPortAltModeData constructAltModeData(string hpd, string pin_assignment,
|
||||
string link_status, string vdo) {
|
||||
AltModeData::DisplayPortAltModeData dpData;
|
||||
|
||||
// vdo
|
||||
if (isDisplayPortPlugHelper(vdo)) {
|
||||
dpData.cableStatus = DisplayPortAltModeStatus::CAPABLE;
|
||||
} else {
|
||||
dpData.partnerSinkStatus = DisplayPortAltModeStatus::CAPABLE;
|
||||
}
|
||||
|
||||
// hpd, status
|
||||
if (!strncmp(hpd.c_str(), "1", strlen("1"))) {
|
||||
dpData.hpd = true;
|
||||
}
|
||||
|
||||
// pin
|
||||
dpData.pinAssignment = parsePinAssignmentHelper(pin_assignment);
|
||||
|
||||
// link training
|
||||
link_status = Trim(link_status);
|
||||
dpData.linkTrainingStatus = parseLinkTrainingStatusHelper(link_status);
|
||||
if (dpData.linkTrainingStatus == LinkTrainingStatus::SUCCESS) {
|
||||
dpData.partnerSinkStatus = dpData.partnerSinkStatus == DisplayPortAltModeStatus::CAPABLE ? \
|
||||
DisplayPortAltModeStatus::ENABLED : DisplayPortAltModeStatus::UNKNOWN;
|
||||
dpData.cableStatus = dpData.cableStatus == DisplayPortAltModeStatus::CAPABLE ? \
|
||||
DisplayPortAltModeStatus::ENABLED : DisplayPortAltModeStatus::UNKNOWN;
|
||||
if (dpData.partnerSinkStatus == DisplayPortAltModeStatus::ENABLED) {
|
||||
dpData.cableStatus = DisplayPortAltModeStatus::ENABLED;
|
||||
}
|
||||
} else if (dpData.linkTrainingStatus == LinkTrainingStatus::FAILURE &&
|
||||
dpData.partnerSinkStatus == DisplayPortAltModeStatus::CAPABLE) {
|
||||
// 2.0 cable that fails EDID reports not capable, other link training failures assume
|
||||
// 3.0 cable that fails in all other cases.
|
||||
dpData.cableStatus = (link_status == LINK_TRAINING_STATUS_FAILURE_SINK) ? \
|
||||
DisplayPortAltModeStatus::NOT_CAPABLE : DisplayPortAltModeStatus::CAPABLE;
|
||||
}
|
||||
|
||||
return dpData;
|
||||
}
|
||||
|
||||
/* DisplayPort Helper Functions End */
|
||||
|
||||
// Only care about first port which must support DisplayPortAltMode
|
||||
Status queryDisplayPortStatus(android::hardware::usb::Usb *usb,
|
||||
std::vector<PortStatus> *currentPortStatus) {
|
||||
string hpd, pinAssign, linkStatus, vdo;
|
||||
string path;
|
||||
AltModeData::DisplayPortAltModeData dpData;
|
||||
|
||||
if (usb->getDisplayPortUsbPathHelper(&path) == Status::ERROR) {
|
||||
(*currentPortStatus)[0].supportedAltModes.push_back(dpData);
|
||||
return Status::SUCCESS;
|
||||
}
|
||||
|
||||
usb->readDisplayPortAttribute("hpd", path, &hpd);
|
||||
usb->readDisplayPortAttribute("pin_assignment", path, &pinAssign);
|
||||
usb->readDisplayPortAttribute("vdo", path, &vdo);
|
||||
usb->readDisplayPortAttribute("link_status", path, &linkStatus);
|
||||
|
||||
// Set DisplayPortAltModeInfo
|
||||
dpData = constructAltModeData(hpd, pinAssign, linkStatus, vdo);
|
||||
(*currentPortStatus)[0].supportedAltModes.push_back(dpData);
|
||||
|
||||
return Status::SUCCESS;
|
||||
}
|
||||
|
||||
void queryVersionHelper(android::hardware::usb::Usb *usb,
|
||||
std::vector<PortStatus> *currentPortStatus) {
|
||||
Status status;
|
||||
string displayPortUsbPath;
|
||||
|
||||
pthread_mutex_lock(&usb->mLock);
|
||||
status = getPortStatusHelper(usb, currentPortStatus);
|
||||
queryMoistureDetectionStatus(currentPortStatus);
|
||||
queryPowerTransferStatus(currentPortStatus);
|
||||
queryNonCompliantChargerStatus(currentPortStatus);
|
||||
pthread_mutex_lock(&usb->mDisplayPortLock);
|
||||
if (!usb->mDisplayPortFirstSetupDone &&
|
||||
usb->getDisplayPortUsbPathHelper(&displayPortUsbPath) == Status::SUCCESS) {
|
||||
|
||||
ALOGI("usbdp: boot with display connected or usb hal restarted");
|
||||
usb->setupDisplayPortPoll();
|
||||
}
|
||||
pthread_mutex_unlock(&usb->mDisplayPortLock);
|
||||
queryDisplayPortStatus(usb, currentPortStatus);
|
||||
if (usb->mCallback != NULL) {
|
||||
ScopedAStatus ret = usb->mCallback->notifyPortStatusChange(*currentPortStatus,
|
||||
status);
|
||||
|
@ -994,7 +1133,7 @@ static void uevent_event(uint32_t /*epevents*/, struct data *payload) {
|
|||
pthread_mutex_unlock(&payload->usb->mDisplayPortLock);
|
||||
} else if (uevent_type == UeventType::CHANGE) {
|
||||
pthread_mutex_lock(&payload->usb->mDisplayPortLock);
|
||||
payload->usb->shutdownDisplayPortPoll();
|
||||
payload->usb->shutdownDisplayPortPoll(false);
|
||||
pthread_mutex_unlock(&payload->usb->mDisplayPortLock);
|
||||
}
|
||||
break;
|
||||
|
@ -1140,6 +1279,30 @@ Status Usb::getDisplayPortUsbPathHelper(string *path) {
|
|||
return result;
|
||||
}
|
||||
|
||||
Status Usb::readDisplayPortAttribute(string attribute, string usb_path, string* value) {
|
||||
string attrPath;
|
||||
|
||||
if (!strncmp(attribute.c_str(), "hpd", strlen("hpd")) ||
|
||||
!strncmp(attribute.c_str(), "pin_assignment", strlen("pin_assignment"))) {
|
||||
attrPath = usb_path + attribute;
|
||||
} else if (!strncmp(attribute.c_str(), "link_status", strlen("link_status"))) {
|
||||
attrPath = string(kDisplayPortDrmPath) + "link_status";
|
||||
} else if (!strncmp(attribute.c_str(), "vdo", strlen("vdo"))) {
|
||||
attrPath = usb_path + "/../vdo";
|
||||
} else {
|
||||
goto error;
|
||||
}
|
||||
|
||||
// Read Attribute
|
||||
if(ReadFileToString(attrPath.c_str(), value)) {
|
||||
return Status::SUCCESS;
|
||||
}
|
||||
|
||||
error:
|
||||
ALOGE("usbdp: Failed to read Type-C attribute %s", attribute.c_str());
|
||||
return Status::ERROR;
|
||||
}
|
||||
|
||||
Status Usb::writeDisplayPortAttributeOverride(string attribute, string value) {
|
||||
string attrDrmPath;
|
||||
|
||||
|
@ -1184,7 +1347,7 @@ Status Usb::writeDisplayPortAttribute(string attribute, string usb_path) {
|
|||
uint32_t temp;
|
||||
if (!::android::base::ParseUint(Trim(attrUsb), &temp)) {
|
||||
ALOGE("usbdp: failed parsing irq_hpd_count:%s", attrUsb.c_str());
|
||||
return Status::SUCCESS;
|
||||
return Status::ERROR;
|
||||
}
|
||||
// Used to cache the values read from tcpci's irq_hpd_count.
|
||||
// Update drm driver when cached value is not the same as the read value.
|
||||
|
@ -1203,7 +1366,7 @@ Status Usb::writeDisplayPortAttribute(string attribute, string usb_path) {
|
|||
} else {
|
||||
// Don't write anything
|
||||
ALOGI("usbdp: Pin config not yet chosen, nothing written.");
|
||||
return Status::SUCCESS;
|
||||
return Status::ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1232,32 +1395,46 @@ bool Usb::determineDisplayPortRetry(string linkPath, string hpdPath) {
|
|||
static int displayPortPollOpenFileHelper(const char *file, int flags) {
|
||||
int fd = open(file, flags);
|
||||
if (fd == -1) {
|
||||
ALOGE("usbdp: open at %s failed; errno=%d", file, errno);
|
||||
ALOGE("usbdp: worker: open at %s failed; errno=%d", file, errno);
|
||||
}
|
||||
return fd;
|
||||
}
|
||||
|
||||
static int armTimerFdHelper(int fd, int ms) {
|
||||
struct itimerspec ts;
|
||||
|
||||
ts.it_interval.tv_sec = 0;
|
||||
ts.it_interval.tv_nsec = 0;
|
||||
ts.it_value.tv_sec = ms / 1000;
|
||||
ts.it_value.tv_nsec = (ms % 1000) * 1000000;
|
||||
|
||||
return timerfd_settime(fd, 0, &ts, NULL);
|
||||
}
|
||||
|
||||
void *displayPortPollWork(void *param) {
|
||||
int epoll_fd;
|
||||
struct epoll_event ev_hpd, ev_pin, ev_orientation, ev_eventfd, ev_link;
|
||||
struct epoll_event ev_hpd, ev_pin, ev_orientation, ev_eventfd, ev_link, ev_debounce;
|
||||
int nevents = 0;
|
||||
int hpd_fd, pin_fd, orientation_fd, link_fd;
|
||||
int hpd_fd, pin_fd, orientation_fd, link_training_status_fd;
|
||||
int file_flags = O_RDONLY;
|
||||
int epoll_flags;
|
||||
bool orientationSet = false;
|
||||
bool pinSet = false;
|
||||
unsigned long res;
|
||||
int ret = 0;
|
||||
string displayPortUsbPath, irqHpdCountPath, hpdPath, pinAssignmentPath, orientationPath;
|
||||
string tcpcI2cBus, linkPath;
|
||||
::aidl::android::hardware::usb::Usb *usb = (::aidl::android::hardware::usb::Usb *)param;
|
||||
|
||||
usb->mDisplayPortPollRunning = true;
|
||||
usb->mDisplayPortPollStarting = false;
|
||||
|
||||
if (usb->getDisplayPortUsbPathHelper(&displayPortUsbPath) == Status::ERROR) {
|
||||
ALOGE("usbdp: could not locate usb displayport directory");
|
||||
ALOGE("usbdp: worker: could not locate usb displayport directory");
|
||||
goto usb_path_error;
|
||||
}
|
||||
|
||||
usb->mDisplayPortPollRunning = true;
|
||||
|
||||
ALOGI("usbdp: displayport usb path located at %s", displayPortUsbPath.c_str());
|
||||
ALOGI("usbdp: worker: displayport usb path located at %s", displayPortUsbPath.c_str());
|
||||
hpdPath = displayPortUsbPath + "hpd";
|
||||
pinAssignmentPath = displayPortUsbPath + "pin_assignment";
|
||||
orientationPath = "/sys/class/typec/port0/orientation";
|
||||
|
@ -1265,11 +1442,11 @@ void *displayPortPollWork(void *param) {
|
|||
|
||||
getI2cBusHelper(&tcpcI2cBus);
|
||||
irqHpdCountPath = kI2CPath + tcpcI2cBus + "/" + tcpcI2cBus + kIrqHpdCounPath;
|
||||
ALOGI("udbdp: irqHpdCountPath:%s", irqHpdCountPath.c_str());
|
||||
ALOGI("usbdp: worker: irqHpdCountPath:%s", irqHpdCountPath.c_str());
|
||||
|
||||
epoll_fd = epoll_create(64);
|
||||
if (epoll_fd == -1) {
|
||||
ALOGE("usbdp: epoll_create failed; errno=%d", errno);
|
||||
ALOGE("usbdp: worker: epoll_create failed; errno=%d", errno);
|
||||
goto epoll_fd_error;
|
||||
}
|
||||
|
||||
|
@ -1283,8 +1460,8 @@ void *displayPortPollWork(void *param) {
|
|||
== -1){
|
||||
goto orientation_fd_error;
|
||||
}
|
||||
if ((link_fd = displayPortPollOpenFileHelper(linkPath.c_str(), file_flags)) == -1){
|
||||
goto link_fd_error;
|
||||
if ((link_training_status_fd = displayPortPollOpenFileHelper(linkPath.c_str(), file_flags)) == -1){
|
||||
goto link_training_status_fd_error;
|
||||
}
|
||||
|
||||
// Set epoll_event events and flags
|
||||
|
@ -1294,30 +1471,36 @@ void *displayPortPollWork(void *param) {
|
|||
ev_orientation.events = epoll_flags;
|
||||
ev_eventfd.events = epoll_flags;
|
||||
ev_link.events = epoll_flags;
|
||||
ev_debounce.events = epoll_flags;
|
||||
ev_hpd.data.fd = hpd_fd;
|
||||
ev_pin.data.fd = pin_fd;
|
||||
ev_orientation.data.fd = orientation_fd;
|
||||
ev_eventfd.data.fd = usb->mDisplayPortEventPipe;
|
||||
ev_link.data.fd = link_fd;
|
||||
ev_link.data.fd = link_training_status_fd;
|
||||
ev_debounce.data.fd = usb->mDisplayPortDebounceTimer;
|
||||
|
||||
if (epoll_ctl(epoll_fd, EPOLL_CTL_ADD, hpd_fd, &ev_hpd) == -1) {
|
||||
ALOGE("usbdp: epoll_ctl failed to add hpd; errno=%d", errno);
|
||||
ALOGE("usbdp: worker: epoll_ctl failed to add hpd; errno=%d", errno);
|
||||
goto error;
|
||||
}
|
||||
if (epoll_ctl(epoll_fd, EPOLL_CTL_ADD, pin_fd, &ev_pin) == -1) {
|
||||
ALOGE("usbdp: epoll_ctl failed to add pin; errno=%d", errno);
|
||||
ALOGE("usbdp: worker: epoll_ctl failed to add pin; errno=%d", errno);
|
||||
goto error;
|
||||
}
|
||||
if (epoll_ctl(epoll_fd, EPOLL_CTL_ADD, orientation_fd, &ev_orientation) == -1) {
|
||||
ALOGE("usbdp: epoll_ctl failed to add orientation; errno=%d", errno);
|
||||
ALOGE("usbdp: worker: epoll_ctl failed to add orientation; errno=%d", errno);
|
||||
goto error;
|
||||
}
|
||||
if (epoll_ctl(epoll_fd, EPOLL_CTL_ADD, link_fd, &ev_link) == -1) {
|
||||
ALOGE("usbdp: epoll_ctl failed to add link status; errno=%d", errno);
|
||||
if (epoll_ctl(epoll_fd, EPOLL_CTL_ADD, link_training_status_fd, &ev_link) == -1) {
|
||||
ALOGE("usbdp: worker: epoll_ctl failed to add link status; errno=%d", errno);
|
||||
goto error;
|
||||
}
|
||||
if (epoll_ctl(epoll_fd, EPOLL_CTL_ADD, usb->mDisplayPortDebounceTimer, &ev_debounce) == -1) {
|
||||
ALOGE("usbdp: worker: epoll_ctl failed to add debounce; errno=%d", errno);
|
||||
goto error;
|
||||
}
|
||||
if (epoll_ctl(epoll_fd, EPOLL_CTL_ADD, usb->mDisplayPortEventPipe, &ev_eventfd) == -1) {
|
||||
ALOGE("usbdp: epoll_ctl failed to add orientation; errno=%d", errno);
|
||||
ALOGE("usbdp: worker: epoll_ctl failed to add orientation; errno=%d", errno);
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
@ -1328,36 +1511,62 @@ void *displayPortPollWork(void *param) {
|
|||
if (nevents == -1) {
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
ALOGE("usbdp: epoll_wait failed; errno=%d", errno);
|
||||
ALOGE("usbdp: worker: epoll_wait failed; errno=%d", errno);
|
||||
break;
|
||||
}
|
||||
|
||||
for (int n = 0; n < nevents; n++) {
|
||||
if (events[n].data.fd == hpd_fd) {
|
||||
if (!pinSet || !orientationSet) {
|
||||
ALOGW("usbdp: HPD may be set before pin_assignment and orientation");
|
||||
ALOGW("usbdp: worker: HPD may be set before pin_assignment and orientation");
|
||||
if (!pinSet &&
|
||||
usb->writeDisplayPortAttribute("pin_assignment", pinAssignmentPath) ==
|
||||
Status::SUCCESS) {
|
||||
pinSet = true;
|
||||
}
|
||||
if (!orientationSet &&
|
||||
usb->writeDisplayPortAttribute("orientation", orientationPath) ==
|
||||
Status::SUCCESS) {
|
||||
orientationSet = true;
|
||||
}
|
||||
}
|
||||
usb->writeDisplayPortAttribute("hpd", hpdPath);
|
||||
armTimerFdHelper(usb->mDisplayPortDebounceTimer, DISPLAYPORT_STATUS_DEBOUNCE_MS);
|
||||
} else if (events[n].data.fd == pin_fd) {
|
||||
usb->writeDisplayPortAttribute("pin_assignment", pinAssignmentPath);
|
||||
pinSet = true;
|
||||
if (usb->writeDisplayPortAttribute("pin_assignment", pinAssignmentPath) ==
|
||||
Status::SUCCESS) {
|
||||
pinSet = true;
|
||||
armTimerFdHelper(usb->mDisplayPortDebounceTimer, DISPLAYPORT_STATUS_DEBOUNCE_MS);
|
||||
}
|
||||
} else if (events[n].data.fd == orientation_fd) {
|
||||
usb->writeDisplayPortAttribute("orientation", orientationPath);
|
||||
orientationSet = true;
|
||||
if (usb->writeDisplayPortAttribute("orientation", orientationPath) ==
|
||||
Status::SUCCESS) {
|
||||
orientationSet = true;
|
||||
armTimerFdHelper(usb->mDisplayPortDebounceTimer, DISPLAYPORT_STATUS_DEBOUNCE_MS);
|
||||
}
|
||||
} else if (events[n].data.fd == link_training_status_fd) {
|
||||
armTimerFdHelper(usb->mDisplayPortDebounceTimer, DISPLAYPORT_STATUS_DEBOUNCE_MS);
|
||||
} else if (events[n].data.fd == usb->mDisplayPortDebounceTimer) {
|
||||
std::vector<PortStatus> currentPortStatus;
|
||||
ret = read(usb->mDisplayPortDebounceTimer, &res, sizeof(res));
|
||||
ALOGI("usbdp: dp debounce triggered, val:%lu ret:%d", res, ret);
|
||||
if (ret < 0)
|
||||
ALOGE("usbdp: debounce read errno:%d", errno);
|
||||
queryVersionHelper(usb, ¤tPortStatus);
|
||||
} else if (events[n].data.fd == usb->mDisplayPortEventPipe) {
|
||||
uint64_t flag = 0;
|
||||
if (!read(usb->mDisplayPortEventPipe, &flag, sizeof(flag))) {
|
||||
if (errno == EAGAIN)
|
||||
continue;
|
||||
ALOGI("usbdp: Shutdown eventfd read error");
|
||||
ALOGI("usbdp: worker: Shutdown eventfd read error");
|
||||
goto error;
|
||||
}
|
||||
if (flag == DISPLAYPORT_SHUTDOWN_SET) {
|
||||
ALOGI("usbdp: Shutdown eventfd triggered");
|
||||
ALOGI("usbdp: worker: Shutdown eventfd triggered");
|
||||
destroyDisplayPortThread = true;
|
||||
break;
|
||||
} else if (flag == DISPLAYPORT_IRQ_HPD_COUNT_CHECK) {
|
||||
ALOGI("usbdp: IRQ_HPD event through DISPLAYPORT_IRQ_HPD_COUNT_CHECK");
|
||||
ALOGI("usbdp: worker: IRQ_HPD event through DISPLAYPORT_IRQ_HPD_COUNT_CHECK");
|
||||
usb->writeDisplayPortAttribute("irq_hpd_count", irqHpdCountPath);
|
||||
}
|
||||
}
|
||||
|
@ -1365,26 +1574,75 @@ void *displayPortPollWork(void *param) {
|
|||
}
|
||||
|
||||
error:
|
||||
close(link_fd);
|
||||
link_fd_error:
|
||||
close(link_training_status_fd);
|
||||
link_training_status_fd_error:
|
||||
close(orientation_fd);
|
||||
orientation_fd_error:
|
||||
close(pin_fd);
|
||||
pin_fd_error:
|
||||
close(hpd_fd);
|
||||
hpd_fd_error:
|
||||
epoll_ctl(epoll_fd, EPOLL_CTL_DEL, usb->mDisplayPortDebounceTimer, &ev_debounce);
|
||||
epoll_ctl(epoll_fd, EPOLL_CTL_DEL, usb->mDisplayPortEventPipe, &ev_eventfd);
|
||||
close(epoll_fd);
|
||||
epoll_fd_error:
|
||||
usb_path_error:
|
||||
usb->mDisplayPortPollRunning = false;
|
||||
ALOGI("usbdp: Exiting worker thread");
|
||||
ALOGI("usbdp: worker: exiting worker thread");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static struct timespec setTimespecTimer(int debounceMs) {
|
||||
struct timespec to;
|
||||
struct timespec now;
|
||||
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
to.tv_nsec = now.tv_nsec + ((debounceMs % 1000) * 1000000);
|
||||
to.tv_sec = now.tv_sec + (debounceMs / 1000);
|
||||
if (to.tv_nsec >= 1000000000) {
|
||||
to.tv_nsec -= 1000000000;
|
||||
to.tv_sec += 1;
|
||||
}
|
||||
|
||||
return to;
|
||||
}
|
||||
|
||||
void Usb::setupDisplayPortPoll() {
|
||||
uint64_t flag = DISPLAYPORT_SHUTDOWN_CLEAR;
|
||||
mDisplayPortFirstSetupDone = true;
|
||||
int ret;
|
||||
|
||||
ALOGI("usbdp: setup: beginning setup for displayport poll thread");
|
||||
|
||||
/*
|
||||
* If thread is currently starting, then it hasn't setup DisplayPort fd's, and we can abandon
|
||||
* this process.
|
||||
*/
|
||||
if (mDisplayPortPollStarting) {
|
||||
ALOGI("usbdp: setup: abandoning poll thread because another startup is in progress");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check to see if thread is currently running. If it is, then we assume that it must have
|
||||
* invalid DisplayPort fd's and the new thread takes over.
|
||||
*/
|
||||
if (mDisplayPortPollRunning) {
|
||||
shutdownDisplayPortPoll(true);
|
||||
pthread_mutex_lock(&mDisplayPortCVLock);
|
||||
struct timespec to = setTimespecTimer(DISPLAYPORT_POLL_WAIT_MS);
|
||||
ret = pthread_cond_timedwait(&mDisplayPortCV, &mDisplayPortCVLock, &to);
|
||||
if (ret == ETIMEDOUT) {
|
||||
ALOGI("usbdp: setup: Wait for poll to shutdown timed out, starting new poll anyways.");
|
||||
}
|
||||
pthread_mutex_unlock(&mDisplayPortCVLock);
|
||||
}
|
||||
|
||||
// Indicate that startup procedure is initiated (mutex protects two threads running setup at
|
||||
// once)
|
||||
mDisplayPortPollStarting = true;
|
||||
|
||||
// Reset shutdown signals because shutdown() does not perform self clean-up
|
||||
write(mDisplayPortEventPipe, &flag, sizeof(flag));
|
||||
destroyDisplayPortThread = false;
|
||||
|
||||
|
@ -1392,42 +1650,60 @@ void Usb::setupDisplayPortPoll() {
|
|||
* Create a background thread to poll DisplayPort system files
|
||||
*/
|
||||
if (pthread_create(&mDisplayPortPoll, NULL, displayPortPollWork, this)) {
|
||||
ALOGE("usbdp: failed to create displayport poll thread %d", errno);
|
||||
ALOGE("usbdp: setup: failed to create displayport poll thread %d", errno);
|
||||
goto error;
|
||||
}
|
||||
ALOGI("usbdp: successfully started DisplayPort poll thread");
|
||||
ALOGI("usbdp: setup: successfully started displayport poll thread");
|
||||
return;
|
||||
|
||||
error:
|
||||
mDisplayPortPollStarting = false;
|
||||
return;
|
||||
}
|
||||
|
||||
void Usb::shutdownDisplayPortPollHelper() {
|
||||
uint64_t flag = DISPLAYPORT_SHUTDOWN_SET;
|
||||
|
||||
// Write shutdown signal to child thread.
|
||||
write(mDisplayPortEventPipe, &flag, sizeof(flag));
|
||||
pthread_join(mDisplayPortPoll, NULL);
|
||||
writeDisplayPortAttributeOverride("hpd", "0");
|
||||
pthread_mutex_lock(&mDisplayPortCVLock);
|
||||
pthread_cond_signal(&mDisplayPortCV);
|
||||
pthread_mutex_unlock(&mDisplayPortCVLock);
|
||||
}
|
||||
|
||||
void *shutdownDisplayPortPollWork(void *param) {
|
||||
::aidl::android::hardware::usb::Usb *usb = (::aidl::android::hardware::usb::Usb *)param;
|
||||
|
||||
usb->shutdownDisplayPortPollHelper();
|
||||
ALOGI("usbdp: DisplayPort Thread Shutdown");
|
||||
ALOGI("usbdp: shutdown: displayport thread shutdown complete.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void Usb::shutdownDisplayPortPoll() {
|
||||
uint64_t flag = DISPLAYPORT_SHUTDOWN_SET;
|
||||
void Usb::shutdownDisplayPortPoll(bool force) {
|
||||
string displayPortUsbPath;
|
||||
|
||||
// Determine if should shutdown thread
|
||||
// getDisplayPortUsbPathHelper locates a DisplayPort directory, no need to double check
|
||||
// directory.
|
||||
if (getDisplayPortUsbPathHelper(&displayPortUsbPath) == Status::SUCCESS) {
|
||||
ALOGI("usbdp: shutdown: beginning shutdown for displayport poll thread");
|
||||
|
||||
/*
|
||||
* Determine if should shutdown thread
|
||||
*
|
||||
* getDisplayPortUsbPathHelper locates a DisplayPort directory, no need to double check
|
||||
* directory.
|
||||
*
|
||||
* Force is put in place to shutdown even when displayPortUsbPath is still present.
|
||||
* Happens when back to back BIND events are sent and fds are no longer current.
|
||||
*/
|
||||
if (!mDisplayPortPollRunning ||
|
||||
(!force && getDisplayPortUsbPathHelper(&displayPortUsbPath) == Status::SUCCESS)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Shutdown thread, make sure to rewrite hpd because file no longer exists.
|
||||
write(mDisplayPortEventPipe, &flag, sizeof(flag));
|
||||
// Shutdown is nonblocking to let other usb operations continue
|
||||
if (pthread_create(&mDisplayPortShutdownHelper, NULL, shutdownDisplayPortPollWork, this)) {
|
||||
ALOGE("pthread creation failed %d", errno);
|
||||
ALOGE("usbdp: shutdown: shutdown worker pthread creation failed %d", errno);
|
||||
}
|
||||
writeDisplayPortAttributeOverride("hpd", "0");
|
||||
destroyDisplayPortThread = false;
|
||||
}
|
||||
|
||||
} // namespace usb
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
// Having a margin of ~3 secs for the directory and other related bookeeping
|
||||
// structures created and uvent fired.
|
||||
#define PORT_TYPE_TIMEOUT 8
|
||||
#define DISPLAYPORT_CAPABILITIES_RECEPTACLE_BIT 6
|
||||
#define DISPLAYPORT_STATUS_DEBOUNCE_MS 2000
|
||||
|
||||
namespace aidl {
|
||||
namespace android {
|
||||
|
@ -57,10 +59,17 @@ constexpr char kGadgetName[] = "11210000.dwc3";
|
|||
#define VBUS_PATH NEW_UDC_PATH "dwc3_exynos_otg_b_sess"
|
||||
#define USB_DATA_PATH NEW_UDC_PATH "usb_data_enabled"
|
||||
|
||||
#define LINK_TRAINING_STATUS_UNKNOWN "0"
|
||||
#define LINK_TRAINING_STATUS_SUCCESS "1"
|
||||
#define LINK_TRAINING_STATUS_FAILURE "2"
|
||||
#define LINK_TRAINING_STATUS_FAILURE_SINK "3"
|
||||
|
||||
#define DISPLAYPORT_SHUTDOWN_CLEAR 0
|
||||
#define DISPLAYPORT_SHUTDOWN_SET 1
|
||||
#define DISPLAYPORT_IRQ_HPD_COUNT_CHECK 3
|
||||
|
||||
#define DISPLAYPORT_POLL_WAIT_MS 100
|
||||
|
||||
struct Usb : public BnUsb {
|
||||
Usb();
|
||||
|
||||
|
@ -79,12 +88,13 @@ struct Usb : public BnUsb {
|
|||
ScopedAStatus resetUsbPort(const string& in_portName, int64_t in_transactionId) override;
|
||||
|
||||
Status getDisplayPortUsbPathHelper(string *path);
|
||||
Status readDisplayPortAttribute(string attribute, string usb_path, string* value);
|
||||
Status writeDisplayPortAttributeOverride(string attribute, string value);
|
||||
Status writeDisplayPortAttribute(string attribute, string usb_path);
|
||||
bool determineDisplayPortRetry(string linkPath, string hpdPath);
|
||||
void setupDisplayPortPoll();
|
||||
void shutdownDisplayPortPollHelper();
|
||||
void shutdownDisplayPortPoll();
|
||||
void shutdownDisplayPortPoll(bool force);
|
||||
|
||||
std::shared_ptr<::aidl::android::hardware::usb::IUsbCallback> mCallback;
|
||||
// Protects mCallback variable
|
||||
|
@ -106,6 +116,10 @@ struct Usb : public BnUsb {
|
|||
bool mUsbDataEnabled;
|
||||
// True when mDisplayPortPoll pthread is running
|
||||
volatile bool mDisplayPortPollRunning;
|
||||
volatile bool mDisplayPortPollStarting;
|
||||
pthread_cond_t mDisplayPortCV;
|
||||
pthread_mutex_t mDisplayPortCVLock;
|
||||
volatile bool mDisplayPortFirstSetupDone;
|
||||
// Used to cache the values read from tcpci's irq_hpd_count.
|
||||
// Update drm driver when cached value is not the same as the read value.
|
||||
uint32_t mIrqHpdCountCache;
|
||||
|
@ -115,6 +129,14 @@ struct Usb : public BnUsb {
|
|||
pthread_mutex_t mDisplayPortLock;
|
||||
// eventfd to signal DisplayPort thread
|
||||
int mDisplayPortEventPipe;
|
||||
|
||||
/*
|
||||
* eventfd to set DisplayPort framework update debounce timer. Debounce timer is necessary for
|
||||
* 1) allowing enough time for each sysfs node needed to set HPD high in the drm to populate
|
||||
* 2) preventing multiple IRQs that trigger link training failures from continuously
|
||||
* sending notifications to the frameworks layer.
|
||||
*/
|
||||
int mDisplayPortDebounceTimer;
|
||||
private:
|
||||
pthread_t mPoll;
|
||||
pthread_t mDisplayPortPoll;
|
||||
|
|
|
@ -68,6 +68,16 @@ on post-fs
|
|||
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-7/7-0025/usb_limit_source_enable
|
||||
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-8/8-0025/usb_limit_source_enable
|
||||
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-9/9-0025/usb_limit_source_enable
|
||||
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-0/0-0025/update_sdp_enum_timeout
|
||||
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-1/1-0025/update_sdp_enum_timeout
|
||||
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-2/2-0025/update_sdp_enum_timeout
|
||||
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-3/3-0025/update_sdp_enum_timeout
|
||||
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-4/4-0025/update_sdp_enum_timeout
|
||||
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-5/5-0025/update_sdp_enum_timeout
|
||||
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-6/6-0025/update_sdp_enum_timeout
|
||||
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-7/7-0025/update_sdp_enum_timeout
|
||||
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-8/8-0025/update_sdp_enum_timeout
|
||||
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-9/9-0025/update_sdp_enum_timeout
|
||||
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/hpd
|
||||
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/irq_hpd
|
||||
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/orientation
|
||||
|
@ -143,6 +153,16 @@ on post-fs
|
|||
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-7/7-0025/usb_limit_source_enable
|
||||
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-8/8-0025/usb_limit_source_enable
|
||||
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-9/9-0025/usb_limit_source_enable
|
||||
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-0/0-0025/update_sdp_enum_timeout
|
||||
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-1/1-0025/update_sdp_enum_timeout
|
||||
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-2/2-0025/update_sdp_enum_timeout
|
||||
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-3/3-0025/update_sdp_enum_timeout
|
||||
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-4/4-0025/update_sdp_enum_timeout
|
||||
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-5/5-0025/update_sdp_enum_timeout
|
||||
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-6/6-0025/update_sdp_enum_timeout
|
||||
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-7/7-0025/update_sdp_enum_timeout
|
||||
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-8/8-0025/update_sdp_enum_timeout
|
||||
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-9/9-0025/update_sdp_enum_timeout
|
||||
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/hpd
|
||||
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/irq_hpd
|
||||
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/orientation
|
||||
|
|
|
@ -44,3 +44,6 @@ WIFI_DRIVER_STATE_OFF := "OFF"
|
|||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_WIFI_PATH)/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf \
|
||||
$(LOCAL_WIFI_PATH)/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf
|
||||
|
||||
# Add WIFI_FEATURE_IMU_DETECTION to soong_config
|
||||
$(call soong_config_set,wifi,feature_imu_detection,$(WIFI_FEATURE_IMU_DETECTION))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue