treewide: Import realme changes
Signed-off-by: SagarMakhar <sagarmakhar@gmail.com>
This commit is contained in:
@@ -248,9 +248,9 @@ $(RTIC_DTB): $(INSTALLED_KERNEL_TARGET)
|
||||
# Creating a dtb.img once the kernel is compiled if TARGET_KERNEL_APPEND_DTB is set to be false
|
||||
$(INSTALLED_DTBIMAGE_TARGET): $(TARGET_PREBUILT_INT_KERNEL) $(INSTALLED_KERNEL_TARGET) $(RTIC_DTB)
|
||||
$(hide) if [ -d "$(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/dts/vendor/" ]; then \
|
||||
cat $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/dts/vendor/qcom/*.dtb $(RTIC_DTB) > $@; \
|
||||
cat $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/dts/vendor/*/*.dtb $(RTIC_DTB) > $@; \
|
||||
else \
|
||||
cat $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/dts/qcom/*.dtb $(RTIC_DTB) > $@; \
|
||||
cat $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/dts/*/*.dtb $(RTIC_DTB) > $@; \
|
||||
fi
|
||||
|
||||
.PHONY: kerneltags
|
||||
|
||||
18
Kconfig
18
Kconfig
@@ -5,6 +5,24 @@
|
||||
#
|
||||
mainmenu "Linux/$ARCH $KERNELVERSION Kernel Configuration"
|
||||
|
||||
#ifdef CONFIG_OPLUS_SYSTEM_KERNEL
|
||||
#Wen.Luo@Bsp.Kernel.Stability,2020/4/20,OPLUS_SYSTEM_KERNEL_QCOM/OPLUS_SYSTEM_KERNEL_MTK add for qcom/mtk platform
|
||||
config OPLUS_SYSTEM_KERNEL_QCOM
|
||||
bool "config oplus system feature "
|
||||
default y
|
||||
help
|
||||
define this config to Distinguish between qcom and mtk platform
|
||||
|
||||
config OPLUS_FEATURE_PANIC_FLUSH
|
||||
bool "fsync optimization "
|
||||
default y
|
||||
help
|
||||
define this config to fsync optimization
|
||||
|
||||
#endif /*CONFIG_OPLUS_SYSTEM_KERNEL*/
|
||||
|
||||
|
||||
|
||||
config SRCARCH
|
||||
string
|
||||
option env="SRCARCH"
|
||||
|
||||
24
Makefile
24
Makefile
@@ -445,8 +445,30 @@ KBUILD_AFLAGS_MODULE := -DMODULE
|
||||
KBUILD_CFLAGS_MODULE := -DMODULE
|
||||
KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
|
||||
GCC_PLUGINS_CFLAGS :=
|
||||
CLANG_FLAGS :=
|
||||
CLANG_FLAGS :=
|
||||
|
||||
|
||||
#ifdef OPLUS_FEATURE_BUILD
|
||||
#Sunliang@TECH.SysTech.Build.BaseConfig, 2020/03/18, oplus customzation for flags or other variabls
|
||||
-include OplusKernelEnvConfig.mk
|
||||
#endif // OPLUS_FEATURE_BUILD
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
ifeq ($(TARGET_BUILD_VARIANT), user)
|
||||
KBUILD_CFLAGS += -DCONFIG_OPPO_USER_BUILD
|
||||
else
|
||||
KBUILD_CFLAGS += -DCONFIG_OPPO_DEBUG_BUILD
|
||||
endif
|
||||
#endif OPLUS_BUG_STABILITY
|
||||
|
||||
|
||||
# ifdef OPLUS_FEATURE_CHG_BASIC
|
||||
# Gang.Yan@PSW.BSP.CHG.Basic, 2020/03/12, sjc Add for 806 high/low temp aging test
|
||||
ifeq ($(OPPO_HIGH_TEMP_VERSION),true)
|
||||
KBUILD_CFLAGS += -DCONFIG_HIGH_TEMP_VERSION
|
||||
KBUILD_CPPFLAGS += -DCONFIG_HIGH_TEMP_VERSION
|
||||
endif
|
||||
#endif OPLUS_FEATURE_CHG_BASIC
|
||||
export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
|
||||
export CPP AR NM STRIP OBJCOPY OBJDUMP HOSTLDFLAGS HOST_LOADLIBES
|
||||
export MAKE AWK GENKSYMS INSTALLKERNEL PERL PYTHON UTS_MACHINE
|
||||
|
||||
@@ -1,29 +1,37 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
dts-dirs += actions
|
||||
dts-dirs += al
|
||||
dts-dirs += allwinner
|
||||
dts-dirs += altera
|
||||
dts-dirs += amd
|
||||
dts-dirs += amlogic
|
||||
dts-dirs += apm
|
||||
dts-dirs += arm
|
||||
dts-dirs += broadcom
|
||||
dts-dirs += cavium
|
||||
dts-dirs += exynos
|
||||
dts-dirs += freescale
|
||||
dts-dirs += hisilicon
|
||||
dts-dirs += marvell
|
||||
dts-dirs += mediatek
|
||||
dts-dirs += nvidia
|
||||
dts-dirs += qcom
|
||||
dts-dirs += realtek
|
||||
dts-dirs += renesas
|
||||
dts-dirs += rockchip
|
||||
dts-dirs += socionext
|
||||
dts-dirs += sprd
|
||||
dts-dirs += xilinx
|
||||
dts-dirs += lg
|
||||
dts-dirs += zte
|
||||
#ifdef VENDOR_EDIT
|
||||
#/*ye.zhang@BSP.Bootloader.Bootflow, 2020-6-18, Add for oppo project*/
|
||||
#dts-dirs += actions
|
||||
#dts-dirs += al
|
||||
#dts-dirs += allwinner
|
||||
#dts-dirs += altera
|
||||
#dts-dirs += amd
|
||||
#dts-dirs += amlogic
|
||||
#dts-dirs += apm
|
||||
#dts-dirs += arm
|
||||
#dts-dirs += broadcom
|
||||
#dts-dirs += cavium
|
||||
#dts-dirs += exynos
|
||||
#dts-dirs += freescale
|
||||
#dts-dirs += hisilicon
|
||||
#dts-dirs += marvell
|
||||
#dts-dirs += mediatek
|
||||
#dts-dirs += nvidia
|
||||
#dts-dirs += qcom
|
||||
#dts-dirs += realtek
|
||||
#dts-dirs += renesas
|
||||
#dts-dirs += rockchip
|
||||
#dts-dirs += socionext
|
||||
#dts-dirs += sprd
|
||||
#dts-dirs += xilinx
|
||||
#dts-dirs += lg
|
||||
#dts-dirs += zte
|
||||
#else
|
||||
#dts-dirs += 19771
|
||||
#dts-dirs += 19721
|
||||
#dts-dirs += 206B1
|
||||
#dts-dirs += 20711
|
||||
#endif
|
||||
|
||||
subdir-y := $(dts-dirs)
|
||||
|
||||
|
||||
@@ -1463,6 +1463,20 @@
|
||||
qcom,guard-memory;
|
||||
};
|
||||
|
||||
//#ifdef VENDOR_EDIT
|
||||
//Zhengpeng.Tan@NW.AP.NV.892767, 2016/11/30
|
||||
//#ifdef FEATURE_OPPO_NV_BACKUP
|
||||
//add for creating a shared memory with uio for nv backup and restore
|
||||
qcom,oembackup_sharedmem@0 {
|
||||
compatible = "qcom,sharedmem-uio";
|
||||
reg = <0x0 0x00100000>;
|
||||
reg-names = "oembackup";
|
||||
qcom,client-id = <0x00000004>;
|
||||
qcom,guard-memory;
|
||||
};
|
||||
//#endif /* FEATURE_OPPO_NV_BACKUP */
|
||||
//#endif /* VENDOR_EDIT */
|
||||
|
||||
pil_modem: qcom,mss@4080000 {
|
||||
compatible = "qcom,pil-tz-generic";
|
||||
reg = <0x4080000 0x100>;
|
||||
|
||||
@@ -594,6 +594,16 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
qcom,cpu-to-ahb-path {
|
||||
qcom,msm-bus,name = "ahbpath";
|
||||
qcom,msm-bus,num-cases = <3>;
|
||||
qcom,msm-bus,num-paths = <1>;
|
||||
qcom,msm-bus,vectors-KBps =
|
||||
<1 598 0 0>, // off
|
||||
<1 598 0 100>, // min freq
|
||||
<1 598 0 9999999>; // max freq
|
||||
};
|
||||
};
|
||||
|
||||
kgsl_msm_iommu: qcom,kgsl-iommu@5040000 {
|
||||
|
||||
@@ -2478,6 +2478,19 @@
|
||||
qcom,guard-memory;
|
||||
};
|
||||
|
||||
//#ifdef VENDOR_EDIT
|
||||
//Zhengpeng.Tan@NW.AP.NV.892767, 2016/11/30
|
||||
//#ifdef FEATURE_OPPO_NV_BACKUP
|
||||
//add for creating a shared memory with uio for nv backup and restore
|
||||
qcom,oembackup_sharedmem@0 {
|
||||
compatible = "qcom,sharedmem-uio";
|
||||
reg = <0x0 0x00100000>;
|
||||
reg-names = "oembackup";
|
||||
qcom,client-id = <0x00000004>;
|
||||
qcom,guard-memory;
|
||||
};
|
||||
//#endif /* FEATURE_OPPO_NV_BACKUP */
|
||||
//#endif /* VENDOR_EDIT */
|
||||
qcom_cedev: qcedev@1de0000 {
|
||||
compatible = "qcom,qcedev";
|
||||
reg = <0x1de0000 0x20000>,
|
||||
|
||||
@@ -2680,6 +2680,19 @@
|
||||
qcom,guard-memory;
|
||||
};
|
||||
|
||||
//#ifdef VENDOR_EDIT
|
||||
//Zhengpeng.Tan@NW.AP.NV.892767, 2016/11/30
|
||||
//#ifdef FEATURE_OPPO_NV_BACKUP
|
||||
//add for creating a shared memory with uio for nv backup and restore
|
||||
qcom,oembackup_sharedmem@0 {
|
||||
compatible = "qcom,sharedmem-uio";
|
||||
reg = <0x0 0x00100000>;
|
||||
reg-names = "oembackup";
|
||||
qcom,client-id = <0x00000004>;
|
||||
qcom,guard-memory;
|
||||
};
|
||||
//#endif /* FEATURE_OPPO_NV_BACKUP */
|
||||
//#endif /* VENDOR_EDIT */
|
||||
llcc_pmu: llcc-pmu@90cc000 {
|
||||
compatible = "qcom,qcom-llcc-pmu";
|
||||
reg = <0x090cc000 0x300>;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
306
arch/arm64/configs/vendor/atoll-perf_defconfig
vendored
306
arch/arm64/configs/vendor/atoll-perf_defconfig
vendored
@@ -64,7 +64,11 @@ CONFIG_PCI_MSM=y
|
||||
CONFIG_SCHED_MC=y
|
||||
CONFIG_NR_CPUS=8
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_HZ_100=y
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
#wenbin.liu@PSW.BSP.MM, 2018/06/14 Delete for improve performance
|
||||
#CONFIG_HZ_100=y
|
||||
CONFIG_HZ_250=y
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
CONFIG_MEMORY_HOTPLUG=y
|
||||
CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y
|
||||
CONFIG_MEMORY_HOTPLUG_MOVABLE_NODE=y
|
||||
@@ -257,6 +261,11 @@ CONFIG_CFG80211_REG_CELLULAR_HINTS=y
|
||||
CONFIG_CFG80211_INTERNAL_REGDB=y
|
||||
CONFIG_RFKILL=y
|
||||
CONFIG_NFC_NQ=y
|
||||
#ifdef OPLUS_NFC_BRINGUP
|
||||
#DengWeiwei@CONNECTIVITY.NFC.HARDWARE.253154, 2020/08/09
|
||||
#Add for the kernel Macro for NXP PN557 NFC kernel
|
||||
CONFIG_NFC_PN553_DEVICES=y
|
||||
#endif /*OPLUS_NFC_BRINGUP*/
|
||||
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
|
||||
CONFIG_REGMAP_WCD_IRQ=y
|
||||
CONFIG_REGMAP_ALLOW_WRITE_DEBUGFS=y
|
||||
@@ -323,39 +332,75 @@ CONFIG_CLD_LL_CORE=y
|
||||
CONFIG_CNSS_GENL=y
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
CONFIG_KEYBOARD_GPIO=y
|
||||
#ifdef VENDOR_EDIT
|
||||
#/*lizhijie@BSP.CHG.Basic, 2020/02/25, Add for Joystick */
|
||||
CONFIG_INPUT_JOYSTICK=y
|
||||
CONFIG_JOYSTICK_XPAD=y
|
||||
CONFIG_JOYSTICK_XPAD_FF=y
|
||||
CONFIG_JOYSTICK_XPAD_LEDS=y
|
||||
#endif /* VENDOR_EDIT */
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
CONFIG_INPUT_JOYSTICK=y
|
||||
CONFIG_JOYSTICK_XPAD=y
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
CONFIG_TOUCHSCREEN_ATMEL_MXT=y
|
||||
CONFIG_TOUCHSCREEN_ST=y
|
||||
CONFIG_TOUCHSCREEN_HIMAX_CHIPSET=y
|
||||
CONFIG_TOUCHSCREEN_HIMAX_I2C=y
|
||||
CONFIG_TOUCHSCREEN_HIMAX_INCELL=y
|
||||
CONFIG_TOUCHSCREEN_HIMAX_IC_HX83112=y
|
||||
CONFIG_TOUCHSCREEN_HIMAX_DEBUG=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_CORE=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_RMI_DEV=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_TEST_REPORTING=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_CORE=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_TOUCH=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_DEVICE=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_TESTING=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_REFLASH=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_RECOVERY=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_ZEROFLASH=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_DIAGNOSTICS=y
|
||||
#ifdef VENDOR_EDIT
|
||||
#Qicai.gu@Bsp.Group.Tp, 2020/02/26, Add for oppo project
|
||||
#CONFIG_TOUCHSCREEN_ATMEL_MXT=y
|
||||
#CONFIG_TOUCHSCREEN_ST=y
|
||||
#CONFIG_TOUCHSCREEN_HIMAX_CHIPSET=y
|
||||
#CONFIG_TOUCHSCREEN_HIMAX_I2C=y
|
||||
#CONFIG_TOUCHSCREEN_HIMAX_INCELL=y
|
||||
#CONFIG_TOUCHSCREEN_HIMAX_IC_HX83112=y
|
||||
#CONFIG_TOUCHSCREEN_HIMAX_DEBUG=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_CORE=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_RMI_DEV=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_TEST_REPORTING=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_CORE=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_TOUCH=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_DEVICE=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_TESTING=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_REFLASH=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_RECOVERY=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_ZEROFLASH=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_DIAGNOSTICS=y
|
||||
|
||||
CONFIG_TOUCHPANEL_OPPO=y
|
||||
CONFIG_TOUCHPANEL_GOODIX=y
|
||||
CONFIG_TOUCHPANEL_GOODIX_GT9886=y
|
||||
CONFIG_TOUCHIRQ_UPDATE_QOS=y
|
||||
|
||||
#ifdef OPLUS_FEATURE_TP_BASIC
|
||||
#Qicai.gu add for FT3518 BSP.TP 2020/8/9
|
||||
CONFIG_TOUCHPANEL_FOCAL=y
|
||||
CONFIG_TOUCHPANEL_FOCAL_FT3518=y
|
||||
#endif /*OPLUS_FEATURE_TP_BASIC*/
|
||||
|
||||
#zhaifeibiao@ODM_LQ@BSP.touch,2020/11/03,Add for oppo project
|
||||
CONFIG_TOUCHPANEL_NOVA_NT36672C_NOFLASH=y
|
||||
CONFIG_TOUCHPANEL_NOVA=y
|
||||
CONFIG_TOUCHPANEL_NEW_SET_IRQ_WAKE=y
|
||||
#ifdef VENDOR_EDIT
|
||||
#lujiang.yu add for 567 BSP.TP 2020/4/3
|
||||
CONFIG_TOUCHPANEL_SAMSUNG=y
|
||||
CONFIG_TOUCHPANEL_SAMSUNG_S6SY771=y
|
||||
#endif
|
||||
|
||||
#CONFIG_TOUCHPANEL_NEW_SET_IRQ_WAKE=y
|
||||
#endif
|
||||
CONFIG_INPUT_MISC=y
|
||||
CONFIG_INPUT_QPNP_POWER_ON=y
|
||||
CONFIG_INPUT_UINPUT=y
|
||||
# CONFIG_SERIO_SERPORT is not set
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
# CONFIG_DEVMEM is not set
|
||||
#ifdef VENDOR_EDIT //Nanwei.Deng@power 2020.8.26 for ftm console enable
|
||||
CONFIG_SERIAL_MSM_GENI=y
|
||||
CONFIG_SERIAL_MSM_GENI_CONSOLE=y
|
||||
#endif
|
||||
CONFIG_SERIAL_MSM_WITH_HALF_SAMPLING=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_MSM_LEGACY=y
|
||||
@@ -387,8 +432,42 @@ CONFIG_QCOM_DLOAD_MODE=y
|
||||
CONFIG_POWER_RESET_XGENE=y
|
||||
CONFIG_POWER_RESET_SYSCON=y
|
||||
CONFIG_QPNP_QG=y
|
||||
CONFIG_SMB1355_SLAVE_CHARGER=y
|
||||
#ifdef VENDOR_EDIT
|
||||
#/* lizhijie@BSP.CHG.Basic, 2020/02/25, Modify for charging */
|
||||
#CONFIG_SMB1355_SLAVE_CHARGER=y
|
||||
#endif
|
||||
CONFIG_QPNP_SMB5=y
|
||||
#ifdef VENDOR_EDIT
|
||||
#/* lizhijie@BSP.CHG.Basic, 2020/02/25, Modify for charging */
|
||||
CONFIG_OPPO_SM7125R_CHARGER=y
|
||||
CONFIG_OPPO_CHIP_SOC_NODE=y
|
||||
CONFIG_OPPO_SHORT_HW_CHECK=y
|
||||
CONFIG_OPPO_SHORT_USERSPACE=y
|
||||
CONFIG_OPPO_SHIP_MODE_SUPPORT=y
|
||||
CONFIG_OPPO_SMART_CHARGER_SUPPORT=y
|
||||
CONFIG_OPPO_SHORT_C_BATT_CHECK=y
|
||||
CONFIG_OPPO_CHECK_CHARGERID_VOLT=y
|
||||
CONFIG_OPPO_SHORT_IC_CHECK=y
|
||||
CONFIG_OPPO_CALL_MODE_SUPPORT=y
|
||||
CONFIG_OPPO_SMOOTH_SOC=y
|
||||
CONFIG_HID_SONY=y
|
||||
CONFIG_SONY_FF=y
|
||||
CONFIG_HID_BETOP_FF=y
|
||||
CONFIG_OPLUS_CHARGER=y
|
||||
CONFIG_OPLUS_SM7125R_CHARGER=y
|
||||
CONFIG_OPLUS_CHIP_SOC_NODE=y
|
||||
CONFIG_OPLUS_SHORT_HW_CHECK=y
|
||||
CONFIG_OPLUS_SHORT_USERSPACE=y
|
||||
CONFIG_OPLUS_SHIP_MODE_SUPPORT=y
|
||||
CONFIG_OPLUS_SMART_CHARGER_SUPPORT=y
|
||||
CONFIG_OPLUS_SHORT_C_BATT_CHECK=y
|
||||
CONFIG_OPLUS_CHECK_CHARGERID_VOLT=y
|
||||
CONFIG_OPLUS_SHORT_IC_CHECK=y
|
||||
CONFIG_OPLUS_CALL_MODE_SUPPORT=y
|
||||
CONFIG_OPLUS_SMOOTH_SOC=y
|
||||
CONFIG_OPLUS_WPC_INTERFACE_ENABLE=y
|
||||
CONFIG_OPLUS_CHARGER_OPTIGA=y
|
||||
#endif
|
||||
CONFIG_SMB1390_CHARGE_PUMP_PSY=y
|
||||
CONFIG_SMB1398_CHARGER=y
|
||||
CONFIG_THERMAL=y
|
||||
@@ -586,9 +665,12 @@ CONFIG_MSM_QMP=y
|
||||
CONFIG_IOMMU_IO_PGTABLE_FAST=y
|
||||
CONFIG_ARM_SMMU=y
|
||||
CONFIG_QCOM_LAZY_MAPPING=y
|
||||
CONFIG_IOMMU_DEBUG=y
|
||||
CONFIG_IOMMU_DEBUG_TRACKING=y
|
||||
CONFIG_IOMMU_TESTS=y
|
||||
# ifdef OPLUS_BUG_STABILITY
|
||||
# rendong.shi@BSP.kernel.debug,2017/5/20,remove for some secure issue from qcom request
|
||||
# CONFIG_IOMMU_DEBUG is not set
|
||||
# CONFIG_IOMMU_DEBUG_TRACKING is not set
|
||||
# CONFIG_IOMMU_TESTS is not set
|
||||
# endif
|
||||
CONFIG_RPMSG_CHAR=y
|
||||
CONFIG_RPMSG_QCOM_GLINK_SMEM=y
|
||||
CONFIG_RPMSG_QCOM_GLINK_SPI=y
|
||||
@@ -683,6 +765,12 @@ CONFIG_EXT4_FS=y
|
||||
CONFIG_EXT4_FS_POSIX_ACL=y
|
||||
CONFIG_EXT4_FS_SECURITY=y
|
||||
CONFIG_EXT4_ENCRYPTION=y
|
||||
CONFIG_EXT4_FS_ENCRYPTION=y
|
||||
CONFIG_EXT4_FS_ICE_ENCRYPTION=y
|
||||
#ifdef OPLUS_FEATURE_EXFAT_SUPPORT//huyu@BSP.Storage,add 2020/5/8 for kernel 4.19 exfat
|
||||
CONFIG_NLS_UTF8=y
|
||||
CONFIG_EXFAT_FS=y
|
||||
# endif
|
||||
CONFIG_F2FS_FS=y
|
||||
CONFIG_F2FS_FS_SECURITY=y
|
||||
CONFIG_F2FS_FS_ENCRYPTION=y
|
||||
@@ -748,3 +836,167 @@ CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
|
||||
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
|
||||
CONFIG_STACK_HASH_ORDER_SHIFT=12
|
||||
|
||||
#ifdef VENDOR_EDIT
|
||||
#/*ye.zhang@BSP.Bootloader.Bootflow, 2020-6-18, Add for oppo project*/
|
||||
CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y
|
||||
CONFIG_OPPO_COMMON_SOFT=y
|
||||
CONFIG_OPPO_DEVICE_IFNO=y
|
||||
CONFIG_OPLUS_RF_CABLE_MONITOR=y
|
||||
#endif
|
||||
|
||||
#ifdef VENDOR_EDIT
|
||||
#huangjianan@TECH.Storage.FS, 2020/06/03, Add for fs feature
|
||||
CONFIG_OPLUS_FEATURE_OF2FS=y
|
||||
CONFIG_OPLUS_FEATURE_PANIC_FLUSH=y
|
||||
#endif
|
||||
|
||||
#ifdef OPLUS_FEATURE_QCOM_PMICWD
|
||||
#shukai@BSP.Kernel.Stability, 2020/08/06, Add for qcom pmic watchdog
|
||||
CONFIG_OPLUS_FEATURE_QCOM_PMICWD=y
|
||||
#endif
|
||||
CONFIG_OPLUS_FEATURE_DUMP_DEVICE_INFO=y
|
||||
#ifdef OPLUS_SYSTEM_KERNEL
|
||||
#wen.luo@BSP.Kernel.Stability, 2020/03/26, all system oplus feature writer here
|
||||
CONFIG_OPLUS_FEATURE_PHOENIX=y
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
CONFIG_OPLUS_FEATURE_HUNG_TASK_ENHANCE=y
|
||||
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=60
|
||||
#endif
|
||||
|
||||
#zoulian@BSP.Fingerprint.Basic, 2020/03/02, add for fingerprint driver
|
||||
#ifdef OPLUS_FEATURE_FINGERPRINT
|
||||
CONFIG_OPPO_FINGERPRINT=y
|
||||
CONFIG_OPPO_FINGERPRINT_QCOM=y
|
||||
CONFIG_OPPO_FINGERPRINT_GOODIX_OPTICAL=y
|
||||
CONFIG_OPPO_FINGERPRINT_JIIOV_OPTICAL=y
|
||||
#endif
|
||||
|
||||
#fei.zhang@BSP.Kernel.Stability, 2020/03/31, Add for shutdown detect
|
||||
CONFIG_OPLUS_FEATURE_SHUTDOWN_DETECT=y
|
||||
|
||||
#runyu.ouyang@BSP.Kernel.Stability, 2020/04/03, add slabtrace function
|
||||
#CONFIG_OPLUS_FEATURE_SLABTRACE_DEBUG is not set
|
||||
|
||||
CONFIG_OPLUS_FEATURE_OPROJECT=y
|
||||
|
||||
#ifdef OPLUS_FEATURE_POWERINFO_STANDBY
|
||||
#/*Nanwei.Deng@BSP.Power.Basic, 2020/07/27, add for wakelock profiler*/
|
||||
CONFIG_OPLUS_POWER_QCOM=y
|
||||
CONFIG_OPLUS_WAKELOCK_PROFILER=y
|
||||
#endif
|
||||
|
||||
#ifdef OPLUS_FEATURE_MODEM_MINIDUMP
|
||||
#ChenWeidong@NETWORK.RF, 2019/12/05, add for modem crash str save
|
||||
CONFIG_OPLUS_FEATURE_RECORD_MDMRST=y
|
||||
#endif
|
||||
|
||||
#ifdef OPLUS_FEATURE_ACM
|
||||
#Yuwei.Guan@BSP.Kernel.FS,2020/07/08, Add for acm
|
||||
CONFIG_OPLUS_FEATURE_ACM=y
|
||||
CONFIG_OPLUS_FEATURE_ACM_LOGGING=y
|
||||
#endif /* OPLUS_FEATURE_ACM */
|
||||
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
#/* Liujie.Xie@TECH.Kernel.Sched, 2020-05-20, add jank info monitor support*/
|
||||
CONFIG_OPPO_JANK_INFO=y
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
#/* Huacai.Zhou@PSW.BSP.Kernel.MM, 2018-07-07, add alloc wait monitor support*/
|
||||
CONFIG_OPPO_MEM_MONITOR=y
|
||||
CONFIG_FG_TASK_UID=y
|
||||
CONFIG_OPPO_HEALTHINFO=y
|
||||
CONFIG_SLUB_DEBUG=y
|
||||
CONFIG_SCHEDSTATS=y
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
|
||||
#ifdef OPLUS_FEATURE_MULTI_KSWAPD
|
||||
CONFIG_OPLUS_MULTI_KSWAPD=y
|
||||
#endif /*OPLUS_FEATURE_MULTI_KSWAPD*/
|
||||
|
||||
#ifdef OPLUS_FEATURE_TP_BASIC
|
||||
#Qicai.Gu@BSP.TP, 2020/08/25, modify for sim detect
|
||||
CONFIG_SIM_DETECT=y
|
||||
#endif
|
||||
|
||||
#ifdef OPLUS_FEATURE_ZRAM_OPT
|
||||
CONFIG_OPLUS_ZRAM_OPT=y
|
||||
CONFIG_CRYPTO_LZ4=y
|
||||
CONFIG_PGTABLE_MAPPING=y
|
||||
#endif /*OPLUS_FEATURE_ZRAM_OPT*/
|
||||
|
||||
#ifdef OPLUS_FEATURE_FG_IO_OPT
|
||||
#wangtao@BSP.Kernel.mm 2020/08/24, increase priority of foreground IO
|
||||
CONFIG_OPPO_FG_IO_OPT=y
|
||||
#endif
|
||||
|
||||
#ifdef OPLUS_FEATURE_IOMONITOR
|
||||
CONFIG_IOMONITOR=y
|
||||
CONFIG_IOMONITOR_WITH_F2FS=y
|
||||
#endif /*OPLUS_FEATURE_IOMONITOR*/
|
||||
|
||||
#ifdef OPLUS_FEATURE_LOWMEM_DBG
|
||||
#Hailong.Liu@BSP.Kernel.MM, 2020/06/19, Add for dump memory usage when lowmmem occurs.
|
||||
CONFIG_OPLUS_FEATURE_LOWMEM_DBG=y
|
||||
#endif /* OPLUS_FEATURE_LOWMEM_DBG */
|
||||
|
||||
#ifdef OPLUS_FEATURE_HANS_FREEZE
|
||||
#Kun.Zhou@ROM.Framework, 2019/09/23, add for hans freeze manager
|
||||
CONFIG_OPPO_HANS=y
|
||||
#endif /*OPLUS_FEATURE_HANS_FREEZE*/
|
||||
|
||||
#Jiang.Li@TECH.BSP.Stability.PMIC_MONITOR, 2020/04/22
|
||||
CONFIG_OPLUS_FEATURE_PMIC_MONITOR=y
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
#zhangzongyu@BSP.Kernel.Stability, 2020/05/10, Add for dump device info
|
||||
CONFIG_PSTORE=y
|
||||
CONFIG_PSTORE_CONSOLE=y
|
||||
CONFIG_PSTORE_PMSG=y
|
||||
CONFIG_PSTORE_RAM=y
|
||||
#endif
|
||||
|
||||
#Fuchun.Liao@BSP.CHG.Basic 2020/04/09 add for qcom minidump customized
|
||||
CONFIG_OPLUS_FEATURE_QCOM_MINIDUMP_ENHANCE=y
|
||||
|
||||
#ifdef OPLUS_FEATURE_ABNORMAL_CPU
|
||||
#/* Kun.Zhou@ANDROID.PWS, 2020/08/05, Add for BG CPU abnormal detection */
|
||||
CONFIG_CFS_BANDWIDTH=y
|
||||
#endif /* OPLUS_FEATURE_ABNORMAL_CPU *
|
||||
|
||||
#ifdef VENDOR_EDIT
|
||||
#/* Hank.liu@TECH.PLAT.Storage, 2019-10-31, add UFS+ hpb and tw driver*/
|
||||
CONFIG_UFSFEATURE=y
|
||||
CONFIG_UFSHPB=y
|
||||
CONFIG_UFSTW=y
|
||||
#CONFIG_UFSTW_DEBUGDRV=y
|
||||
CONFIG_HPB_SUP_ONLY_4=y
|
||||
CONFIG_HPB_SUP_8_TO_32=y
|
||||
CONFIG_HPB_SUP_OVER_36=y
|
||||
CONFIG_UFSTW_IGNORE_GUARANTEE_BIT=y
|
||||
#endif
|
||||
|
||||
#temp enable RTB log for debug ,Should be remove in release version
|
||||
CONFIG_QCOM_RTB=y
|
||||
CONFIG_QCOM_RTB_SEPARATE_CPUS=y
|
||||
|
||||
#ifdef VENDOR_EDIT
|
||||
#add for kernel system
|
||||
CONFIG_OPLUS_FEATURE_PROJECTINFO=y
|
||||
#endif
|
||||
|
||||
#BSP.Kernel.Stability, 2020/12/14, add uboot log
|
||||
CONFIG_OPLUS_FEATURE_UBOOT_LOG=y
|
||||
|
||||
#ifdef OPLUS_FEATURE_UIFIRST
|
||||
CONFIG_CAMERA_OPT=y
|
||||
#endif /*OPLUS_FEATURE_UIFIRST*/
|
||||
|
||||
#ifdef OPLUS_FEATURE_ION_BOOSTPOOL
|
||||
#Hailong.Liu@BSP.Kernel.MM, 2020/11/19, add ion boostpool.
|
||||
CONFIG_OPLUS_ION_BOOSTPOOL=y
|
||||
#endif /* OPLUS_FEATURE_ION_BOOSTPOOL */
|
||||
|
||||
#Add for NandSwap
|
||||
CONFIG_NANDSWAP=y
|
||||
#CONFIG_NANDSWAP_DEBUG=y
|
||||
|
||||
292
arch/arm64/configs/vendor/atoll_defconfig
vendored
292
arch/arm64/configs/vendor/atoll_defconfig
vendored
@@ -67,8 +67,12 @@ CONFIG_PCI_MSM=y
|
||||
CONFIG_SCHED_MC=y
|
||||
CONFIG_NR_CPUS=8
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_HZ_100=y
|
||||
CONFIG_MEMORY_HOTPLUG=y
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
#wenbin.liu@PSW.BSP.MM, 2018/06/14 Delete for improve performance
|
||||
#CONFIG_HZ_100=y
|
||||
CONFIG_HZ_250=y
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y
|
||||
CONFIG_MEMORY_HOTPLUG_MOVABLE_NODE=y
|
||||
CONFIG_MEMORY_HOTREMOVE=y
|
||||
@@ -266,6 +270,11 @@ CONFIG_CFG80211_INTERNAL_REGDB=y
|
||||
# CONFIG_CFG80211_CRDA_SUPPORT is not set
|
||||
CONFIG_RFKILL=y
|
||||
CONFIG_NFC_NQ=y
|
||||
#ifdef OPLUS_NFC_BRINGUP
|
||||
#DengWeiwei@CONNECTIVITY.NFC.HARDWARE.253154, 2020/08/09
|
||||
#Add for the kernel Macro for NXP PN557 NFC kernel
|
||||
CONFIG_NFC_PN553_DEVICES=y
|
||||
#endif /*OPLUS_NFC_BRINGUP*/
|
||||
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
|
||||
CONFIG_REGMAP_WCD_IRQ=y
|
||||
CONFIG_REGMAP_ALLOW_WRITE_DEBUGFS=y
|
||||
@@ -332,32 +341,67 @@ CONFIG_CLD_LL_CORE=y
|
||||
CONFIG_CNSS_GENL=y
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
CONFIG_KEYBOARD_GPIO=y
|
||||
#ifdef VENDOR_EDIT
|
||||
#/*lizhijie@BSP.CHG.Basic, 2020/02/25, Add for Joystick */
|
||||
CONFIG_INPUT_JOYSTICK=y
|
||||
CONFIG_JOYSTICK_XPAD=y
|
||||
CONFIG_JOYSTICK_XPAD_FF=y
|
||||
CONFIG_JOYSTICK_XPAD_LEDS=y
|
||||
#endif /* VENDOR_EDIT */
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
CONFIG_INPUT_JOYSTICK=y
|
||||
CONFIG_JOYSTICK_XPAD=y
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
CONFIG_TOUCHSCREEN_ATMEL_MXT=y
|
||||
CONFIG_TOUCHSCREEN_ST=y
|
||||
CONFIG_TOUCHSCREEN_HIMAX_CHIPSET=y
|
||||
CONFIG_TOUCHSCREEN_HIMAX_I2C=y
|
||||
CONFIG_TOUCHSCREEN_HIMAX_INCELL=y
|
||||
CONFIG_TOUCHSCREEN_HIMAX_IC_HX83112=y
|
||||
CONFIG_TOUCHSCREEN_HIMAX_DEBUG=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_CORE=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_RMI_DEV=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_TEST_REPORTING=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_CORE=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_TOUCH=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_DEVICE=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_TESTING=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_REFLASH=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_RECOVERY=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_ZEROFLASH=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_DIAGNOSTICS=y
|
||||
|
||||
#ifdef VENDOR_EDIT
|
||||
#Qicai.gu@Bsp.Group.Tp, 2020/02/26, Add for oppo project
|
||||
#CONFIG_TOUCHSCREEN_ATMEL_MXT=y
|
||||
#CONFIG_TOUCHSCREEN_ST=y
|
||||
#CONFIG_TOUCHSCREEN_HIMAX_CHIPSET=y
|
||||
#CONFIG_TOUCHSCREEN_HIMAX_I2C=y
|
||||
#CONFIG_TOUCHSCREEN_HIMAX_INCELL=y
|
||||
#CONFIG_TOUCHSCREEN_HIMAX_IC_HX83112=y
|
||||
#CONFIG_TOUCHSCREEN_HIMAX_DEBUG=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_CORE=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_RMI_DEV=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_TEST_REPORTING=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_CORE=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_TOUCH=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_DEVICE=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_TESTING=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_REFLASH=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_RECOVERY=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_ZEROFLASH=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_DIAGNOSTICS=y
|
||||
|
||||
CONFIG_TOUCHPANEL_OPPO=y
|
||||
CONFIG_TOUCHPANEL_GOODIX=y
|
||||
CONFIG_TOUCHPANEL_GOODIX_GT9886=y
|
||||
CONFIG_TOUCHIRQ_UPDATE_QOS=y
|
||||
|
||||
#ifdef OPLUS_FEATURE_TP_BASIC
|
||||
#Qicai.gu add for FT3518 BSP.TP 2020/8/9
|
||||
CONFIG_TOUCHPANEL_FOCAL=y
|
||||
CONFIG_TOUCHPANEL_FOCAL_FT3518=y
|
||||
#endif /*OPLUS_FEATURE_TP_BASIC*/
|
||||
|
||||
#zhaifeibiao@ODM_LQ@BSP.touch,2020/11/03,Add for oppo project
|
||||
CONFIG_TOUCHPANEL_NOVA_NT36672C_NOFLASH=y
|
||||
CONFIG_TOUCHPANEL_NOVA=y
|
||||
CONFIG_TOUCHPANEL_NEW_SET_IRQ_WAKE=y
|
||||
#ifdef VENDOR_EDIT
|
||||
#lujiang.yu add for 567 BSP.TP 2020/4/3
|
||||
CONFIG_TOUCHPANEL_SAMSUNG=y
|
||||
CONFIG_TOUCHPANEL_SAMSUNG_S6SY771=y
|
||||
#endif
|
||||
|
||||
#CONFIG_TOUCHPANEL_NEW_SET_IRQ_WAKE=y
|
||||
#endif
|
||||
|
||||
CONFIG_INPUT_MISC=y
|
||||
CONFIG_INPUT_QPNP_POWER_ON=y
|
||||
CONFIG_INPUT_UINPUT=y
|
||||
@@ -399,8 +443,42 @@ CONFIG_QCOM_DLOAD_MODE=y
|
||||
CONFIG_POWER_RESET_XGENE=y
|
||||
CONFIG_POWER_RESET_SYSCON=y
|
||||
CONFIG_QPNP_QG=y
|
||||
CONFIG_SMB1355_SLAVE_CHARGER=y
|
||||
#ifdef VENDOR_EDIT
|
||||
#/* lizhijie@BSP.CHG.Basic, 2020/02/25, Modify for charging */
|
||||
#CONFIG_SMB1355_SLAVE_CHARGER=y
|
||||
#endif
|
||||
CONFIG_QPNP_SMB5=y
|
||||
#ifdef VENDOR_EDIT
|
||||
#/* lizhijie@BSP.CHG.Basic, 2020/02/25, Modify for charging */
|
||||
CONFIG_OPPO_SMOOTH_SOC=y
|
||||
CONFIG_OPPO_SM7125R_CHARGER=y
|
||||
CONFIG_OPPO_CHIP_SOC_NODE=y
|
||||
CONFIG_OPPO_SHORT_HW_CHECK=y
|
||||
CONFIG_OPPO_SHORT_USERSPACE=y
|
||||
CONFIG_OPPO_SHIP_MODE_SUPPORT=y
|
||||
CONFIG_OPPO_SMART_CHARGER_SUPPORT=y
|
||||
CONFIG_OPPO_SHORT_C_BATT_CHECK=y
|
||||
CONFIG_OPPO_CHECK_CHARGERID_VOLT=y
|
||||
CONFIG_OPPO_SHORT_IC_CHECK=y
|
||||
CONFIG_OPPO_CALL_MODE_SUPPORT=y
|
||||
CONFIG_HID_SONY=y
|
||||
CONFIG_SONY_FF=y
|
||||
CONFIG_HID_BETOP_FF=y
|
||||
CONFIG_OPLUS_CHARGER=y
|
||||
CONFIG_OPLUS_SM7125R_CHARGER=y
|
||||
CONFIG_OPLUS_CHIP_SOC_NODE=y
|
||||
CONFIG_OPLUS_SHORT_HW_CHECK=y
|
||||
CONFIG_OPLUS_SHORT_USERSPACE=y
|
||||
CONFIG_OPLUS_SHIP_MODE_SUPPORT=y
|
||||
CONFIG_OPLUS_SMART_CHARGER_SUPPORT=y
|
||||
CONFIG_OPLUS_SHORT_C_BATT_CHECK=y
|
||||
CONFIG_OPLUS_CHECK_CHARGERID_VOLT=y
|
||||
CONFIG_OPLUS_SHORT_IC_CHECK=y
|
||||
CONFIG_OPLUS_CALL_MODE_SUPPORT=y
|
||||
CONFIG_OPLUS_SMOOTH_SOC=y
|
||||
CONFIG_OPLUS_WPC_INTERFACE_ENABLE=y
|
||||
CONFIG_OPLUS_CHARGER_OPTIGA=y
|
||||
#endif
|
||||
CONFIG_SMB1390_CHARGE_PUMP_PSY=y
|
||||
CONFIG_SMB1398_CHARGER=y
|
||||
CONFIG_THERMAL=y
|
||||
@@ -713,6 +791,12 @@ CONFIG_EXT4_FS=y
|
||||
CONFIG_EXT4_FS_POSIX_ACL=y
|
||||
CONFIG_EXT4_FS_SECURITY=y
|
||||
CONFIG_EXT4_ENCRYPTION=y
|
||||
CONFIG_EXT4_FS_ENCRYPTION=y
|
||||
CONFIG_EXT4_FS_ICE_ENCRYPTION=y
|
||||
#ifdef OPLUS_FEATURE_EXFAT_SUPPORT//huyu@BSP.Storage,add 2020/5/8 for kernel 4.19 exfat
|
||||
CONFIG_NLS_UTF8=y
|
||||
CONFIG_EXFAT_FS=y
|
||||
# endif
|
||||
CONFIG_F2FS_FS=y
|
||||
CONFIG_F2FS_FS_SECURITY=y
|
||||
CONFIG_F2FS_FS_ENCRYPTION=y
|
||||
@@ -834,3 +918,163 @@ CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
|
||||
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
|
||||
CONFIG_XZ_DEC=y
|
||||
|
||||
#ifdef VENDOR_EDIT
|
||||
#/*ye.zhang@BSP.Bootloader.Bootflow, 2020-6-18, Add for oppo project*/
|
||||
CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y
|
||||
CONFIG_OPPO_COMMON_SOFT=y
|
||||
CONFIG_OPPO_DEVICE_IFNO=y
|
||||
CONFIG_OPLUS_RF_CABLE_MONITOR=y
|
||||
#endif
|
||||
|
||||
#ifdef OPLUS_FEATURE_TP_BASIC
|
||||
#Qicai.Gu@BSP.TP, 2020/08/25, modify for sim detect
|
||||
CONFIG_SIM_DETECT=y
|
||||
#endif
|
||||
|
||||
#ifdef VENDOR_EDIT
|
||||
#huangjianan@TECH.Storage.FS, 2020/06/03, Add for fs feature
|
||||
CONFIG_OPLUS_FEATURE_OF2FS=y
|
||||
CONFIG_OPLUS_FEATURE_PANIC_FLUSH=y
|
||||
#endif
|
||||
|
||||
#ifdef OPLUS_FEATURE_QCOM_PMICWD
|
||||
#shukai@BSP.Kernel.Stability, 2020/08/06, Add for qcom pmic watchdog
|
||||
CONFIG_OPLUS_FEATURE_QCOM_PMICWD=y
|
||||
#endif
|
||||
CONFIG_OPLUS_FEATURE_DUMP_DEVICE_INFO=y
|
||||
#ifdef OPLUS_SYSTEM_KERNEL
|
||||
#wen.luo@BSP.Kernel.Stability, 2020/03/26, all system oplus feature writer here
|
||||
CONFIG_OPLUS_FEATURE_PHOENIX=y
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
CONFIG_OPLUS_FEATURE_HUNG_TASK_ENHANCE=y
|
||||
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=60
|
||||
#endif
|
||||
|
||||
#zoulian@BSP.Fingerprint.Basic, 2020/03/02, add for fingerprint driver
|
||||
#ifdef OPLUS_FEATURE_FINGERPRINT
|
||||
CONFIG_OPPO_FINGERPRINT=y
|
||||
CONFIG_OPPO_FINGERPRINT_QCOM=y
|
||||
CONFIG_OPPO_FINGERPRINT_GOODIX_OPTICAL=y
|
||||
CONFIG_OPPO_FINGERPRINT_JIIOV_OPTICAL=y
|
||||
#endif
|
||||
|
||||
#fei.zhang@BSP.Kernel.Stability, 2020/03/31, Add for shutdown detect
|
||||
CONFIG_OPLUS_FEATURE_SHUTDOWN_DETECT=y
|
||||
|
||||
#runyu.ouyang@BSP.Kernel.Stability, 2020/04/03, add slabtrace function
|
||||
CONFIG_OPLUS_FEATURE_SLABTRACE_DEBUG=y
|
||||
|
||||
CONFIG_OPLUS_FEATURE_OPROJECT=y
|
||||
|
||||
#ifdef OPLUS_FEATURE_POWERINFO_STANDBY
|
||||
#/*Nanwei.Deng@BSP.Power.Basic, 2020/07/27, add for wakelock profiler*/
|
||||
CONFIG_OPLUS_POWER_QCOM=y
|
||||
CONFIG_OPLUS_WAKELOCK_PROFILER=y
|
||||
#endif
|
||||
|
||||
#ifdef OPLUS_FEATURE_MODEM_MINIDUMP
|
||||
#ChenWeidong@NETWORK.RF, 2019/12/05, add for modem crash str save
|
||||
CONFIG_OPLUS_FEATURE_RECORD_MDMRST=y
|
||||
#endif
|
||||
|
||||
#ifdef OPLUS_FEATURE_ACM
|
||||
#Yuwei.Guan@BSP.Kernel.FS,2020/07/08, Add for acm
|
||||
CONFIG_OPLUS_FEATURE_ACM=y
|
||||
CONFIG_OPLUS_FEATURE_ACM_LOGGING=y
|
||||
#endif /* OPLUS_FEATURE_ACM */
|
||||
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
#/* Liujie.Xie@TECH.Kernel.Sched, 2020-05-20, add jank info monitor support*/
|
||||
CONFIG_OPPO_JANK_INFO=y
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
#/* Huacai.Zhou@PSW.BSP.Kernel.MM, 2018-07-07, add alloc wait monitor support*/
|
||||
CONFIG_OPPO_MEM_MONITOR=y
|
||||
CONFIG_FG_TASK_UID=y
|
||||
CONFIG_OPPO_HEALTHINFO=y
|
||||
CONFIG_SLUB_DEBUG=y
|
||||
CONFIG_SCHEDSTATS=y
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
|
||||
#ifdef OPLUS_FEATURE_MULTI_KSWAPD
|
||||
CONFIG_OPLUS_MULTI_KSWAPD=y
|
||||
#endif /*OPLUS_FEATURE_MULTI_KSWAPD*/
|
||||
|
||||
#ifdef OPLUS_FEATURE_ZRAM_OPT
|
||||
CONFIG_OPLUS_ZRAM_OPT=y
|
||||
CONFIG_CRYPTO_LZ4=y
|
||||
CONFIG_PGTABLE_MAPPING=y
|
||||
#endif /*OPLUS_FEATURE_ZRAM_OPT*/
|
||||
|
||||
#ifdef OPLUS_FEATURE_FG_IO_OPT
|
||||
#wangtao@BSP.Kernel.mm 2020/08/24, increase priority of foreground IO
|
||||
CONFIG_OPPO_FG_IO_OPT=y
|
||||
#endif
|
||||
|
||||
#ifdef OPLUS_FEATURE_IOMONITOR
|
||||
CONFIG_IOMONITOR=y
|
||||
CONFIG_IOMONITOR_WITH_F2FS=y
|
||||
#endif /*OPLUS_FEATURE_IOMONITOR*/
|
||||
|
||||
#ifdef OPLUS_FEATURE_LOWMEM_DBG
|
||||
#Hailong.Liu@BSP.Kernel.MM, 2020/06/19, Add for dump memory usage when lowmmem occurs.
|
||||
CONFIG_OPLUS_FEATURE_LOWMEM_DBG=y
|
||||
#endif /* OPLUS_FEATURE_LOWMEM_DBG */
|
||||
|
||||
#ifdef OPLUS_FEATURE_HANS_FREEZE
|
||||
#Kun.Zhou@ROM.Framework, 2019/09/23, add for hans freeze manager
|
||||
CONFIG_OPPO_HANS=y
|
||||
#endif /*OPLUS_FEATURE_HANS_FREEZE*/
|
||||
|
||||
#Jiang.Li@TECH.BSP.Stability.PMIC_MONITOR, 2020/04/22
|
||||
CONFIG_OPLUS_FEATURE_PMIC_MONITOR=y
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
#zhangzongyu@BSP.Kernel.Stability, 2020/05/10, Add for dump device info
|
||||
CONFIG_PSTORE=y
|
||||
CONFIG_PSTORE_CONSOLE=y
|
||||
CONFIG_PSTORE_PMSG=y
|
||||
CONFIG_PSTORE_RAM=y
|
||||
#endif
|
||||
|
||||
#Fuchun.Liao@BSP.CHG.Basic 2020/04/09 add for qcom minidump customized
|
||||
CONFIG_OPLUS_FEATURE_QCOM_MINIDUMP_ENHANCE=y
|
||||
|
||||
#ifdef OPLUS_FEATURE_ABNORMAL_CPU
|
||||
#/* Kun.Zhou@ANDROID.PWS, 2020/08/05, Add for BG CPU abnormal detection */
|
||||
CONFIG_CFS_BANDWIDTH=y
|
||||
#endif /* OPLUS_FEATURE_ABNORMAL_CPU *
|
||||
|
||||
#ifdef VENDOR_EDIT
|
||||
#/* Hank.liu@TECH.PLAT.Storage, 2019-10-31, add UFS+ hpb and tw driver*/
|
||||
CONFIG_UFSFEATURE=y
|
||||
CONFIG_UFSHPB=y
|
||||
CONFIG_UFSTW=y
|
||||
#CONFIG_UFSTW_DEBUGDRV=y
|
||||
CONFIG_HPB_SUP_ONLY_4=y
|
||||
CONFIG_HPB_SUP_8_TO_32=y
|
||||
CONFIG_HPB_SUP_OVER_36=y
|
||||
CONFIG_UFSTW_IGNORE_GUARANTEE_BIT=y
|
||||
#endif
|
||||
|
||||
#ifdef VENDOR_EDIT
|
||||
#add for kernel system
|
||||
CONFIG_OPLUS_FEATURE_PROJECTINFO=y
|
||||
#endif
|
||||
|
||||
#BSP.Kernel.Stability, 2020/12/14, add uboot log
|
||||
CONFIG_OPLUS_FEATURE_UBOOT_LOG=y
|
||||
|
||||
#ifdef OPLUS_FEATURE_UIFIRST
|
||||
CONFIG_CAMERA_OPT=y
|
||||
#endif /*OPLUS_FEATURE_UIFIRST*/
|
||||
|
||||
#ifdef OPLUS_FEATURE_ION_BOOSTPOOL
|
||||
#Hailong.Liu@BSP.Kernel.MM, 2020/11/19, add ion boostpool.
|
||||
CONFIG_OPLUS_ION_BOOSTPOOL=y
|
||||
#endif /* OPLUS_FEATURE_ION_BOOSTPOOL */
|
||||
|
||||
#Add for NandSwap
|
||||
CONFIG_NANDSWAP=y
|
||||
#CONFIG_NANDSWAP_DEBUG=y
|
||||
|
||||
147
arch/arm64/configs/vendor/sdmsteppe-perf_defconfig
vendored
147
arch/arm64/configs/vendor/sdmsteppe-perf_defconfig
vendored
@@ -322,18 +322,25 @@ CONFIG_KEYBOARD_GPIO=y
|
||||
CONFIG_INPUT_JOYSTICK=y
|
||||
CONFIG_JOYSTICK_XPAD=y
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
CONFIG_TOUCHSCREEN_ST=y
|
||||
CONFIG_TOUCHSCREEN_HIMAX_CHIPSET=y
|
||||
CONFIG_TOUCHSCREEN_HIMAX_I2C=y
|
||||
CONFIG_TOUCHSCREEN_HIMAX_INCELL=y
|
||||
CONFIG_TOUCHSCREEN_HIMAX_IC_HX83112=y
|
||||
CONFIG_TOUCHSCREEN_HIMAX_DEBUG=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_CORE=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_RMI_DEV=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_TEST_REPORTING=y
|
||||
#ifndef OPLUS_FEATURE_TP_BASIC //ZhongWenjie@BSP.group 2019-03-29 add for enable tp function
|
||||
#CONFIG_TOUCHSCREEN_ST=y
|
||||
#CONFIG_TOUCHSCREEN_HIMAX_CHIPSET=y
|
||||
#CONFIG_TOUCHSCREEN_HIMAX_I2C=y
|
||||
#CONFIG_TOUCHSCREEN_HIMAX_INCELL=y
|
||||
#CONFIG_TOUCHSCREEN_HIMAX_IC_HX83112=y
|
||||
#CONFIG_TOUCHSCREEN_HIMAX_DEBUG=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_CORE=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_RMI_DEV=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_TEST_REPORTING=y
|
||||
#else //OPLUS_FEATURE_TP_BASIC
|
||||
CONFIG_TOUCHPANEL_OPPO=y
|
||||
CONFIG_TOUCHPANEL_SYNAPTICS=y
|
||||
CONFIG_TOUCHPANEL_SYNAPTICS_S3706=y
|
||||
CONFIG_TOUCHIRQ_UPDATE_QOS=y
|
||||
#endif //OPLUS_FEATURE_TP_BASIC
|
||||
CONFIG_INPUT_MISC=y
|
||||
CONFIG_INPUT_QPNP_POWER_ON=y
|
||||
CONFIG_INPUT_UINPUT=y
|
||||
@@ -371,9 +378,28 @@ CONFIG_POWER_RESET_QCOM=y
|
||||
CONFIG_QCOM_DLOAD_MODE=y
|
||||
CONFIG_POWER_RESET_XGENE=y
|
||||
CONFIG_POWER_RESET_SYSCON=y
|
||||
CONFIG_QPNP_QG=y
|
||||
CONFIG_SMB1355_SLAVE_CHARGER=y
|
||||
#CONFIG_QPNP_QG=y
|
||||
#CONFIG_SMB1355_SLAVE_CHARGER=y
|
||||
CONFIG_QPNP_SMB5=y
|
||||
#ifdef VENDOR_EDIT
|
||||
#/* lizhijie@BSP.CHG.Basic, 2020/02/25, Modify for charging */
|
||||
CONFIG_OPLUS_CHARGER=y
|
||||
CONFIG_OPLUS_SM7150R_CHARGER=y
|
||||
CONFIG_OPLUS_CHIP_SOC_NODE=y
|
||||
CONFIG_OPLUS_SHORT_HW_CHECK=y
|
||||
CONFIG_OPLUS_SHORT_USERSPACE=y
|
||||
CONFIG_OPLUS_SHIP_MODE_SUPPORT=y
|
||||
CONFIG_OPLUS_SMART_CHARGER_SUPPORT=y
|
||||
CONFIG_OPLUS_SHORT_C_BATT_CHECK=y
|
||||
CONFIG_OPLUS_CHECK_CHARGERID_VOLT=y
|
||||
CONFIG_OPLUS_SHORT_IC_CHECK=y
|
||||
CONFIG_OPLUS_CALL_MODE_SUPPORT=y
|
||||
CONFIG_OPLUS_SMOOTH_SOC=y
|
||||
#CONFIG_OPLUS_WPC_INTERFACE_ENABLE is not set
|
||||
CONFIG_HID_SONY=y
|
||||
CONFIG_SONY_FF=y
|
||||
CONFIG_HID_BETOP_FF=y
|
||||
#endif
|
||||
CONFIG_SMB1390_CHARGE_PUMP_PSY=y
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_THERMAL_WRITABLE_TRIPS=y
|
||||
@@ -566,9 +592,12 @@ CONFIG_MSM_QMP=y
|
||||
CONFIG_IOMMU_IO_PGTABLE_FAST=y
|
||||
CONFIG_ARM_SMMU=y
|
||||
CONFIG_QCOM_LAZY_MAPPING=y
|
||||
CONFIG_IOMMU_DEBUG=y
|
||||
CONFIG_IOMMU_DEBUG_TRACKING=y
|
||||
CONFIG_IOMMU_TESTS=y
|
||||
# ifdef OPLUS_BUG_STABILITY
|
||||
# rendong.shi@BSP.kernel.debug,2017/5/20,remove for some secure issue from qcom request
|
||||
# CONFIG_IOMMU_DEBUG is not set
|
||||
# CONFIG_IOMMU_DEBUG_TRACKING is not set
|
||||
# CONFIG_IOMMU_TESTS is not set
|
||||
# endif
|
||||
CONFIG_RPMSG_CHAR=y
|
||||
CONFIG_RPMSG_QCOM_GLINK_SMEM=y
|
||||
CONFIG_RPMSG_QCOM_GLINK_SPI=y
|
||||
@@ -661,6 +690,12 @@ CONFIG_EXT4_FS=y
|
||||
CONFIG_EXT4_FS_POSIX_ACL=y
|
||||
CONFIG_EXT4_FS_SECURITY=y
|
||||
CONFIG_EXT4_ENCRYPTION=y
|
||||
CONFIG_EXT4_FS_ENCRYPTION=y
|
||||
CONFIG_EXT4_FS_ICE_ENCRYPTION=y
|
||||
#ifdef OPLUS_FEATURE_EXFAT_SUPPORT//huyu@BSP.Storage,add 2020/5/8 for kernel 4.19 exfat
|
||||
CONFIG_NLS_UTF8=y
|
||||
CONFIG_EXFAT_FS=y
|
||||
# endif
|
||||
CONFIG_F2FS_FS=y
|
||||
CONFIG_F2FS_FS_SECURITY=y
|
||||
CONFIG_F2FS_FS_ENCRYPTION=y
|
||||
@@ -726,3 +761,81 @@ CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
|
||||
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
|
||||
CONFIG_STACK_HASH_ORDER_SHIFT=12
|
||||
#ifdef VENDOR_EDIT
|
||||
#/*ye.zhang@BSP.Bootloader.Bootflow, 2020-6-18, Add for oppo project*/
|
||||
CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y
|
||||
CONFIG_OPPO_COMMON_SOFT=y
|
||||
CONFIG_OPPO_DEVICE_IFNO=y
|
||||
CONFIG_OPPO_MOTOR=y
|
||||
CONFIG_MOTOR_DETECT_QOS=y
|
||||
CONFIG_MOTOR_CLASS_INTERFACE=y
|
||||
#CONFIG_OPLUS_RF_CABLE_MONITOR=y
|
||||
#endif
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
#zhangzongyu@BSP.Kernel.Stability, 2020/05/10, Add for dump device info
|
||||
CONFIG_PSTORE=y
|
||||
CONFIG_PSTORE_CONSOLE=y
|
||||
CONFIG_PSTORE_PMSG=y
|
||||
CONFIG_PSTORE_RAM=y
|
||||
#endif
|
||||
|
||||
#/*bajrang.patidar@BSP.Bootloader.Bootflow, 2020-08-18, Add for oppo project*/
|
||||
CONFIG_OPLUS_FEATURE_OPROJECT=y
|
||||
|
||||
#ifdef OPLUS_FEATURE_MODEM_MINIDUMP
|
||||
#ChenWeidong@NETWORK.RF, 2019/12/05, add for modem crash str save
|
||||
CONFIG_OPLUS_FEATURE_RECORD_MDMRST=y
|
||||
#endif
|
||||
#Fuchun.Liao@BSP.CHG.Basic 2020/04/09 add for qcom minidump customized
|
||||
CONFIG_OPLUS_FEATURE_QCOM_MINIDUMP_ENHANCE=y
|
||||
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
#/* Huacai.Zhou@PSW.BSP.Kernel.MM, 2018-07-07, add alloc wait monitor support*/
|
||||
CONFIG_OPPO_MEM_MONITOR=y
|
||||
CONFIG_FG_TASK_UID=y
|
||||
CONFIG_OPPO_HEALTHINFO=y
|
||||
CONFIG_SLUB_DEBUG=y
|
||||
CONFIG_SCHEDSTATS=y
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
|
||||
#ifdef OPLUS_FEATURE_HANS_FREEZE
|
||||
#Kun.Zhou@ROM.Framework, 2019/09/23, add for hans freeze manager
|
||||
CONFIG_OPPO_HANS=y
|
||||
#endif /*OPLUS_FEATURE_HANS_FREEZE*/
|
||||
|
||||
#ifdef OPLUS_FEATURE_QCOM_PMICWD
|
||||
#shukai@BSP.Kernel.Stability, 2020/08/06, Add for qcom pmic watchdog
|
||||
CONFIG_OPLUS_FEATURE_QCOM_PMICWD=y
|
||||
#endif
|
||||
#ifdef OPLUS_SYSTEM_KERNEL
|
||||
#wen.luo@BSP.Kernel.Stability, 2020/03/26, all system oplus feature writer here
|
||||
CONFIG_OPLUS_FEATURE_PHOENIX=y
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
CONFIG_OPLUS_FEATURE_HUNG_TASK_ENHANCE=y
|
||||
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=60
|
||||
#endif
|
||||
|
||||
#Jiang.Li@TECH.BSP.Stability.PMIC_MONITOR, 2020/04/22
|
||||
CONFIG_OPLUS_FEATURE_PMIC_MONITOR=y
|
||||
|
||||
#runyu.ouyang@BSP.Kernel.Stability, 2020/04/03, add slabtrace function
|
||||
#CONFIG_OPLUS_FEATURE_SLABTRACE_DEBUG=y
|
||||
|
||||
#ifdef VENDOR_EDIT
|
||||
#huangjianan@TECH.Storage.FS, 2020/06/03, Add for fs feature
|
||||
CONFIG_OPLUS_FEATURE_OF2FS=y
|
||||
CONFIG_OPLUS_FEATURE_PANIC_FLUSH=y
|
||||
#endif
|
||||
|
||||
#ifdef OPLUS_FEATURE_FINGERPRINT
|
||||
#hemant.jeengar@BSP.Fingerprint.Basic, 2020/09/24, add for fingerprint driver
|
||||
CONFIG_OPPO_FINGERPRINT=y
|
||||
CONFIG_OPPO_FINGERPRINT_QCOM=y
|
||||
CONFIG_OPPO_FINGERPRINT_GOODIX_OPTICAL=y
|
||||
#endif
|
||||
|
||||
#ifdef VENDOR_EDIT
|
||||
#yufeng@camera, 2019/05/13, Add for oppo project
|
||||
CONFIG_REGULATOR_PM8008=y
|
||||
#endif
|
||||
|
||||
157
arch/arm64/configs/vendor/sdmsteppe_defconfig
vendored
157
arch/arm64/configs/vendor/sdmsteppe_defconfig
vendored
@@ -331,27 +331,34 @@ CONFIG_KEYBOARD_GPIO=y
|
||||
CONFIG_INPUT_JOYSTICK=y
|
||||
CONFIG_JOYSTICK_XPAD=y
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
CONFIG_TOUCHSCREEN_ST=y
|
||||
CONFIG_TOUCHSCREEN_HIMAX_CHIPSET=y
|
||||
CONFIG_TOUCHSCREEN_HIMAX_I2C=y
|
||||
CONFIG_TOUCHSCREEN_HIMAX_INCELL=y
|
||||
CONFIG_TOUCHSCREEN_HIMAX_IC_HX83112=y
|
||||
CONFIG_TOUCHSCREEN_HIMAX_DEBUG=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_CORE=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_RMI_DEV=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_TEST_REPORTING=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_CORE=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_TOUCH=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_DEVICE=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_TESTING=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_REFLASH=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_RECOVERY=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_ZEROFLASH=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_DIAGNOSTICS=y
|
||||
#ifndef OPLUS_FEATURE_TP_BASIC //ZhongWenjie@BSP.group 2019-03-29 add for enable tp function
|
||||
#CONFIG_TOUCHSCREEN_ST=y
|
||||
#CONFIG_TOUCHSCREEN_HIMAX_CHIPSET=y
|
||||
#CONFIG_TOUCHSCREEN_HIMAX_I2C=y
|
||||
#CONFIG_TOUCHSCREEN_HIMAX_INCELL=y
|
||||
#CONFIG_TOUCHSCREEN_HIMAX_IC_HX83112=y
|
||||
#CONFIG_TOUCHSCREEN_HIMAX_DEBUG=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_CORE=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_RMI_DEV=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_TEST_REPORTING=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_CORE=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_TOUCH=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_DEVICE=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_TESTING=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_REFLASH=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_RECOVERY=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_ZEROFLASH=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_DIAGNOSTICS=y
|
||||
#else //OPLUS_FEATURE_TP_BASIC
|
||||
CONFIG_TOUCHPANEL_OPPO=y
|
||||
CONFIG_TOUCHPANEL_SYNAPTICS=y
|
||||
CONFIG_TOUCHPANEL_SYNAPTICS_S3706=y
|
||||
CONFIG_TOUCHIRQ_UPDATE_QOS=y
|
||||
#endif //OPLUS_FEATURE_TP_BASIC
|
||||
CONFIG_INPUT_MISC=y
|
||||
CONFIG_INPUT_QPNP_POWER_ON=y
|
||||
CONFIG_INPUT_UINPUT=y
|
||||
@@ -392,9 +399,28 @@ CONFIG_POWER_RESET_QCOM=y
|
||||
CONFIG_QCOM_DLOAD_MODE=y
|
||||
CONFIG_POWER_RESET_XGENE=y
|
||||
CONFIG_POWER_RESET_SYSCON=y
|
||||
CONFIG_QPNP_QG=y
|
||||
CONFIG_SMB1355_SLAVE_CHARGER=y
|
||||
#CONFIG_QPNP_QG=y
|
||||
#CONFIG_SMB1355_SLAVE_CHARGER=y
|
||||
CONFIG_QPNP_SMB5=y
|
||||
#ifdef VENDOR_EDIT
|
||||
#/* lizhijie@BSP.CHG.Basic, 2020/02/25, Modify for charging */
|
||||
CONFIG_OPLUS_CHARGER=y
|
||||
CONFIG_OPLUS_SM7150R_CHARGER=y
|
||||
CONFIG_OPLUS_CHIP_SOC_NODE=y
|
||||
CONFIG_OPLUS_SHORT_HW_CHECK=y
|
||||
CONFIG_OPLUS_SHORT_USERSPACE=y
|
||||
CONFIG_OPLUS_SHIP_MODE_SUPPORT=y
|
||||
CONFIG_OPLUS_SMART_CHARGER_SUPPORT=y
|
||||
CONFIG_OPLUS_SHORT_C_BATT_CHECK=y
|
||||
CONFIG_OPLUS_CHECK_CHARGERID_VOLT=y
|
||||
CONFIG_OPLUS_SHORT_IC_CHECK=y
|
||||
CONFIG_OPLUS_CALL_MODE_SUPPORT=y
|
||||
CONFIG_OPLUS_SMOOTH_SOC=y
|
||||
#CONFIG_OPLUS_WPC_INTERFACE_ENABLE is not set
|
||||
CONFIG_HID_SONY=y
|
||||
CONFIG_SONY_FF=y
|
||||
CONFIG_HID_BETOP_FF=y
|
||||
#endif
|
||||
CONFIG_SMB1390_CHARGE_PUMP_PSY=y
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_THERMAL_WRITABLE_TRIPS=y
|
||||
@@ -699,6 +725,10 @@ CONFIG_EXT4_FS_POSIX_ACL=y
|
||||
CONFIG_EXT4_FS_SECURITY=y
|
||||
CONFIG_EXT4_ENCRYPTION=y
|
||||
CONFIG_F2FS_FS=y
|
||||
#ifdef OPLUS_FEATURE_EXFAT_SUPPORT//huyu@BSP.Storage,add 2020/5/8 for kernel 4.19 exfat
|
||||
CONFIG_NLS_UTF8=y
|
||||
CONFIG_EXFAT_FS=y
|
||||
# endif
|
||||
CONFIG_F2FS_FS_SECURITY=y
|
||||
CONFIG_F2FS_FS_ENCRYPTION=y
|
||||
CONFIG_FS_ENCRYPTION_INLINE_CRYPT=y
|
||||
@@ -723,7 +753,7 @@ CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_DYNAMIC_DEBUG=y
|
||||
CONFIG_DEBUG_MODULE_LOAD_INFO=y
|
||||
CONFIG_DEBUG_CONSOLE_UNHASHED_POINTERS=y
|
||||
# CONFIG_DEBUG_CONSOLE_UNHASHED_POINTERS is not set
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_PAGE_OWNER=y
|
||||
CONFIG_PAGE_OWNER_ENABLE_DEFAULT=y
|
||||
@@ -819,3 +849,82 @@ CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
|
||||
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
|
||||
CONFIG_XZ_DEC=y
|
||||
|
||||
#ifdef VENDOR_EDIT
|
||||
#/*ye.zhang@BSP.Bootloader.Bootflow, 2020-6-18, Add for oppo project*/
|
||||
CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y
|
||||
CONFIG_OPPO_COMMON_SOFT=y
|
||||
CONFIG_OPPO_DEVICE_IFNO=y
|
||||
CONFIG_OPPO_MOTOR=y
|
||||
CONFIG_MOTOR_DETECT_QOS=y
|
||||
CONFIG_MOTOR_CLASS_INTERFACE=y
|
||||
#CONFIG_OPLUS_RF_CABLE_MONITOR=y
|
||||
#endif
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
#zhangzongyu@BSP.Kernel.Stability, 2020/05/10, Add for dump device info
|
||||
CONFIG_PSTORE=y
|
||||
CONFIG_PSTORE_CONSOLE=y
|
||||
CONFIG_PSTORE_PMSG=y
|
||||
CONFIG_PSTORE_RAM=y
|
||||
#endif
|
||||
|
||||
#/*bajrang.patidar@BSP.Bootloader.Bootflow, 2020-08-18, Add for oppo project*/
|
||||
CONFIG_OPLUS_FEATURE_OPROJECT=y
|
||||
|
||||
#ifdef OPLUS_FEATURE_MODEM_MINIDUMP
|
||||
#ChenWeidong@NETWORK.RF, 2019/12/05, add for modem crash str save
|
||||
CONFIG_OPLUS_FEATURE_RECORD_MDMRST=y
|
||||
#endif
|
||||
#Fuchun.Liao@BSP.CHG.Basic 2020/04/09 add for qcom minidump customized
|
||||
CONFIG_OPLUS_FEATURE_QCOM_MINIDUMP_ENHANCE=y
|
||||
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
#/* Huacai.Zhou@PSW.BSP.Kernel.MM, 2018-07-07, add alloc wait monitor support*/
|
||||
CONFIG_OPPO_MEM_MONITOR=y
|
||||
CONFIG_FG_TASK_UID=y
|
||||
CONFIG_OPPO_HEALTHINFO=y
|
||||
CONFIG_SLUB_DEBUG=y
|
||||
CONFIG_SCHEDSTATS=y
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
|
||||
#ifdef OPLUS_FEATURE_HANS_FREEZE
|
||||
#Kun.Zhou@ROM.Framework, 2019/09/23, add for hans freeze manager
|
||||
CONFIG_OPPO_HANS=y
|
||||
#endif /*OPLUS_FEATURE_HANS_FREEZE*/
|
||||
|
||||
#ifdef OPLUS_FEATURE_QCOM_PMICWD
|
||||
#shukai@BSP.Kernel.Stability, 2020/08/06, Add for qcom pmic watchdog
|
||||
CONFIG_OPLUS_FEATURE_QCOM_PMICWD=y
|
||||
#endif
|
||||
#ifdef OPLUS_SYSTEM_KERNEL
|
||||
#wen.luo@BSP.Kernel.Stability, 2020/03/26, all system oplus feature writer here
|
||||
CONFIG_OPLUS_FEATURE_PHOENIX=y
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
CONFIG_OPLUS_FEATURE_HUNG_TASK_ENHANCE=y
|
||||
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=60
|
||||
#endif
|
||||
|
||||
#Jiang.Li@TECH.BSP.Stability.PMIC_MONITOR, 2020/04/22
|
||||
CONFIG_OPLUS_FEATURE_PMIC_MONITOR=y
|
||||
|
||||
#runyu.ouyang@BSP.Kernel.Stability, 2020/04/03, add slabtrace function
|
||||
CONFIG_OPLUS_FEATURE_SLABTRACE_DEBUG=y
|
||||
|
||||
#ifdef VENDOR_EDIT
|
||||
#huangjianan@TECH.Storage.FS, 2020/06/03, Add for fs feature
|
||||
CONFIG_OPLUS_FEATURE_OF2FS=y
|
||||
CONFIG_OPLUS_FEATURE_PANIC_FLUSH=y
|
||||
#endif
|
||||
|
||||
#ifdef OPLUS_FEATURE_FINGERPRINT
|
||||
#hemant.jeengar@BSP.Fingerprint.Basic, 2020/09/24, add for fingerprint driver
|
||||
CONFIG_OPPO_FINGERPRINT=y
|
||||
CONFIG_OPPO_FINGERPRINT_QCOM=y
|
||||
CONFIG_OPPO_FINGERPRINT_GOODIX_OPTICAL=y
|
||||
#endif
|
||||
|
||||
#ifdef VENDOR_EDIT
|
||||
#yufeng@camera, 2019/05/13, Add for oppo project
|
||||
CONFIG_REGULATOR_PM8008=y
|
||||
#endif
|
||||
|
||||
199
arch/arm64/configs/vendor/sm8150-perf_defconfig
vendored
199
arch/arm64/configs/vendor/sm8150-perf_defconfig
vendored
@@ -261,6 +261,13 @@ CONFIG_CFG80211_REG_CELLULAR_HINTS=y
|
||||
CONFIG_CFG80211_INTERNAL_REGDB=y
|
||||
CONFIG_RFKILL=y
|
||||
CONFIG_NFC_NQ=y
|
||||
|
||||
##ifdef OPLUS_FEATURE_BRINGUP
|
||||
#HuangTengming@CONNECTIVITY.NFC.BASIC.HARDWARE , 2020/05/13, add for : add NFC driver
|
||||
CONFIG_NFC_PN553_DEVICES=y
|
||||
CONFIG_NXP_P73_DEVICES=y
|
||||
#endif /* OPLUS_FEATURE_NFC_BRINGUP */
|
||||
|
||||
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
|
||||
CONFIG_REGMAP_ALLOW_WRITE_DEBUGFS=y
|
||||
CONFIG_DMA_CMA=y
|
||||
@@ -332,18 +339,30 @@ CONFIG_KEYBOARD_GPIO=y
|
||||
CONFIG_INPUT_JOYSTICK=y
|
||||
CONFIG_JOYSTICK_XPAD=y
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
CONFIG_TOUCHSCREEN_ST=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_CORE=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_TOUCH=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_DEVICE=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_TESTING=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_REFLASH=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_RECOVERY=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_ZEROFLASH=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_DIAGNOSTICS=y
|
||||
#ifndef OPLUS_FEATURE_TP_BASIC //wanghao@phone.bsp.tp del for oppo s3706 in 2017-09-20
|
||||
#CONFIG_TOUCHSCREEN_ST=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_CORE=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_TOUCH=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_DEVICE=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_TESTING=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_REFLASH=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_RECOVERY=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_ZEROFLASH=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_DIAGNOSTICS=y
|
||||
#else //OPLUS_FEATURE_TP_BASIC
|
||||
CONFIG_TOUCHPANEL_OPPO=y
|
||||
CONFIG_TOUCHPANEL_NOVA=y
|
||||
CONFIG_TOUCHPANEL_NOVA_NT36672C_NOFLASH=y
|
||||
CONFIG_TOUCHPANEL_SYNAPTICS=y
|
||||
CONFIG_TOUCHPANEL_SYNAPTICS_S3706=y
|
||||
CONFIG_AW8697_HAPTIC=y
|
||||
CONFIG_TOUCHIRQ_UPDATE_QOS=y
|
||||
#endif //OPLUS_FEATURE_TP_BASIC
|
||||
CONFIG_INPUT_MISC=y
|
||||
CONFIG_INPUT_HBTP_INPUT=y
|
||||
#ifndef OPLUS_FEATURE_TP_BASIC //wanghao@phone.bsp.tp del for oppo s3706 in 2017-09-20
|
||||
#CONFIG_INPUT_HBTP_INPUT=y
|
||||
#endif //OPLUS_FEATURE_TP_BASIC
|
||||
CONFIG_INPUT_QPNP_POWER_ON=y
|
||||
CONFIG_INPUT_QTI_HAPTICS=y
|
||||
CONFIG_INPUT_UINPUT=y
|
||||
@@ -380,9 +399,26 @@ CONFIG_QCOM_DLOAD_MODE=y
|
||||
CONFIG_POWER_RESET_XGENE=y
|
||||
CONFIG_POWER_RESET_SYSCON=y
|
||||
CONFIG_QPNP_FG_GEN4=y
|
||||
CONFIG_SMB1355_SLAVE_CHARGER=y
|
||||
#ifdef OPLUS_FEATURE_CHG_BASIC
|
||||
#/* tongfeng.Huang@BSP.CHG.Basic, 2018/04/14, Modify for charging */
|
||||
#CONFIG_SMB1355_SLAVE_CHARGER=y
|
||||
CONFIG_OPLUS_SM8150R_CHARGER=y
|
||||
CONFIG_OPLUS_CHIP_SOC_NODE=y
|
||||
CONFIG_QPNP_SMB5=y
|
||||
CONFIG_QPNP_QNOVO5=y
|
||||
CONFIG_OPLUS_SHORT_HW_CHECK=y
|
||||
CONFIG_OPLUS_SHORT_USERSPACE=y
|
||||
CONFIG_OPLUS_SHIP_MODE_SUPPORT=y
|
||||
CONFIG_OPLUS_SMART_CHARGER_SUPPORT=y
|
||||
CONFIG_OPLUS_SHORT_C_BATT_CHECK=y
|
||||
CONFIG_OPLUS_CHECK_CHARGERID_VOLT=y
|
||||
CONFIG_OPLUS_SHORT_IC_CHECK=y
|
||||
CONFIG_OPLUS_CALL_MODE_SUPPORT=y
|
||||
CONFIG_OPLUS_WPC_INTERFACE_ENABLE=y
|
||||
CONFIG_HID_SONY=y
|
||||
CONFIG_SONY_FF=y
|
||||
CONFIG_HID_BETOP_FF=y
|
||||
#CONFIG_QPNP_QNOVO5=y
|
||||
#endif /*OPLUS_FEATURE_CHG_BASIC*/
|
||||
CONFIG_SMB1390_CHARGE_PUMP_PSY=y
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_THERMAL_WRITABLE_TRIPS=y
|
||||
@@ -565,9 +601,12 @@ CONFIG_MSM_QMP=y
|
||||
CONFIG_IOMMU_IO_PGTABLE_FAST=y
|
||||
CONFIG_ARM_SMMU=y
|
||||
CONFIG_QCOM_LAZY_MAPPING=y
|
||||
CONFIG_IOMMU_DEBUG=y
|
||||
CONFIG_IOMMU_DEBUG_TRACKING=y
|
||||
CONFIG_IOMMU_TESTS=y
|
||||
# ifdef OPLUS_BUG_STABILITY
|
||||
# rendong.shi@BSP.kernel.debug,2017/5/20,remove for some secure issue from qcom request
|
||||
# CONFIG_IOMMU_DEBUG is not set
|
||||
# CONFIG_IOMMU_DEBUG_TRACKING is not set
|
||||
# CONFIG_IOMMU_TESTS is not set
|
||||
# endif
|
||||
CONFIG_RPMSG_CHAR=y
|
||||
CONFIG_RPMSG_QCOM_GLINK_SMEM=y
|
||||
CONFIG_RPMSG_QCOM_GLINK_SPSS=y
|
||||
@@ -624,6 +663,10 @@ CONFIG_MSM_EVENT_TIMER=y
|
||||
CONFIG_MSM_PM=y
|
||||
CONFIG_MSM_QBT1000=y
|
||||
CONFIG_QCOM_FSA4480_I2C=y
|
||||
#ifdef OPLUS_ARCH_EXTENDS
|
||||
#Richeng.Wang@MULTIMEDIA.AUDIODRIVER.HEADSETS, 2020/10/11, Add for max20328
|
||||
CONFIG_QCOM_MAX20328_I2C=y
|
||||
#endif /* OPLUS_ARCH_EXTENDS */
|
||||
CONFIG_MEM_SHARE_QMI_SERVICE=y
|
||||
CONFIG_RMNET_CTL=y
|
||||
CONFIG_MSM_PERFORMANCE=y
|
||||
@@ -671,6 +714,10 @@ CONFIG_EXT4_FS=y
|
||||
CONFIG_EXT4_FS_POSIX_ACL=y
|
||||
CONFIG_EXT4_FS_SECURITY=y
|
||||
CONFIG_EXT4_ENCRYPTION=y
|
||||
#ifdef OPLUS_FEATURE_EXFAT_SUPPORT//huyu@BSP.Storage,add 2020/5/8 for kernel 4.19 exfat
|
||||
CONFIG_NLS_UTF8=y
|
||||
CONFIG_EXFAT_FS=y
|
||||
#endif
|
||||
CONFIG_F2FS_FS=y
|
||||
CONFIG_F2FS_FS_SECURITY=y
|
||||
CONFIG_F2FS_FS_ENCRYPTION=y
|
||||
@@ -737,3 +784,123 @@ CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
|
||||
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
|
||||
CONFIG_STACK_HASH_ORDER_SHIFT=12
|
||||
#ifdef VENDOR_EDIT
|
||||
#/*ye.zhang@BSP.Bootloader.Bootflow, 2020-6-18, Add for oppo project*/
|
||||
CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y
|
||||
CONFIG_OPPO_COMMON_SOFT=y
|
||||
CONFIG_OPPO_DEVICE_IFNO=y
|
||||
CONFIG_OPLUS_RF_CABLE_MONITOR=y
|
||||
#endif
|
||||
CONFIG_OPLUS_FEATURE_OPROJECT=y
|
||||
#ifdef VENDOR_EDIT
|
||||
#/* huangjianan@TECH.Storage.FS, 2020/06/03, Add for fs feature */
|
||||
CONFIG_OPLUS_FEATURE_OF2FS=y
|
||||
#endif
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
#/* Huacai.Zhou@PSW.BSP.Kernel.MM, 2018-07-07, add alloc wait monitor support*/
|
||||
CONFIG_OPPO_MEM_MONITOR=y
|
||||
CONFIG_FG_TASK_UID=y
|
||||
CONFIG_OPPO_HEALTHINFO=y
|
||||
CONFIG_SLUB_DEBUG=y
|
||||
CONFIG_SCHEDSTATS=y
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
#ifdef OPLUS_FEATURE_IOMONITOR
|
||||
CONFIG_IOMONITOR=y
|
||||
CONFIG_IOMONITOR_WITH_F2FS=y
|
||||
#endif /*OPLUS_FEATURE_IOMONITOR*/
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
#/* Liujie.Xie@TECH.Kernel.Sched, 2020-05-20, add jank info monitor support*/
|
||||
CONFIG_OPPO_JANK_INFO=y
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
CONFIG_OPLUS_FEATURE_PANIC_FLUSH=y
|
||||
#ifdef OPLUS_FEATURE_TP_BASIC
|
||||
#Qicai.Gu@BSP.TP, 2020/08/25, modify for sim detect
|
||||
CONFIG_SIM_DETECT=y
|
||||
#endif
|
||||
#ifdef OPLUS_FEATURE_ZRAM_OPT
|
||||
#/*Hacai.Zhou@Tech.Kernel.mm, add oppo zram opt support*/
|
||||
CONFIG_OPLUS_ZRAM_OPT=y
|
||||
CONFIG_CRYPTO_LZ4=y
|
||||
CONFIG_PGTABLE_MAPPING=y
|
||||
#endif /*OPLUS_FEATURE_ZRAM_OPT*/
|
||||
#ifdef OPLUS_FEATURE_FG_IO_OPT
|
||||
#wangtao@BSP.Kernel.mm 2020/08/24, increase priority of foreground IO
|
||||
CONFIG_OPPO_FG_IO_OPT=y
|
||||
#endif
|
||||
#chongdu@BSP.Fingerprint.Basic, 2020-9-1, add for fingerprint driver
|
||||
#ifdef OPLUS_FEATURE_FINGERPRINT
|
||||
CONFIG_OPPO_FINGERPRINT=y
|
||||
CONFIG_OPPO_FINGERPRINT_QCOM=y
|
||||
CONFIG_OPPO_FINGERPRINT_GOODIX=y
|
||||
#endif
|
||||
#ifdef OPLUS_FEATURE_HANS_FREEZE
|
||||
#Kun.Zhou@ROM.Framework, 2019/09/23, add for hans freeze manager
|
||||
CONFIG_OPPO_HANS=y
|
||||
#endif /*OPLUS_FEATURE_HANS_FREEZE*/
|
||||
#ifdef OPLUS_FEATURE_MODEM_MINIDUMP
|
||||
#ChenWeidong@NETWORK.RF, 2019/12/05, add for modem crash str save
|
||||
CONFIG_OPLUS_FEATURE_RECORD_MDMRST=y
|
||||
#endif
|
||||
#Fuchun.Liao@BSP.CHG.Basic 2020/04/09 add for qcom minidump customized
|
||||
CONFIG_OPLUS_FEATURE_QCOM_MINIDUMP_ENHANCE=y
|
||||
#fei.zhang@BSP.Kernel.Stability, 2020/03/31, Add for shutdown detect
|
||||
CONFIG_OPLUS_FEATURE_SHUTDOWN_DETECT=y
|
||||
CONFIG_OPLUS_FEATURE_FEEDBACK=y
|
||||
#runyu.ouyang@BSP.Kernel.Stability, 2020/04/03, add slabtrace function
|
||||
CONFIG_SLABTRACE_DEBUG=y
|
||||
#Jiang.Li@TECH.BSP.Stability.PMIC_MONITOR, 2020/04/22
|
||||
CONFIG_OPLUS_FEATURE_PMIC_MONITOR=y
|
||||
#ifdef OPLUS_FEATURE_QCOM_PMICWD
|
||||
#shukai@BSP.Kernel.Stability, 2020/08/06, Add for qcom pmic watchdog
|
||||
CONFIG_OPLUS_FEATURE_QCOM_PMICWD=y
|
||||
#xupengcheng@MULTIMEDIA.Display.LCD.Stability, 2020/09/23, add for 19696 lcd support power
|
||||
CONFIG_REGULATOR_KTD2151=y
|
||||
#xupengcheng@MULTIMEDIA.Display.LCD.Stability, 2020/09/23, add for 19696 lcd backlight
|
||||
CONFIG_BACKLIGHT_LM3697=y
|
||||
#endif
|
||||
#ifdef OPLUS_SYSTEM_KERNEL
|
||||
#wen.luo@BSP.Kernel.Stability, 2020/03/26, all system oplus feature writer here
|
||||
CONFIG_OPLUS_FEATURE_PHOENIX=y
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
CONFIG_OPLUS_FEATURE_HUNG_TASK_ENHANCE=y
|
||||
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=60
|
||||
|
||||
|
||||
#ifdef OPLUS_FEATURE_CHG_BASIC
|
||||
CONFIG_OPPO_MOTOR=y
|
||||
CONFIG_MOTOR_DETECT_QOS=y
|
||||
CONFIG_MOTOR_CLASS_INTERFACE=y
|
||||
#endif
|
||||
#endif
|
||||
#zongbao.shang@Cam, 2020/08/06, Add for pm8008 driver
|
||||
CONFIG_REGULATOR_PM8008=y
|
||||
#ifdef VENDOR_EDIT
|
||||
#/* Hank.liu@TECH.PLAT.Storage, 2019-10-31, add UFS+ hpb and tw driver*/
|
||||
CONFIG_UFSFEATURE=y
|
||||
CONFIG_UFSHPB=y
|
||||
CONFIG_UFSTW=y
|
||||
#CONFIG_UFSTW_DEBUGDRV=y
|
||||
CONFIG_HPB_SUP_ONLY_4=y
|
||||
CONFIG_HPB_SUP_8_TO_32=y
|
||||
CONFIG_HPB_SUP_OVER_36=y
|
||||
CONFIG_UFSTW_IGNORE_GUARANTEE_BIT=y
|
||||
#endif
|
||||
|
||||
#ifdef OPLUS_FEATURE_DUMPDEVICE
|
||||
#zhangzongyu@BSP.Kernel.Stability, 2020/05/10, Add for dump device info
|
||||
CONFIG_PSTORE=y
|
||||
CONFIG_PSTORE_CONSOLE=y
|
||||
CONFIG_PSTORE_PMSG=y
|
||||
CONFIG_PSTORE_RAM=y
|
||||
#endif
|
||||
|
||||
#ifdef OPLUS_FEATURE_LOWMEM_DBG
|
||||
#Hailong.Liu@BSP.Kernel.MM, 2020/06/19, Add for dump memory usage when lowmmem occurs.
|
||||
CONFIG_OPLUS_FEATURE_LOWMEM_DBG=y
|
||||
#endif /* OPLUS_FEATURE_LOWMEM_DBG */
|
||||
|
||||
#ifdef OPLUS_FEATURE_VIRTUAL_RESERVE_MEMORY
|
||||
#Kui.Zhang@TEC.Kernel.MM, 2019-05-10, add reserved vma for emergency mmap
|
||||
CONFIG_VIRTUAL_RESERVE_MEMORY=y
|
||||
#endif /* OPLUS_FEATURE_VIRTUAL_RESERVE_MEMORY */
|
||||
|
||||
|
||||
189
arch/arm64/configs/vendor/sm8150_defconfig
vendored
189
arch/arm64/configs/vendor/sm8150_defconfig
vendored
@@ -271,6 +271,13 @@ CONFIG_CFG80211_INTERNAL_REGDB=y
|
||||
# CONFIG_CFG80211_CRDA_SUPPORT is not set
|
||||
CONFIG_RFKILL=y
|
||||
CONFIG_NFC_NQ=y
|
||||
|
||||
##ifdef OPLUS_FEATURE_BRINGUP
|
||||
#HuangTengming@CONNECTIVITY.NFC.BASIC.HARDWARE , 2020/05/13, add for : add NFC driver
|
||||
CONFIG_NFC_PN553_DEVICES=y
|
||||
CONFIG_NXP_P73_DEVICES=y
|
||||
#endif /* OPLUS_FEATURE_NFC_BRINGUP */
|
||||
|
||||
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
|
||||
CONFIG_REGMAP_ALLOW_WRITE_DEBUGFS=y
|
||||
CONFIG_DMA_CMA=y
|
||||
@@ -343,18 +350,30 @@ CONFIG_KEYBOARD_GPIO=y
|
||||
CONFIG_INPUT_JOYSTICK=y
|
||||
CONFIG_JOYSTICK_XPAD=y
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
CONFIG_TOUCHSCREEN_ST=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_CORE=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_TOUCH=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_DEVICE=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_TESTING=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_REFLASH=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_RECOVERY=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_ZEROFLASH=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_DIAGNOSTICS=y
|
||||
#ifndef OPLUS_FEATURE_TP_BASIC //wanghao@phone.bsp.tp del for oppo s3706 in 2017-09-20
|
||||
#CONFIG_TOUCHSCREEN_ST=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_CORE=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_TOUCH=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_DEVICE=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_TESTING=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_REFLASH=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_RECOVERY=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_ZEROFLASH=y
|
||||
#CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_DIAGNOSTICS=y
|
||||
#else //OPLUS_FEATURE_TP_BASIC
|
||||
CONFIG_TOUCHPANEL_OPPO=y
|
||||
CONFIG_TOUCHPANEL_NOVA=y
|
||||
CONFIG_TOUCHPANEL_NOVA_NT36672C_NOFLASH=y
|
||||
CONFIG_TOUCHPANEL_SYNAPTICS=y
|
||||
CONFIG_TOUCHPANEL_SYNAPTICS_S3706=y
|
||||
CONFIG_AW8697_HAPTIC=y
|
||||
CONFIG_TOUCHIRQ_UPDATE_QOS=y
|
||||
#endif //OPLUS_FEATURE_TP_BASIC
|
||||
CONFIG_INPUT_MISC=y
|
||||
CONFIG_INPUT_HBTP_INPUT=y
|
||||
#ifndef OPLUS_FEATURE_TP_BASIC //wanghao@phone.bsp.tp del for oppo s3706 in 2017-09-20
|
||||
#CONFIG_INPUT_HBTP_INPUT=y
|
||||
#endif //OPLUS_FEATURE_TP_BASIC
|
||||
CONFIG_INPUT_QPNP_POWER_ON=y
|
||||
CONFIG_INPUT_QTI_HAPTICS=y
|
||||
CONFIG_INPUT_UINPUT=y
|
||||
@@ -394,9 +413,26 @@ CONFIG_QCOM_DLOAD_MODE=y
|
||||
CONFIG_POWER_RESET_XGENE=y
|
||||
CONFIG_POWER_RESET_SYSCON=y
|
||||
CONFIG_QPNP_FG_GEN4=y
|
||||
CONFIG_SMB1355_SLAVE_CHARGER=y
|
||||
#ifdef OPLUS_FEATURE_CHG_BASIC
|
||||
#/* tongfeng.Huang@BSP.CHG.Basic, 2018/04/14, Modify for charging */
|
||||
#CONFIG_SMB1355_SLAVE_CHARGER=y
|
||||
CONFIG_OPLUS_SM8150R_CHARGER=y
|
||||
CONFIG_OPLUS_CHIP_SOC_NODE=y
|
||||
CONFIG_QPNP_SMB5=y
|
||||
CONFIG_QPNP_QNOVO5=y
|
||||
CONFIG_OPLUS_SHORT_HW_CHECK=y
|
||||
CONFIG_OPLUS_SHORT_USERSPACE=y
|
||||
CONFIG_OPLUS_SHIP_MODE_SUPPORT=y
|
||||
CONFIG_OPLUS_SMART_CHARGER_SUPPORT=y
|
||||
CONFIG_OPLUS_SHORT_C_BATT_CHECK=y
|
||||
CONFIG_OPLUS_CHECK_CHARGERID_VOLT=y
|
||||
CONFIG_OPLUS_SHORT_IC_CHECK=y
|
||||
CONFIG_OPLUS_CALL_MODE_SUPPORT=y
|
||||
CONFIG_OPLUS_WPC_INTERFACE_ENABLE=y
|
||||
CONFIG_HID_SONY=y
|
||||
CONFIG_SONY_FF=y
|
||||
CONFIG_HID_BETOP_FF=y
|
||||
#CONFIG_QPNP_QNOVO5=y
|
||||
#endif /*OPLUS_FEATURE_CHG_BASIC*/
|
||||
CONFIG_SMB1390_CHARGE_PUMP_PSY=y
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_THERMAL_WRITABLE_TRIPS=y
|
||||
@@ -651,6 +687,10 @@ CONFIG_MSM_EVENT_TIMER=y
|
||||
CONFIG_MSM_PM=y
|
||||
CONFIG_MSM_QBT1000=y
|
||||
CONFIG_QCOM_FSA4480_I2C=y
|
||||
#ifdef OPLUS_ARCH_EXTENDS
|
||||
#Richeng.Wang@MULTIMEDIA.AUDIODRIVER.HEADSETS, 2020/10/11, Add for max20328
|
||||
CONFIG_QCOM_MAX20328_I2C=y
|
||||
#endif /* VENDOR_EDIT */
|
||||
CONFIG_MEM_SHARE_QMI_SERVICE=y
|
||||
CONFIG_RMNET_CTL=y
|
||||
CONFIG_RMNET_CTL_DEBUG=y
|
||||
@@ -701,6 +741,10 @@ CONFIG_EXT4_FS=y
|
||||
CONFIG_EXT4_FS_POSIX_ACL=y
|
||||
CONFIG_EXT4_FS_SECURITY=y
|
||||
CONFIG_EXT4_ENCRYPTION=y
|
||||
#ifdef OPLUS_FEATURE_EXFAT_SUPPORT//huyu@BSP.Storage,add 2020/5/8 for kernel 4.19 exfat
|
||||
CONFIG_NLS_UTF8=y
|
||||
CONFIG_EXFAT_FS=y
|
||||
#endif
|
||||
CONFIG_F2FS_FS=y
|
||||
CONFIG_F2FS_FS_SECURITY=y
|
||||
CONFIG_F2FS_FS_ENCRYPTION=y
|
||||
@@ -822,3 +866,122 @@ CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
|
||||
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
|
||||
CONFIG_XZ_DEC=y
|
||||
#ifdef VENDOR_EDIT
|
||||
#/*ye.zhang@BSP.Bootloader.Bootflow, 2020-6-18, Add for oppo project*/
|
||||
CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y
|
||||
CONFIG_OPPO_COMMON_SOFT=y
|
||||
CONFIG_OPPO_DEVICE_IFNO=y
|
||||
CONFIG_OPLUS_RF_CABLE_MONITOR=y
|
||||
#endif
|
||||
CONFIG_OPLUS_FEATURE_OPROJECT=y
|
||||
#ifdef VENDOR_EDIT
|
||||
#/* huangjianan@TECH.Storage.FS, 2020/06/03, Add for fs feature */
|
||||
CONFIG_OPLUS_FEATURE_OF2FS=y
|
||||
#endif
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
#/* Huacai.Zhou@PSW.BSP.Kernel.MM, 2018-07-07, add alloc wait monitor support*/
|
||||
CONFIG_OPPO_MEM_MONITOR=y
|
||||
CONFIG_FG_TASK_UID=y
|
||||
CONFIG_OPPO_HEALTHINFO=y
|
||||
CONFIG_SLUB_DEBUG=y
|
||||
CONFIG_SCHEDSTATS=y
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
#ifdef OPLUS_FEATURE_IOMONITOR
|
||||
CONFIG_IOMONITOR=y
|
||||
CONFIG_IOMONITOR_WITH_F2FS=y
|
||||
#endif /*OPLUS_FEATURE_IOMONITOR*/
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
#/* Liujie.Xie@TECH.Kernel.Sched, 2020-05-20, add jank info monitor support*/
|
||||
CONFIG_OPPO_JANK_INFO=y
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
CONFIG_OPLUS_FEATURE_PANIC_FLUSH=y
|
||||
#ifdef OPLUS_FEATURE_TP_BASIC
|
||||
#Qicai.Gu@BSP.TP, 2020/08/25, modify for sim detect
|
||||
CONFIG_SIM_DETECT=y
|
||||
#endif
|
||||
#ifdef OPLUS_FEATURE_ZRAM_OPT
|
||||
#/*Hacai.Zhou@Tech.Kernel.mm, add oppo zram opt support*/
|
||||
CONFIG_OPLUS_ZRAM_OPT=y
|
||||
CONFIG_CRYPTO_LZ4=y
|
||||
CONFIG_PGTABLE_MAPPING=y
|
||||
#endif /*OPLUS_FEATURE_ZRAM_OPT*/
|
||||
#ifdef OPLUS_FEATURE_FG_IO_OPT
|
||||
#wangtao@BSP.Kernel.mm 2020/08/24, increase priority of foreground IO
|
||||
CONFIG_OPPO_FG_IO_OPT=y
|
||||
#endif
|
||||
#chongdu@BSP.Fingerprint.Basic, 2020-9-1, add for fingerprint driver
|
||||
#ifdef OPLUS_FEATURE_FINGERPRINT
|
||||
CONFIG_OPPO_FINGERPRINT=y
|
||||
CONFIG_OPPO_FINGERPRINT_QCOM=y
|
||||
CONFIG_OPPO_FINGERPRINT_GOODIX=y
|
||||
#endif
|
||||
#ifdef OPLUS_FEATURE_HANS_FREEZE
|
||||
#Kun.Zhou@ROM.Framework, 2019/09/23, add for hans freeze manager
|
||||
CONFIG_OPPO_HANS=y
|
||||
#endif /*OPLUS_FEATURE_HANS_FREEZE*/
|
||||
#ifdef OPLUS_FEATURE_MODEM_MINIDUMP
|
||||
#ChenWeidong@NETWORK.RF, 2019/12/05, add for modem crash str save
|
||||
CONFIG_OPLUS_FEATURE_RECORD_MDMRST=y
|
||||
#endif
|
||||
#Fuchun.Liao@BSP.CHG.Basic 2020/04/09 add for qcom minidump customized
|
||||
CONFIG_OPLUS_FEATURE_QCOM_MINIDUMP_ENHANCE=y
|
||||
#fei.zhang@BSP.Kernel.Stability, 2020/03/31, Add for shutdown detect
|
||||
CONFIG_OPLUS_FEATURE_SHUTDOWN_DETECT=y
|
||||
CONFIG_OPLUS_FEATURE_FEEDBACK=y
|
||||
#runyu.ouyang@BSP.Kernel.Stability, 2020/04/03, add slabtrace function
|
||||
CONFIG_SLABTRACE_DEBUG=y
|
||||
#Jiang.Li@TECH.BSP.Stability.PMIC_MONITOR, 2020/04/22
|
||||
CONFIG_OPLUS_FEATURE_PMIC_MONITOR=y
|
||||
#ifdef OPLUS_FEATURE_QCOM_PMICWD
|
||||
#shukai@BSP.Kernel.Stability, 2020/08/06, Add for qcom pmic watchdog
|
||||
CONFIG_OPLUS_FEATURE_QCOM_PMICWD=y
|
||||
#xupengcheng@MULTIMEDIA.Display.LCD.Stability, 2020/09/23, add for 19696 lcd support power
|
||||
CONFIG_REGULATOR_KTD2151=y
|
||||
#xupengcheng@MULTIMEDIA.Display.LCD.Stability, 2020/09/23, add for 19696 lcd backlight
|
||||
CONFIG_BACKLIGHT_LM3697=y
|
||||
#endif
|
||||
#ifdef OPLUS_SYSTEM_KERNEL
|
||||
#wen.luo@BSP.Kernel.Stability, 2020/03/26, all system oplus feature writer here
|
||||
CONFIG_OPLUS_FEATURE_PHOENIX=y
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
CONFIG_OPLUS_FEATURE_HUNG_TASK_ENHANCE=y
|
||||
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=60
|
||||
#endif
|
||||
#zongbao.shang@Cam, 2020/08/06, Add for pm8008 driver
|
||||
CONFIG_REGULATOR_PM8008=y
|
||||
|
||||
#ifdef VENDOR_EDIT
|
||||
#/* Hank.liu@TECH.PLAT.Storage, 2019-10-31, add UFS+ hpb and tw driver*/
|
||||
CONFIG_UFSFEATURE=y
|
||||
CONFIG_UFSHPB=y
|
||||
CONFIG_UFSTW=y
|
||||
#CONFIG_UFSTW_DEBUGDRV=y
|
||||
CONFIG_HPB_SUP_ONLY_4=y
|
||||
CONFIG_HPB_SUP_8_TO_32=y
|
||||
CONFIG_HPB_SUP_OVER_36=y
|
||||
CONFIG_UFSTW_IGNORE_GUARANTEE_BIT=y
|
||||
|
||||
#ifdef OPLUS_FEATURE_CHG_BASIC
|
||||
CONFIG_OPPO_MOTOR=y
|
||||
CONFIG_MOTOR_DETECT_QOS=y
|
||||
CONFIG_MOTOR_CLASS_INTERFACE=y
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef OPLUS_FEATURE_DUMPDEVICE
|
||||
#zhangzongyu@BSP.Kernel.Stability, 2020/05/10, Add for dump device info
|
||||
CONFIG_PSTORE=y
|
||||
CONFIG_PSTORE_CONSOLE=y
|
||||
CONFIG_PSTORE_PMSG=y
|
||||
CONFIG_PSTORE_RAM=y
|
||||
#endif
|
||||
|
||||
#ifdef OPLUS_FEATURE_LOWMEM_DBG
|
||||
#Hailong.Liu@BSP.Kernel.MM, 2020/06/19, Add for dump memory usage when lowmmem occurs.
|
||||
CONFIG_OPLUS_FEATURE_LOWMEM_DBG=y
|
||||
#endif /* OPLUS_FEATURE_LOWMEM_DBG */
|
||||
|
||||
#ifdef OPLUS_FEATURE_VIRTUAL_RESERVE_MEMORY
|
||||
#Kui.Zhang@TEC.Kernel.MM, 2019-05-10, add reserved vma for emergency mmap
|
||||
CONFIG_VIRTUAL_RESERVE_MEMORY=y
|
||||
#endif /* OPLUS_FEATURE_VIRTUAL_RESERVE_MEMORY */
|
||||
|
||||
@@ -71,3 +71,8 @@ extra-y += $(head-y) vmlinux.lds
|
||||
ifeq ($(CONFIG_DEBUG_EFI),y)
|
||||
AFLAGS_head.o += -DVMLINUX_PATH="\"$(realpath $(objtree)/vmlinux)\""
|
||||
endif
|
||||
|
||||
#ifdef CONFIG_OPLUS_SECURE_GUARD
|
||||
obj-$(CONFIG_OPLUS_SECURE_GUARD) += rootguard/
|
||||
obj-$(CONFIG_OPLUS_SECURE_GUARD) += oplus_root.o
|
||||
#endif /* CONFIG_OPLUS_SECURE_GUARD */
|
||||
|
||||
@@ -163,5 +163,24 @@ int main(void)
|
||||
#ifdef CONFIG_UNMAP_KERNEL_AT_EL0
|
||||
DEFINE(TRAMP_VALIAS, TRAMP_VALIAS);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_OPLUS_SECURE_GUARD
|
||||
#ifdef CONFIG_OPLUS_ROOT_CHECK
|
||||
DEFINE(PROOT_TSK_CRED, offsetof(struct task_struct, cred));
|
||||
DEFINE(PROOT_CRED_UID, offsetof(struct cred, uid));
|
||||
DEFINE(PROOT_CRED_EUID, offsetof(struct cred, euid));
|
||||
DEFINE(PROOT_CRED_FSUID, offsetof(struct cred, fsuid));
|
||||
#ifdef CONFIG_THREAD_INFO_IN_TASK
|
||||
DEFINE(PROOT_THREAD_ADDR_LIMIT, offsetof(struct task_struct, thread_info.addr_limit));
|
||||
#else
|
||||
DEFINE(PROOT_THREAD_TSK, offsetof(struct thread_info,task));
|
||||
DEFINE(PROOT_THREAD_ADDR_LIMIT, offsetof(struct thread_info, addr_limit));
|
||||
#endif
|
||||
#endif /* CONFIG_OPLUS_ROOT_CHECK */
|
||||
#endif /* CONFIG_OPLUS_SECURE_GUARD */
|
||||
#ifdef CONFIG_ARM_SDE_INTERFACE
|
||||
DEFINE(SDEI_EVENT_INTREGS, offsetof(struct sdei_registered_event, interrupted_regs));
|
||||
DEFINE(SDEI_EVENT_PRIORITY, offsetof(struct sdei_registered_event, priority));
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -969,7 +969,13 @@ el0_svc_naked: // compat entry point
|
||||
cmp wscno, wsc_nr // check upper syscall limit
|
||||
b.hs ni_sys
|
||||
mask_nospec64 xscno, xsc_nr, x19 // enforce bounds for syscall number
|
||||
#ifdef VENDOR_EDIT
|
||||
#ifdef CONFIG_OPLUS_ROOT_CHECK
|
||||
adr x16, oplus_root_check
|
||||
#else
|
||||
ldr x16, [stbl, xscno, lsl #3] // address in the syscall table
|
||||
#endif /* CONFIG_OPLUS_ROOT_CHECK */
|
||||
#endif /* VENDOR_EDIT */
|
||||
blr x16 // call sys_* routine
|
||||
b ret_fast_syscall
|
||||
ni_sys:
|
||||
@@ -999,7 +1005,13 @@ __sys_trace:
|
||||
ldp x2, x3, [sp, #S_X2]
|
||||
ldp x4, x5, [sp, #S_X4]
|
||||
ldp x6, x7, [sp, #S_X6]
|
||||
#ifdef VENDOR_EDIT
|
||||
#ifdef CONFIG_OPLUS_ROOT_CHECK
|
||||
adr x16, oplus_root_check
|
||||
#else
|
||||
ldr x16, [stbl, xscno, lsl #3] // address in the syscall table
|
||||
#endif /* CONFIG_OPLUS_ROOT_CHECK */
|
||||
#endif /* VENDOR_EDIT */
|
||||
blr x16 // call sys_* routine
|
||||
|
||||
__sys_trace_return:
|
||||
|
||||
@@ -68,6 +68,8 @@ unsigned long __stack_chk_guard __read_mostly;
|
||||
EXPORT_SYMBOL(__stack_chk_guard);
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_OPLUS_FEATURE_QCOM_MINIDUMP_ENHANCE
|
||||
/* YiXue.Ge@PSW.BSP.Kernel.Drv, 2017/11/27, add for some fault device can not reboot early */
|
||||
/*
|
||||
* Function pointers to optional machine specific functions
|
||||
*/
|
||||
@@ -76,6 +78,19 @@ EXPORT_SYMBOL_GPL(pm_power_off);
|
||||
|
||||
void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
|
||||
|
||||
#else
|
||||
|
||||
#include <soc/oplus/system/qcom_minidump_enhance.h>
|
||||
|
||||
/*
|
||||
* Function pointers to optional machine specific functions
|
||||
*/
|
||||
void (*pm_power_off)(void) = do_poweroff_early;
|
||||
EXPORT_SYMBOL_GPL(pm_power_off);
|
||||
void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd) = do_restart_early;
|
||||
|
||||
#endif /* CONFIG_OPLUS_FEATURE_QCOM_MINIDUMP_ENHANCE */
|
||||
|
||||
/*
|
||||
* This is our default idle handler.
|
||||
*/
|
||||
@@ -256,6 +271,10 @@ void __show_regs(struct pt_regs *regs)
|
||||
top_reg = 29;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_OPLUS_FEATURE_QCOM_MINIDUMP_ENHANCE //yixue.ge@bsp.drv add for dump cpu contex for minidump
|
||||
dumpcpuregs(regs);
|
||||
#endif
|
||||
|
||||
show_regs_print_info(KERN_DEFAULT);
|
||||
print_symbol("pc : %s\n", regs->pc);
|
||||
print_symbol("lr : %s\n", lr);
|
||||
|
||||
@@ -49,6 +49,9 @@
|
||||
#include <acpi/ghes.h>
|
||||
#include <soc/qcom/scm.h>
|
||||
#include <trace/events/exception.h>
|
||||
#if defined(OPLUS_FEATURE_IOMONITOR) && defined(CONFIG_IOMONITOR)
|
||||
#include <linux/iomonitor/iomonitor.h>
|
||||
#endif /*OPLUS_FEATURE_IOMONITOR*/
|
||||
|
||||
struct fault_info {
|
||||
int (*fn)(unsigned long addr, unsigned int esr,
|
||||
@@ -541,6 +544,9 @@ done:
|
||||
*/
|
||||
if (major) {
|
||||
tsk->maj_flt++;
|
||||
#if defined(OPLUS_FEATURE_IOMONITOR) && defined(CONFIG_IOMONITOR)
|
||||
iomonitor_update_fs_stats(FS_MAJOR_FAULT, 1);
|
||||
#endif /*OPLUS_FEATURE_IOMONITOR*/
|
||||
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs,
|
||||
addr);
|
||||
} else {
|
||||
|
||||
@@ -230,3 +230,8 @@ config BLK_MQ_RDMA
|
||||
default y
|
||||
|
||||
source block/Kconfig.iosched
|
||||
|
||||
#ifdef OPLUS_FEATURE_FG_IO_OPT
|
||||
#/*Huacai.Zhou@Tech.Kernel.MM, 2020-03-23,add foreground io opt*/
|
||||
source block/oppo_foreground_io_opt/Kconfig
|
||||
#endif /*OPLUS_FEATURE_FG_IO_OPT*/
|
||||
|
||||
@@ -35,6 +35,10 @@ obj-$(CONFIG_BLK_DEV_ZONED) += blk-zoned.o
|
||||
obj-$(CONFIG_BLK_WBT) += blk-wbt.o
|
||||
obj-$(CONFIG_BLK_DEBUG_FS) += blk-mq-debugfs.o
|
||||
obj-$(CONFIG_BLK_SED_OPAL) += sed-opal.o
|
||||
#ifdef OPLUS_FEATURE_FG_IO_OPT
|
||||
#/*Huacai.Zhou@Tech.Kernel.MM, 2020-03-23,add foreground io opt*/
|
||||
obj-$(CONFIG_OPPO_FG_IO_OPT) += oppo_foreground_io_opt/
|
||||
#endif /*OPLUS_FEATURE_FG_IO_OPT*/
|
||||
obj-$(CONFIG_BLK_INLINE_ENCRYPTION) += keyslot-manager.o bio-crypt-ctx.o \
|
||||
blk-crypto.o
|
||||
obj-$(CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK) += blk-crypto-fallback.o
|
||||
obj-$(CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK) += blk-crypto-fallback.o
|
||||
|
||||
136
block/blk-core.c
136
block/blk-core.c
@@ -47,10 +47,34 @@
|
||||
|
||||
#include <linux/math64.h>
|
||||
|
||||
#if defined(OPLUS_FEATURE_FG_IO_OPT) && defined(CONFIG_OPPO_FG_IO_OPT)
|
||||
/*Huacai.Zhou@Tech.Kernel.MM, 2020-03-23,add foreground io opt*/
|
||||
#include "oppo_foreground_io_opt/oppo_foreground_io_opt.h"
|
||||
#endif /*OPLUS_FEATURE_FG_IO_OPT*/
|
||||
|
||||
#if defined(OPLUS_FEATURE_IOMONITOR) && defined(CONFIG_IOMONITOR)
|
||||
#include <linux/iomonitor/iomonitor.h>
|
||||
#endif /*OPLUS_FEATURE_IOMONITOR*/
|
||||
|
||||
#ifdef OPLUS_FEATURE_UIFIRST
|
||||
#include <linux/uifirst/uifirst_sched_common.h>
|
||||
#endif /*OPLUS_FEATURE_UIFIRST*/
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
struct dentry *blk_debugfs_root;
|
||||
#endif
|
||||
|
||||
/*Hank.liu@TECH.BSP Kernel IO Latency 2019-03-21,io information*/
|
||||
#if defined(VENDOR_EDIT) && defined(CONFIG_OPPO_HEALTHINFO)
|
||||
extern void ohm_iolatency_record(struct request * req,unsigned int nr_bytes, int fg, u64 delta_us);
|
||||
extern unsigned long ufs_outstanding;
|
||||
static u64 latency_count;
|
||||
static u32 io_print_count;
|
||||
bool io_print_flag;
|
||||
#define PRINT_LATENCY 500*1000
|
||||
#define COUNT_TIME 24*60*60*1000
|
||||
#endif /*VENDOR_EDIT*/
|
||||
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(block_bio_remap);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_remap);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(block_bio_complete);
|
||||
@@ -119,6 +143,10 @@ void blk_rq_init(struct request_queue *q, struct request *rq)
|
||||
memset(rq, 0, sizeof(*rq));
|
||||
|
||||
INIT_LIST_HEAD(&rq->queuelist);
|
||||
#if defined(OPLUS_FEATURE_FG_IO_OPT) && defined(CONFIG_OPPO_FG_IO_OPT)
|
||||
/*Huacai.Zhou@Tech.Kernel.MM, 2020-03-23,add foreground io opt*/
|
||||
INIT_LIST_HEAD(&rq->fg_list);
|
||||
#endif /*OPLUS_FEATURE_FG_IO_OPT*/
|
||||
INIT_LIST_HEAD(&rq->timeout_list);
|
||||
rq->cpu = -1;
|
||||
rq->q = q;
|
||||
@@ -910,6 +938,10 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id)
|
||||
if (!q)
|
||||
return NULL;
|
||||
|
||||
#if defined(OPLUS_FEATURE_FG_IO_OPT) && defined(CONFIG_OPPO_FG_IO_OPT)
|
||||
/*Huacai.Zhou@Tech.Kernel.MM, 2020-03-23,add foreground io opt*/
|
||||
INIT_LIST_HEAD(&q->fg_head);
|
||||
#endif /*OPLUS_FEATURE_FG_IO_OPT*/
|
||||
q->id = ida_simple_get(&blk_queue_ida, 0, 0, gfp_mask);
|
||||
if (q->id < 0)
|
||||
goto fail_q;
|
||||
@@ -931,7 +963,10 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id)
|
||||
q->backing_dev_info->capabilities = BDI_CAP_CGROUP_WRITEBACK;
|
||||
q->backing_dev_info->name = "block";
|
||||
q->node = node_id;
|
||||
|
||||
#if defined(OPLUS_FEATURE_FG_IO_OPT) && defined(CONFIG_OPPO_FG_IO_OPT)
|
||||
/*Huacai.Zhou@Tech.Kernel.MM, 2020-03-23,add foreground io opt*/
|
||||
fg_bg_max_count_init(q);
|
||||
#endif /*OPLUS_FEATURE_FG_IO_OPT*/
|
||||
setup_timer(&q->backing_dev_info->laptop_mode_wb_timer,
|
||||
laptop_mode_timer_fn, (unsigned long) q);
|
||||
setup_timer(&q->timeout, blk_rq_timed_out_timer, (unsigned long) q);
|
||||
@@ -1375,7 +1410,9 @@ out:
|
||||
*/
|
||||
if (ioc_batching(q, ioc))
|
||||
ioc->nr_batch_requests--;
|
||||
|
||||
#if defined(OPLUS_FEATURE_IOMONITOR) && defined(CONFIG_IOMONITOR)
|
||||
iomonitor_init_reqstats(rq);
|
||||
#endif /*OPLUS_FEATURE_IOMONITOR*/
|
||||
trace_block_getrq(q, bio, op);
|
||||
return rq;
|
||||
|
||||
@@ -1875,6 +1912,16 @@ void blk_init_request_from_bio(struct request *req, struct bio *bio)
|
||||
|
||||
if (bio->bi_opf & REQ_RAHEAD)
|
||||
req->cmd_flags |= REQ_FAILFAST_MASK;
|
||||
#if defined(OPLUS_FEATURE_FG_IO_OPT) && defined(CONFIG_OPPO_FG_IO_OPT)
|
||||
/*Huacai.Zhou@Tech.Kernel.MM, 2020-03-23,add foreground io opt*/
|
||||
if (bio->bi_opf & REQ_FG)
|
||||
req->cmd_flags |= REQ_FG;
|
||||
#endif /*OPLUS_FEATURE_FG_IO_OPT*/
|
||||
|
||||
#ifdef OPLUS_FEATURE_UIFIRST
|
||||
if (bio->bi_opf & REQ_UX)
|
||||
req->cmd_flags |= REQ_UX;
|
||||
#endif /*OPLUS_FEATURE_UIFIRST*/
|
||||
|
||||
req->__sector = bio->bi_iter.bi_sector;
|
||||
if (ioprio_valid(bio_prio(bio)))
|
||||
@@ -2402,11 +2449,17 @@ blk_qc_t submit_bio(struct bio *bio)
|
||||
|
||||
if (op_is_write(bio_op(bio))) {
|
||||
count_vm_events(PGPGOUT, count);
|
||||
#if defined(OPLUS_FEATURE_IOMONITOR) && defined(CONFIG_IOMONITOR)
|
||||
iomonitor_update_vm_stats(PGPGOUT, count);
|
||||
#endif /*OPLUS_FEATURE_IOMONITOR*/
|
||||
} else {
|
||||
if (bio_flagged(bio, BIO_WORKINGSET))
|
||||
workingset_read = true;
|
||||
task_io_account_read(bio->bi_iter.bi_size);
|
||||
count_vm_events(PGPGIN, count);
|
||||
#if defined(OPLUS_FEATURE_IOMONITOR) && defined(CONFIG_IOMONITOR)
|
||||
iomonitor_update_vm_stats(PGPGIN, count);
|
||||
#endif /*OPLUS_FEATURE_IOMONITOR*/
|
||||
}
|
||||
|
||||
if (unlikely(block_dump)) {
|
||||
@@ -2427,6 +2480,16 @@ blk_qc_t submit_bio(struct bio *bio)
|
||||
*/
|
||||
if (workingset_read)
|
||||
psi_memstall_enter(&pflags);
|
||||
#if defined(OPLUS_FEATURE_FG_IO_OPT) && defined(CONFIG_OPPO_FG_IO_OPT)
|
||||
/*Huacai.Zhou@Tech.Kernel.MM, 2020-03-23,add foreground io opt*/
|
||||
if (high_prio_for_task(current))
|
||||
bio->bi_opf |= REQ_FG;
|
||||
#endif /*OPLUS_FEATURE_FG_IO_OPT*/
|
||||
|
||||
#ifdef OPLUS_FEATURE_UIFIRST
|
||||
if (test_task_ux(current))
|
||||
bio->bi_opf |= REQ_UX;
|
||||
#endif /*OPLUS_FEATURE_UIFIRST*/
|
||||
|
||||
ret = generic_make_request(bio);
|
||||
|
||||
@@ -2711,6 +2774,15 @@ struct request *blk_peek_request(struct request_queue *q)
|
||||
* not be passed by new incoming requests
|
||||
*/
|
||||
rq->rq_flags |= RQF_STARTED;
|
||||
/*Hank.liu@PSW.BSP Kernel IO Latency 2019-03-19,request start ktime */
|
||||
#if defined(VENDOR_EDIT)
|
||||
rq-> block_io_start = ktime_get();
|
||||
#endif
|
||||
|
||||
#if defined(OPLUS_FEATURE_IOMONITOR) && defined(CONFIG_IOMONITOR)
|
||||
rq->req_td = ktime_get();
|
||||
#endif /*OPLUS_FEATURE_IOMONITOR*/
|
||||
|
||||
trace_block_rq_issue(q, rq);
|
||||
}
|
||||
|
||||
@@ -2771,7 +2843,9 @@ struct request *blk_peek_request(struct request_queue *q)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(OPLUS_FEATURE_IOMONITOR) && defined(CONFIG_IOMONITOR)
|
||||
iomonitor_record_io_history(rq);
|
||||
#endif /*OPLUS_FEATURE_IOMONITOR*/
|
||||
return rq;
|
||||
}
|
||||
EXPORT_SYMBOL(blk_peek_request);
|
||||
@@ -2784,7 +2858,10 @@ static void blk_dequeue_request(struct request *rq)
|
||||
BUG_ON(ELV_ON_HASH(rq));
|
||||
|
||||
list_del_init(&rq->queuelist);
|
||||
|
||||
#if defined(OPLUS_FEATURE_FG_IO_OPT) && defined(CONFIG_OPPO_FG_IO_OPT)
|
||||
/*Huacai.Zhou@Tech.Kernel.MM, 2020-03-23,add foreground io opt*/
|
||||
list_del_init(&rq->fg_list);
|
||||
#endif /*OPLUS_FEATURE_FG_IO_OPT*/
|
||||
/*
|
||||
* the time frame between a request being removed from the lists
|
||||
* and to it is freed is accounted as io that is in progress at
|
||||
@@ -2793,6 +2870,13 @@ static void blk_dequeue_request(struct request *rq)
|
||||
if (blk_account_rq(rq)) {
|
||||
q->in_flight[rq_is_sync(rq)]++;
|
||||
set_io_start_time_ns(rq);
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
// jiheng.xie@PSW.Tech.BSP.Performance, 2019/03/11
|
||||
// Add for ioqueue
|
||||
#ifdef CONFIG_OPPO_HEALTHINFO
|
||||
ohm_ioqueue_add_inflight(q, rq);
|
||||
#endif
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2874,9 +2958,53 @@ bool blk_update_request(struct request *req, blk_status_t error,
|
||||
unsigned int nr_bytes)
|
||||
{
|
||||
int total_bytes;
|
||||
#if defined(VENDOR_EDIT) && defined(CONFIG_OPPO_HEALTHINFO)
|
||||
/*Hank.liu@TECH.BSP Kernel IO Latency 2019-03-19,request complete ktime*/
|
||||
ktime_t now;
|
||||
u64 delta_us;
|
||||
char rwbs[RWBS_LEN];
|
||||
#endif
|
||||
|
||||
trace_block_rq_complete(req, blk_status_to_errno(error), nr_bytes);
|
||||
|
||||
#if defined(OPLUS_FEATURE_IOMONITOR) && defined(CONFIG_IOMONITOR)
|
||||
iomonitor_record_reqstats(req, nr_bytes);
|
||||
#endif /*OPLUS_FEATURE_IOMONITOR*/
|
||||
|
||||
/*Hank.liu@TECH.BSP Kernel IO Latency 2019-03-19,request complete ktime*/
|
||||
#if defined(VENDOR_EDIT) && defined(CONFIG_OPPO_HEALTHINFO)
|
||||
if(req->tag >= 0 && req->block_io_start > 0)
|
||||
{
|
||||
io_print_flag = false;
|
||||
now = ktime_get();
|
||||
delta_us = ktime_us_delta(now, req->block_io_start);
|
||||
//by xuweijie ohm_iolatency_record(req, nr_bytes, current_is_fg(), ktime_us_delta(now, req->block_io_start));
|
||||
trace_block_time(req->q, req, delta_us, nr_bytes);
|
||||
|
||||
if(delta_us > PRINT_LATENCY) {
|
||||
if((ktime_to_ms(now)) < COUNT_TIME){
|
||||
latency_count ++;
|
||||
}else{
|
||||
latency_count = 0;
|
||||
}
|
||||
io_print_flag = true;
|
||||
blk_fill_rwbs(rwbs,req->cmd_flags, nr_bytes);
|
||||
|
||||
/*if log is continuous, printk the first log.*/
|
||||
if(!io_print_count)
|
||||
pr_info("[IO Latency]UID:%u,slot:%d,outstanding=0x%lx,IO_Type:%s,Block IO/Flash Latency:(%llu/%llu)LBA:%llu,length:%d size:%d,count=%lld\n",
|
||||
(from_kuid_munged(current_user_ns(),current_uid())),
|
||||
req->tag,ufs_outstanding,rwbs,delta_us,req->flash_io_latency,
|
||||
(unsigned long long)blk_rq_pos(req),
|
||||
nr_bytes >> 9,blk_rq_bytes(req),latency_count);
|
||||
io_print_count++;
|
||||
}
|
||||
|
||||
if(!io_print_flag && io_print_count)
|
||||
io_print_count = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!req->bio)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -75,7 +75,10 @@
|
||||
#include "blk-mq.h"
|
||||
#include "blk-mq-tag.h"
|
||||
#include "blk-mq-sched.h"
|
||||
|
||||
#if defined(OPLUS_FEATURE_FG_IO_OPT) && defined(CONFIG_OPPO_FG_IO_OPT)
|
||||
/*Huacai.Zhou@Tech.Kernel.MM, 2020-03-23,add foreground io opt*/
|
||||
#include "oppo_foreground_io_opt/oppo_foreground_io_opt.h"
|
||||
#endif /*OPLUS_FEATURE_FG_IO_OPT*/
|
||||
/* PREFLUSH/FUA sequences */
|
||||
enum {
|
||||
REQ_FSEQ_PREFLUSH = (1 << 0), /* pre-flushing in progress */
|
||||
@@ -93,6 +96,11 @@ enum {
|
||||
FLUSH_PENDING_TIMEOUT = 5 * HZ,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_OPLUS_FEATURE_PANIC_FLUSH
|
||||
/*jason.tang@TECH.BSP.Kernel.Storage, 2019-05-20, add to count flush*/
|
||||
extern unsigned long sysctl_blkdev_issue_flush_count;
|
||||
#endif
|
||||
|
||||
static bool blk_kick_flush(struct request_queue *q,
|
||||
struct blk_flush_queue *fq);
|
||||
|
||||
@@ -142,6 +150,10 @@ static bool blk_flush_queue_rq(struct request *rq, bool add_front)
|
||||
list_add(&rq->queuelist, &rq->q->queue_head);
|
||||
else
|
||||
list_add_tail(&rq->queuelist, &rq->q->queue_head);
|
||||
#if defined(OPLUS_FEATURE_FG_IO_OPT) && defined(CONFIG_OPPO_FG_IO_OPT)
|
||||
/*Huacai.Zhou@Tech.Kernel.MM, 2020-03-23,add foreground io opt*/
|
||||
queue_throtl_add_request(rq->q, rq, add_front);
|
||||
#endif /*OPLUS_FEATURE_FG_IO_OPT*/
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -465,7 +477,15 @@ void blk_insert_flush(struct request *rq)
|
||||
if (q->mq_ops)
|
||||
blk_mq_sched_insert_request(rq, false, true, false, false);
|
||||
else
|
||||
#if defined(OPLUS_FEATURE_FG_IO_OPT) && defined(CONFIG_OPPO_FG_IO_OPT)
|
||||
/*Huacai.Zhou@Tech.Kernel.MM, 2020-03-23,add foreground io opt*/
|
||||
{
|
||||
list_add_tail(&rq->queuelist, &q->queue_head);
|
||||
queue_throtl_add_request(q, rq, false);
|
||||
}
|
||||
#else
|
||||
list_add_tail(&rq->queuelist, &q->queue_head);
|
||||
#endif /*OPLUS_FEATURE_FG_IO_OPT*/
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -524,6 +544,11 @@ int blkdev_issue_flush(struct block_device *bdev, gfp_t gfp_mask,
|
||||
if (!q->make_request_fn)
|
||||
return -ENXIO;
|
||||
|
||||
#ifdef CONFIG_OPLUS_FEATURE_PANIC_FLUSH
|
||||
/*jason.tang@TECH.BSP.Kernel.Storage, 2019-05-20, add to count flush*/
|
||||
sysctl_blkdev_issue_flush_count++;
|
||||
#endif
|
||||
|
||||
bio = bio_alloc(gfp_mask, 0);
|
||||
bio_set_dev(bio, bdev);
|
||||
bio->bi_opf = REQ_OP_WRITE | REQ_PREFLUSH;
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
#include "blk-mq-debugfs.h"
|
||||
#include "blk-wbt.h"
|
||||
|
||||
#if defined(OPLUS_FEATURE_FG_IO_OPT) && defined(CONFIG_OPPO_FG_IO_OPT)
|
||||
/*Huacai.Zhou@Tech.Kernel.MM, 2020-03-23,add foreground io opt*/
|
||||
#include "oppo_foreground_io_opt/oppo_foreground_io_opt.h"
|
||||
#endif /*OPLUS_FEATURE_FG_IO_OPT*/
|
||||
struct queue_sysfs_entry {
|
||||
struct attribute attr;
|
||||
ssize_t (*show)(struct request_queue *, char *);
|
||||
@@ -396,6 +400,23 @@ static ssize_t queue_poll_delay_store(struct request_queue *q, const char *page,
|
||||
return count;
|
||||
}
|
||||
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
// jiheng.xie@PSW.Tech.BSP.Performance, 2019/03/11
|
||||
// Add for ioqueue
|
||||
#ifdef CONFIG_OPPO_HEALTHINFO
|
||||
static ssize_t queue_show_ohm_inflight(struct request_queue *q, char *page)
|
||||
{
|
||||
ssize_t ret;
|
||||
|
||||
ret = sprintf(page, "async:%d\n", q->in_flight[0]);
|
||||
ret += sprintf(page + ret, "sync:%d\n", q->in_flight[1]);
|
||||
ret += sprintf(page + ret, "bg:%d\n", q->in_flight[2]);
|
||||
ret += sprintf(page + ret, "fg:%d\n", q->in_flight[3]);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
|
||||
static ssize_t queue_poll_show(struct request_queue *q, char *page)
|
||||
{
|
||||
return queue_var_show(test_bit(QUEUE_FLAG_POLL, &q->queue_flags), page);
|
||||
@@ -638,6 +659,16 @@ static struct queue_sysfs_entry queue_rq_affinity_entry = {
|
||||
.store = queue_rq_affinity_store,
|
||||
};
|
||||
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
//Jiheng.Xie@PSW.Tech.BSP.Performance, 2019/03/11, Add for ioqueue
|
||||
#ifdef CONFIG_OPPO_HEALTHINFO
|
||||
static struct queue_sysfs_entry queue_ohm_inflight_entry = {
|
||||
.attr = {.name = "ohm_inflight", .mode = S_IRUGO },
|
||||
.show = queue_show_ohm_inflight,
|
||||
};
|
||||
#endif
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
|
||||
static struct queue_sysfs_entry queue_iostats_entry = {
|
||||
.attr = {.name = "iostats", .mode = S_IRUGO | S_IWUSR },
|
||||
.show = queue_show_iostats,
|
||||
@@ -687,9 +718,28 @@ static struct queue_sysfs_entry throtl_sample_time_entry = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(OPLUS_FEATURE_FG_IO_OPT) && defined(CONFIG_OPPO_FG_IO_OPT)
|
||||
/*Huacai.Zhou@Tech.Kernel.MM, 2020-03-23,add foreground io opt*/
|
||||
static struct queue_sysfs_entry queue_fgio_entry = {
|
||||
.attr = {.name = "fg_io_cnt_max", .mode = S_IRUGO | S_IWUSR },
|
||||
.show = queue_fg_count_max_show,
|
||||
.store = queue_fg_count_max_store,
|
||||
};
|
||||
static struct queue_sysfs_entry queue_bothio_entry = {
|
||||
.attr = {.name = "both_io_cnt_max", .mode = S_IRUGO | S_IWUSR },
|
||||
.show = queue_both_count_max_show,
|
||||
.store = queue_both_count_max_store,
|
||||
};
|
||||
#endif /*OPLUS_FEATURE_FG_IO_OPT*/
|
||||
|
||||
static struct attribute *default_attrs[] = {
|
||||
&queue_requests_entry.attr,
|
||||
&queue_ra_entry.attr,
|
||||
#if defined(OPLUS_FEATURE_FG_IO_OPT) && defined(CONFIG_OPPO_FG_IO_OPT)
|
||||
/*Huacai.Zhou@Tech.Kernel.MM, 2020-03-23,add foreground io opt*/
|
||||
&queue_fgio_entry.attr,
|
||||
&queue_bothio_entry.attr,
|
||||
#endif /*OPLUS_FEATURE_FG_IO_OPT*/
|
||||
&queue_max_hw_sectors_entry.attr,
|
||||
&queue_max_sectors_entry.attr,
|
||||
&queue_max_segments_entry.attr,
|
||||
@@ -714,6 +764,13 @@ static struct attribute *default_attrs[] = {
|
||||
&queue_nomerges_entry.attr,
|
||||
&queue_rq_affinity_entry.attr,
|
||||
&queue_iostats_entry.attr,
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
// jiheng.xie@PSW.Tech.BSP.Performance, 2019/03/11
|
||||
// Add for ioqueue
|
||||
#ifdef CONFIG_OPPO_HEALTHINFO
|
||||
&queue_ohm_inflight_entry.attr,
|
||||
#endif
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
&queue_random_entry.attr,
|
||||
&queue_poll_entry.attr,
|
||||
&queue_wc_entry.attr,
|
||||
|
||||
26
block/blk.h
26
block/blk.h
@@ -5,6 +5,9 @@
|
||||
#include <linux/idr.h>
|
||||
#include <linux/blk-mq.h>
|
||||
#include "blk-mq.h"
|
||||
#if defined(OPLUS_FEATURE_FG_IO_OPT) && defined(CONFIG_OPPO_FG_IO_OPT)
|
||||
#include <linux/oppo_healthinfo/oppo_fg.h>
|
||||
#endif
|
||||
|
||||
/* Amount of time in which a process may batch requests */
|
||||
#define BLK_BATCH_TIME (HZ/50UL)
|
||||
@@ -18,7 +21,10 @@
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
extern struct dentry *blk_debugfs_root;
|
||||
#endif
|
||||
|
||||
#if defined(OPLUS_FEATURE_FG_IO_OPT) && defined(CONFIG_OPPO_FG_IO_OPT)
|
||||
extern unsigned int sysctl_fg_io_opt;
|
||||
extern struct request * smart_peek_request(struct request_queue *q);
|
||||
#endif
|
||||
struct blk_flush_queue {
|
||||
unsigned int flush_queue_delayed:1;
|
||||
unsigned int flush_pending_idx:1;
|
||||
@@ -157,11 +163,27 @@ static inline struct request *__elv_next_request(struct request_queue *q)
|
||||
WARN_ON_ONCE(q->mq_ops);
|
||||
|
||||
while (1) {
|
||||
#if defined(OPLUS_FEATURE_FG_IO_OPT) && defined(CONFIG_OPPO_FG_IO_OPT)
|
||||
/*Huacai.Zhou@Tech.Kernel.MM, 2020-03-23,add foreground io opt*/
|
||||
if (likely(sysctl_fg_io_opt)
|
||||
#ifdef CONFIG_PM
|
||||
&&(q->rpm_status == RPM_ACTIVE)
|
||||
#endif
|
||||
) {
|
||||
rq = smart_peek_request(q);
|
||||
if(rq)
|
||||
return rq;
|
||||
}
|
||||
else {
|
||||
#endif /*OPLUS_FEATURE_FG_IO_OPT*/
|
||||
if (!list_empty(&q->queue_head)) {
|
||||
rq = list_entry_rq(q->queue_head.next);
|
||||
return rq;
|
||||
}
|
||||
|
||||
#if defined(OPLUS_FEATURE_FG_IO_OPT) && defined(CONFIG_OPPO_FG_IO_OPT)
|
||||
/*Huacai.Zhou@Tech.Kernel.MM, 2020-03-23,add foreground io opt*/
|
||||
}
|
||||
#endif /*OPLUS_FEATURE_FG_IO_OPT*/
|
||||
/*
|
||||
* Flush request is running and flush request isn't queueable
|
||||
* in the drive, we can hold the queue till flush request is
|
||||
|
||||
@@ -42,6 +42,10 @@
|
||||
#include "blk.h"
|
||||
#include "blk-mq-sched.h"
|
||||
#include "blk-wbt.h"
|
||||
#if defined(OPLUS_FEATURE_FG_IO_OPT) && defined(CONFIG_OPPO_FG_IO_OPT)
|
||||
/*Huacai.Zhou@Tech.Kernel.MM, 2020-03-23,add foreground io opt*/
|
||||
#include "oppo_foreground_io_opt/oppo_foreground_io_opt.h"
|
||||
#endif /*OPLUS_FEATURE_FG_IO_OPT*/
|
||||
|
||||
static DEFINE_SPINLOCK(elv_list_lock);
|
||||
static LIST_HEAD(elv_list);
|
||||
@@ -415,6 +419,10 @@ void elv_dispatch_sort(struct request_queue *q, struct request *rq)
|
||||
}
|
||||
|
||||
list_add(&rq->queuelist, entry);
|
||||
#if defined(OPLUS_FEATURE_FG_IO_OPT) && defined(CONFIG_OPPO_FG_IO_OPT)
|
||||
/*Huacai.Zhou@Tech.Kernel.MM, 2020-03-23,add foreground io opt*/
|
||||
queue_throtl_add_request(q, rq, false);
|
||||
#endif /*OPLUS_FEATURE_FG_IO_OPT*/
|
||||
}
|
||||
EXPORT_SYMBOL(elv_dispatch_sort);
|
||||
|
||||
@@ -435,6 +443,10 @@ void elv_dispatch_add_tail(struct request_queue *q, struct request *rq)
|
||||
q->end_sector = rq_end_sector(rq);
|
||||
q->boundary_rq = rq;
|
||||
list_add_tail(&rq->queuelist, &q->queue_head);
|
||||
#if defined(OPLUS_FEATURE_FG_IO_OPT) && defined(CONFIG_OPPO_FG_IO_OPT)
|
||||
/*Huacai.Zhou@Tech.Kernel.MM, 2020-03-23,add foreground io opt*/
|
||||
queue_throtl_add_request(q, rq, false);
|
||||
#endif /*OPLUS_FEATURE_FG_IO_OPT*/
|
||||
}
|
||||
EXPORT_SYMBOL(elv_dispatch_add_tail);
|
||||
|
||||
@@ -607,6 +619,13 @@ void elv_requeue_request(struct request_queue *q, struct request *rq)
|
||||
*/
|
||||
if (blk_account_rq(rq)) {
|
||||
q->in_flight[rq_is_sync(rq)]--;
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
// jiheng.xie@PSW.Tech.BSP.Performance, 2019/03/11
|
||||
// Add for ioqueue
|
||||
#ifdef CONFIG_OPPO_HEALTHINFO
|
||||
ohm_ioqueue_dec_inflight(q, rq);
|
||||
#endif
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
if (rq->rq_flags & RQF_SORTED)
|
||||
elv_deactivate_rq(q, rq);
|
||||
}
|
||||
@@ -639,6 +658,10 @@ void elv_drain_elevator(struct request_queue *q)
|
||||
|
||||
void __elv_add_request(struct request_queue *q, struct request *rq, int where)
|
||||
{
|
||||
#if defined(OPLUS_FEATURE_IOMONITOR) && defined(CONFIG_IOMONITOR)
|
||||
rq->req_ti = ktime_get();
|
||||
#endif /*OPLUS_FEATURE_IOMONITOR*/
|
||||
|
||||
trace_block_rq_insert(q, rq);
|
||||
|
||||
blk_pm_add_request(q, rq);
|
||||
@@ -661,12 +684,20 @@ void __elv_add_request(struct request_queue *q, struct request *rq, int where)
|
||||
case ELEVATOR_INSERT_FRONT:
|
||||
rq->rq_flags |= RQF_SOFTBARRIER;
|
||||
list_add(&rq->queuelist, &q->queue_head);
|
||||
#if defined(OPLUS_FEATURE_FG_IO_OPT) && defined(CONFIG_OPPO_FG_IO_OPT)
|
||||
/*Huacai.Zhou@Tech.Kernel.MM, 2020-03-23,add foreground io opt*/
|
||||
queue_throtl_add_request(q, rq, true);
|
||||
#endif /*OPLUS_FEATURE_FG_IO_OPT*/
|
||||
break;
|
||||
|
||||
case ELEVATOR_INSERT_BACK:
|
||||
rq->rq_flags |= RQF_SOFTBARRIER;
|
||||
elv_drain_elevator(q);
|
||||
list_add_tail(&rq->queuelist, &q->queue_head);
|
||||
#if defined(OPLUS_FEATURE_FG_IO_OPT) && defined(CONFIG_OPPO_FG_IO_OPT)
|
||||
/*Huacai.Zhou@Tech.Kernel.MM, 2020-03-23,add foreground io opt*/
|
||||
queue_throtl_add_request(q, rq, false);
|
||||
#endif /*OPLUS_FEATURE_FG_IO_OPT*/
|
||||
/*
|
||||
* We kick the queue here for the following reasons.
|
||||
* - The elevator might have returned NULL previously
|
||||
@@ -801,6 +832,13 @@ void elv_completed_request(struct request_queue *q, struct request *rq)
|
||||
*/
|
||||
if (blk_account_rq(rq)) {
|
||||
q->in_flight[rq_is_sync(rq)]--;
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
// jiheng.xie@PSW.Tech.BSP.Performance, 2019/03/11
|
||||
// Add for ioqueue
|
||||
#ifdef CONFIG_OPPO_HEALTHINFO
|
||||
ohm_ioqueue_dec_inflight(q, rq);
|
||||
#endif
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
if ((rq->rq_flags & RQF_SORTED) &&
|
||||
e->type->ops.sq.elevator_completed_req_fn)
|
||||
e->type->ops.sq.elevator_completed_req_fn(q, rq);
|
||||
|
||||
@@ -205,6 +205,13 @@ static void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter)
|
||||
__set_bit(GPCMD_LOAD_UNLOAD, filter->write_ok);
|
||||
__set_bit(GPCMD_SET_STREAMING, filter->write_ok);
|
||||
__set_bit(GPCMD_SET_READ_AHEAD, filter->write_ok);
|
||||
#ifdef OPLUS_FEATURE_STORAGE_TOOL
|
||||
// jason.wu@BSP.Storage, 2020-6-11
|
||||
// add write buffer command for common user
|
||||
// add vendor command for common user
|
||||
__set_bit(WRITE_BUFFER, filter->write_ok);
|
||||
__set_bit(VENDOR_SPECIFIC_CDB, filter->write_ok);
|
||||
#endif
|
||||
}
|
||||
|
||||
int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm)
|
||||
@@ -424,6 +431,12 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode,
|
||||
int err;
|
||||
unsigned int in_len, out_len, bytes, opcode, cmdlen;
|
||||
char *buffer = NULL;
|
||||
#ifdef OPLUS_FEATURE_STORAGE_TOOL
|
||||
// jason.wu@BSP.Storage, 2020-03-03 workaround for samsung device.
|
||||
// vendor cmd len is 16 and not 10 in spec.
|
||||
// in current application ,only samsung health will use this cmd.
|
||||
struct scsi_device *sdev = NULL;
|
||||
#endif
|
||||
|
||||
if (!sic)
|
||||
return -EINVAL;
|
||||
@@ -457,6 +470,17 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode,
|
||||
req = scsi_req(rq);
|
||||
|
||||
cmdlen = COMMAND_SIZE(opcode);
|
||||
#ifdef OPLUS_FEATURE_STORAGE_TOOL
|
||||
// jason.wu@BSP.Storage, 2020-03-03 workaround for samsung device.
|
||||
// vendor cmd len is 16 and not 10 in spec.
|
||||
// in current application ,only samsung health will use this cmd.
|
||||
sdev = (struct scsi_device*)(q->queuedata);
|
||||
if ((VENDOR_SPECIFIC_CDB == opcode)
|
||||
&&(0 == strncmp(sdev->vendor, "SAMSUNG ", 8))
|
||||
){
|
||||
cmdlen = 16;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* get command and data to send to device, if any
|
||||
|
||||
@@ -105,7 +105,11 @@ source "drivers/usb/Kconfig"
|
||||
|
||||
source "drivers/uwb/Kconfig"
|
||||
|
||||
source "drivers/mmc/Kconfig"
|
||||
#ifdef VENDOR_EDIT
|
||||
source "drivers/ommc/Kconfig"
|
||||
#else
|
||||
#source "drivers/mmc/Kconfig"
|
||||
#endif
|
||||
|
||||
source "drivers/memstick/Kconfig"
|
||||
|
||||
@@ -225,4 +229,10 @@ source "drivers/sensors/Kconfig"
|
||||
|
||||
source "drivers/esoc/Kconfig"
|
||||
|
||||
#ifdef OPLUS_NFC_BRINGUP
|
||||
#DengWeiwei@CONNECTIVITY.NFC.HARDWARE.228691, 2020/08/03
|
||||
#Add for the kernel Macro for NXP PN557 NFC kernel
|
||||
source "drivers/nfc/pn553-i2c/Kconfig"
|
||||
source "drivers/nfc/p73-spi/Kconfig"
|
||||
#endif /*OPLUS_NFC_BRINGUP*/
|
||||
endmenu
|
||||
|
||||
@@ -133,7 +133,11 @@ obj-$(CONFIG_EDAC) += edac/
|
||||
obj-$(CONFIG_EISA) += eisa/
|
||||
obj-$(CONFIG_CPU_FREQ) += cpufreq/
|
||||
obj-$(CONFIG_CPU_IDLE) += cpuidle/
|
||||
ifneq ($(TARGET_PRODUCT),qssi)
|
||||
obj-y += ommc/
|
||||
else
|
||||
obj-y += mmc/
|
||||
endif
|
||||
obj-$(CONFIG_MEMSTICK) += memstick/
|
||||
obj-$(CONFIG_NEW_LEDS) += leds/
|
||||
obj-$(CONFIG_INFINIBAND) += infiniband/
|
||||
|
||||
@@ -78,6 +78,15 @@
|
||||
#include "binder_internal.h"
|
||||
#include "binder_trace.h"
|
||||
|
||||
#ifdef OPLUS_FEATURE_UIFIRST
|
||||
// XieLiujie@BSP.KERNEL.PERFORMANCE, 2020/05/25, Add for UIFirst
|
||||
#include <linux/uifirst/uifirst_sched_binder.h>
|
||||
#endif /* OPLUS_FEATURE_UIFIRST */
|
||||
|
||||
#ifdef OPLUS_FEATURE_HANS_FREEZE
|
||||
// Kun.Zhou@ANDROID.RESCONTROL, 2019/09/23, add for hans freeze manager
|
||||
#include <linux/hans.h>
|
||||
#endif /*OPLUS_FEATURE_HANS_FREEZE*/
|
||||
static HLIST_HEAD(binder_deferred_list);
|
||||
static DEFINE_MUTEX(binder_deferred_lock);
|
||||
|
||||
@@ -507,6 +516,10 @@ struct binder_proc {
|
||||
struct hlist_node deferred_work_node;
|
||||
int deferred_work;
|
||||
bool is_dead;
|
||||
#ifdef OPLUS_FEATURE_UIFIRST
|
||||
// XieLiujie@BSP.KERNEL.PERFORMANCE, 2020/06/15, Add for UIFirst
|
||||
int proc_type;
|
||||
#endif /* OPLUS_FEATURE_UIFIRST */
|
||||
|
||||
struct list_head todo;
|
||||
struct binder_stats stats;
|
||||
@@ -2837,6 +2850,14 @@ static int binder_fixup_parent(struct binder_transaction *t,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef OPLUS_FEATURE_UIFIRST
|
||||
// XieLiujie@BSP.KERNEL.PERFORMANCE, 2020/06/15, Add for UIFirst
|
||||
static inline bool is_binder_proc_sf(struct binder_proc *proc)
|
||||
{
|
||||
return proc && proc->tsk && strstr(proc->tsk->comm, "surfaceflinger")
|
||||
&& (task_uid(proc->tsk).val == 1000);
|
||||
}
|
||||
#endif /* OPLUS_FEATURE_UIFIRST */
|
||||
/**
|
||||
* binder_proc_transaction() - sends a transaction to a process and wakes it up
|
||||
* @t: transaction to send
|
||||
@@ -2892,6 +2913,13 @@ static bool binder_proc_transaction(struct binder_transaction *t,
|
||||
binder_transaction_priority(thread->task, t, node_prio,
|
||||
node->inherit_rt);
|
||||
binder_enqueue_thread_work_ilocked(thread, &t->work);
|
||||
#ifdef OPLUS_FEATURE_UIFIRST
|
||||
// XieLiujie@BSP.KERNEL.PERFORMANCE, 2020/05/25, Add for UIFirst
|
||||
if (sysctl_uifirst_enabled) {
|
||||
if (!oneway || proc->proc_type)
|
||||
binder_set_inherit_ux(thread->task, current);
|
||||
}
|
||||
#endif /* OPLUS_FEATURE_UIFIRST */
|
||||
} else if (!pending_async) {
|
||||
binder_enqueue_work_ilocked(&t->work, &proc->todo);
|
||||
} else {
|
||||
@@ -2975,6 +3003,14 @@ static void binder_transaction(struct binder_proc *proc,
|
||||
int t_debug_id = atomic_inc_return(&binder_last_id);
|
||||
char *secctx = NULL;
|
||||
u32 secctx_sz = 0;
|
||||
#ifdef OPLUS_FEATURE_HANS_FREEZE
|
||||
//#Kun.Zhou@ANDROID.RESCONTROL, 2019/09/23, add for hans freeze manager
|
||||
char buf_data[INTERFACETOKEN_BUFF_SIZE];
|
||||
size_t buf_data_size;
|
||||
char buf[INTERFACETOKEN_BUFF_SIZE] = {0};
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
#endif /*OPLUS_FEATURE_HANS_FREEZE*/
|
||||
|
||||
e = binder_transaction_log_add(&binder_transaction_log);
|
||||
e->debug_id = t_debug_id;
|
||||
@@ -3090,6 +3126,27 @@ static void binder_transaction(struct binder_proc *proc,
|
||||
return_error_line = __LINE__;
|
||||
goto err_dead_binder;
|
||||
}
|
||||
|
||||
#ifdef OPLUS_FEATURE_HANS_FREEZE
|
||||
//#Kun.Zhou@ANDROID.RESCONTROL, 2019/09/23, add for hans freeze manager
|
||||
if (!(tr->flags & TF_ONE_WAY) //report sync binder call
|
||||
&& target_proc
|
||||
&& (task_uid(target_proc->tsk).val > MIN_USERAPP_UID)
|
||||
&& (proc->pid != target_proc->pid)
|
||||
&& is_frozen_tg(target_proc->tsk)) {
|
||||
hans_report(SYNC_BINDER, task_tgid_nr(proc->tsk), task_uid(proc->tsk).val, task_tgid_nr(target_proc->tsk), task_uid(target_proc->tsk).val, "SYNC_BINDER", -1);
|
||||
}
|
||||
#endif /*OPLUS_FEATURE_HANS_FREEZE*/
|
||||
|
||||
#if defined(CONFIG_CFS_BANDWIDTH)
|
||||
if (!(tr->flags & TF_ONE_WAY) //report sync binder call
|
||||
&& target_proc
|
||||
&& (task_uid(target_proc->tsk).val > MIN_USERAPP_UID || task_uid(target_proc->tsk).val == HANS_SYSTEM_UID) //uid >10000
|
||||
&& is_belong_cpugrp(target_proc->tsk)) {
|
||||
hans_report(SYNC_BINDER_CPUCTL, task_tgid_nr(proc->tsk), task_uid(proc->tsk).val, task_tgid_nr(target_proc->tsk), task_uid(target_proc->tsk).val, "SYNC_BINDER_CPUCTL", -1);
|
||||
}
|
||||
#endif
|
||||
|
||||
e->to_node = target_node->debug_id;
|
||||
if (security_binder_transaction(proc->tsk,
|
||||
target_proc->tsk) < 0) {
|
||||
@@ -3299,6 +3356,32 @@ static void binder_transaction(struct binder_proc *proc,
|
||||
return_error_line = __LINE__;
|
||||
goto err_bad_offset;
|
||||
}
|
||||
#ifdef OPLUS_FEATURE_HANS_FREEZE
|
||||
//#Kun.Zhou@ANDROID.RESCONTROL, 2019/09/23, add for hans freeze manager
|
||||
if ((tr->flags & TF_ONE_WAY) //report async binder call
|
||||
&& target_proc
|
||||
&& (task_uid(target_proc->tsk).val > MIN_USERAPP_UID)
|
||||
&& (proc->pid != target_proc->pid)
|
||||
&& is_frozen_tg(target_proc->tsk)) {
|
||||
buf_data_size = tr->data_size>INTERFACETOKEN_BUFF_SIZE ?INTERFACETOKEN_BUFF_SIZE:tr->data_size;
|
||||
if (!copy_from_user(buf_data, (char*)tr->data.ptr.buffer, buf_data_size)) {
|
||||
//1.skip first PARCEL_OFFSET bytes (useless data)
|
||||
//2.make sure the invalid address issue is not occuring(j =PARCEL_OFFSET+1, j+=2)
|
||||
//3.java layer uses 2 bytes char. And only the first bytes has the data.(p+=2)
|
||||
if (buf_data_size > PARCEL_OFFSET) {
|
||||
char *p = (char *)(buf_data) + PARCEL_OFFSET;
|
||||
j = PARCEL_OFFSET + 1;
|
||||
while (i < INTERFACETOKEN_BUFF_SIZE && j < buf_data_size && *p != '\0') {
|
||||
buf[i++] = *p;
|
||||
j += 2;
|
||||
p += 2;
|
||||
}
|
||||
if (i == INTERFACETOKEN_BUFF_SIZE) buf[i-1] = '\0';
|
||||
}
|
||||
hans_report(ASYNC_BINDER, task_tgid_nr(proc->tsk), task_uid(proc->tsk).val, task_tgid_nr(target_proc->tsk), task_uid(target_proc->tsk).val, buf, tr->code);
|
||||
}
|
||||
}
|
||||
#endif /*OPLUS_FEATURE_HANS_FREEZE*/
|
||||
off_start_offset = ALIGN(tr->data_size, sizeof(void *));
|
||||
buffer_offset = off_start_offset;
|
||||
off_end_offset = off_start_offset + tr->offsets_size;
|
||||
@@ -3507,6 +3590,12 @@ static void binder_transaction(struct binder_proc *proc,
|
||||
binder_enqueue_thread_work_ilocked(target_thread, &t->work);
|
||||
binder_inner_proc_unlock(target_proc);
|
||||
wake_up_interruptible_sync(&target_thread->wait);
|
||||
#ifdef OPLUS_FEATURE_UIFIRST
|
||||
// XieLiujie@BSP.KERNEL.PERFORMANCE, 2020/05/25, Add for UIFirst
|
||||
if (sysctl_uifirst_enabled && !proc->proc_type) {
|
||||
binder_unset_inherit_ux(thread->task);
|
||||
}
|
||||
#endif /* OPLUS_FEATURE_UIFIRST */
|
||||
binder_restore_priority(current, in_reply_to->saved_priority);
|
||||
binder_free_transaction(in_reply_to);
|
||||
} else if (!(t->flags & TF_ONE_WAY)) {
|
||||
@@ -4148,11 +4237,36 @@ static int binder_wait_for_work(struct binder_thread *thread,
|
||||
prepare_to_wait(&thread->wait, &wait, TASK_INTERRUPTIBLE);
|
||||
if (binder_has_work_ilocked(thread, do_proc_work))
|
||||
break;
|
||||
#ifdef OPLUS_FEATURE_UIFIRST
|
||||
// XieLiujie@BSP.KERNEL.PERFORMANCE, 2020/06/15, Add for UIFirst
|
||||
if (do_proc_work) {
|
||||
list_add(&thread->waiting_thread_node,
|
||||
&proc->waiting_threads);
|
||||
|
||||
if (sysctl_uifirst_enabled) {
|
||||
binder_unset_inherit_ux(thread->task);
|
||||
}
|
||||
}
|
||||
#else /* OPLUS_FEATURE_UIFIRST */
|
||||
if (do_proc_work)
|
||||
list_add(&thread->waiting_thread_node,
|
||||
&proc->waiting_threads);
|
||||
#endif /* OPLUS_FEATURE_UIFIRST */
|
||||
binder_inner_proc_unlock(proc);
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
// Liujie.Xie@TECH.Kernel.Sched, 2019/08/29, add for jank monitor
|
||||
#ifdef CONFIG_OPPO_JANK_INFO
|
||||
if (!do_proc_work)
|
||||
current->in_binder = 1;
|
||||
#endif
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
schedule();
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
// Liujie.Xie@TECH.Kernel.Sched, 2019/08/29, add for jank monitor
|
||||
#ifdef CONFIG_OPPO_JANK_INFO
|
||||
current->in_binder = 0;
|
||||
#endif
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
binder_inner_proc_lock(proc);
|
||||
list_del_init(&thread->waiting_thread_node);
|
||||
if (signal_pending(current)) {
|
||||
@@ -4445,6 +4559,12 @@ retry:
|
||||
trd->sender_pid =
|
||||
task_tgid_nr_ns(sender,
|
||||
task_active_pid_ns(current));
|
||||
#ifdef OPLUS_FEATURE_UIFIRST
|
||||
// XieLiujie@BSP.KERNEL.PERFORMANCE, 2020/05/25, Add for UIFirst
|
||||
if (sysctl_uifirst_enabled) {
|
||||
binder_set_inherit_ux(thread->task, t_from->task);
|
||||
}
|
||||
#endif /* OPLUS_FEATURE_UIFIRST */
|
||||
} else {
|
||||
trd->sender_pid = 0;
|
||||
}
|
||||
@@ -5190,6 +5310,10 @@ static int binder_open(struct inode *nodp, struct file *filp)
|
||||
atomic_set(&proc->tmp_ref, 0);
|
||||
get_task_struct(current->group_leader);
|
||||
proc->tsk = current->group_leader;
|
||||
#ifdef OPLUS_FEATURE_UIFIRST
|
||||
// XieLiujie@BSP.KERNEL.PERFORMANCE, 2020/06/15, Add for UIFirst
|
||||
proc->proc_type = is_binder_proc_sf(proc) ? 1 : 0;
|
||||
#endif /* OPLUS_FEATURE_UIFIRST */
|
||||
mutex_init(&proc->files_lock);
|
||||
INIT_LIST_HEAD(&proc->todo);
|
||||
if (binder_supported_policy(current->policy)) {
|
||||
@@ -5959,6 +6083,114 @@ int binder_state_show(struct seq_file *m, void *unused)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef OPLUS_FEATURE_HANS_FREEZE
|
||||
static void get_uid_pid(int *from_pid, int *from_uid, int *to_pid, int *to_uid, struct binder_transaction *tr)
|
||||
{
|
||||
if (tr->from != NULL && tr->from->proc != NULL
|
||||
&& tr->from->proc->tsk != NULL) {
|
||||
*from_pid = task_tgid_nr(tr->from->proc->tsk);
|
||||
} else {
|
||||
*from_pid = -1;
|
||||
}
|
||||
*from_uid = tr->sender_euid.val;
|
||||
*to_pid = tr->to_thread ? tr->to_thread->proc->pid : -1;
|
||||
*to_uid = tr->to_thread ? task_uid(tr->to_thread->task).val : -1;
|
||||
}
|
||||
|
||||
// Kun.Zhou@ROM.Framework, 2019/09/23, add for hans freeze manager
|
||||
static void hans_check_uid_proc_status(struct binder_proc *proc, enum message_type type)
|
||||
{
|
||||
struct rb_node *n = NULL;
|
||||
struct binder_thread *thread = NULL;
|
||||
int from_uid = -1;
|
||||
int from_pid = -1;
|
||||
int to_uid = -1;
|
||||
int to_pid = -1;
|
||||
struct binder_transaction *btrans = NULL;
|
||||
bool empty = true;
|
||||
int need_reply = -1;
|
||||
struct binder_work *w = NULL;
|
||||
|
||||
/*check binder_thread/transaction_stack/binder_proc ongoing transaction*/
|
||||
binder_inner_proc_lock(proc);
|
||||
for (n = rb_first(&proc->threads); n != NULL; n = rb_next(n)) {
|
||||
thread = rb_entry(n, struct binder_thread, rb_node);
|
||||
empty = binder_worklist_empty_ilocked(&thread->todo);
|
||||
|
||||
if (thread->task != NULL) {
|
||||
/*has "todo" binder thread in worklist?*/
|
||||
to_uid = task_uid(thread->task).val;
|
||||
if (!empty) {
|
||||
/*scan thread->todo list*/
|
||||
list_for_each_entry(w, &thread->todo, entry) {
|
||||
if (w != NULL && w->type == BINDER_WORK_TRANSACTION) {
|
||||
btrans = container_of(w, struct binder_transaction, work);
|
||||
spin_lock(&btrans->lock);
|
||||
if (btrans != NULL && btrans->to_thread == thread) {
|
||||
need_reply = (int)(btrans->need_reply == 1);
|
||||
get_uid_pid(&from_pid, &from_uid, &to_pid, &to_uid, btrans);
|
||||
spin_unlock(&btrans->lock);
|
||||
hans_report(type, from_pid, from_uid, to_pid, to_uid, "FROZEN_TRANS_THREAD", need_reply);
|
||||
} else {
|
||||
spin_unlock(&btrans->lock);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*has transcation in transaction_stack?*/
|
||||
btrans = thread->transaction_stack;
|
||||
if (btrans) {
|
||||
spin_lock(&btrans->lock);
|
||||
if (btrans->to_thread == thread) {
|
||||
/*only report incoming binder call*/
|
||||
need_reply = (int)(btrans->need_reply == 1);
|
||||
get_uid_pid(&from_pid, &from_uid, &to_pid, &to_uid, btrans);
|
||||
spin_unlock(&btrans->lock);
|
||||
hans_report(type, from_pid, from_uid, to_pid, to_uid, "FROZEN_TRANS_STACK", need_reply);
|
||||
} else {
|
||||
spin_unlock(&btrans->lock);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*has "todo" binder proc in worklist*/
|
||||
empty = binder_worklist_empty_ilocked(&proc->todo);
|
||||
if (proc->tsk != NULL && !empty) {
|
||||
to_uid = task_uid(proc->tsk).val;
|
||||
list_for_each_entry(w, &proc->todo, entry) {
|
||||
if (w != NULL && w->type == BINDER_WORK_TRANSACTION) {
|
||||
btrans = container_of(w, struct binder_transaction, work);
|
||||
spin_lock(&btrans->lock);
|
||||
if (btrans != NULL && btrans->to_thread == thread) {
|
||||
need_reply = (int)(btrans->need_reply == 1);
|
||||
get_uid_pid(&from_pid, &from_uid, &to_pid, &to_uid, btrans);
|
||||
spin_unlock(&btrans->lock);
|
||||
hans_report(type, from_pid, from_uid, to_pid, to_uid, "FROZEN_TRANS_PROC", need_reply);
|
||||
} else {
|
||||
spin_unlock(&btrans->lock);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
binder_inner_proc_unlock(proc);
|
||||
}
|
||||
|
||||
void hans_check_frozen_transcation(uid_t uid, enum message_type type)
|
||||
{
|
||||
struct binder_proc *proc;
|
||||
|
||||
mutex_lock(&binder_procs_lock);
|
||||
hlist_for_each_entry(proc, &binder_procs, proc_node) {
|
||||
if (proc != NULL && (task_uid(proc->tsk).val == uid)) {
|
||||
hans_check_uid_proc_status(proc, type);
|
||||
}
|
||||
}
|
||||
mutex_unlock(&binder_procs_lock);
|
||||
}
|
||||
#endif /*OPLUS_FEATURE_HANS_FREEZE*/
|
||||
|
||||
int binder_stats_show(struct seq_file *m, void *unused)
|
||||
{
|
||||
struct binder_proc *proc;
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
#include <linux/highmem.h>
|
||||
#include "binder_alloc.h"
|
||||
#include "binder_trace.h"
|
||||
#ifdef OPLUS_FEATURE_HANS_FREEZE
|
||||
//#Kun.Zhou@ANDROID.RESCONTROL, 2019/09/23, add for hans freeze manager
|
||||
#include <linux/hans.h>
|
||||
#endif /*OPLUS_FEATURE_HANS_FREEZE*/
|
||||
|
||||
struct list_lru binder_alloc_lru;
|
||||
|
||||
@@ -358,6 +362,10 @@ static struct binder_buffer *binder_alloc_new_buf_locked(
|
||||
void __user *end_page_addr;
|
||||
size_t size, data_offsets_size;
|
||||
int ret;
|
||||
#ifdef OPLUS_FEATURE_HANS_FREEZE
|
||||
//#Kun.Zhou@ANDROID.RESCONTROL, 2019/09/23, add for hans freeze manager
|
||||
struct task_struct *p = NULL;
|
||||
#endif /*OPLUS_FEATURE_HANS_FREEZE*/
|
||||
|
||||
if (!binder_alloc_get_vma(alloc)) {
|
||||
pr_err("%d: binder_alloc_buf, no vma\n",
|
||||
@@ -381,6 +389,19 @@ static struct binder_buffer *binder_alloc_new_buf_locked(
|
||||
alloc->pid, extra_buffers_size);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
#ifdef OPLUS_FEATURE_HANS_FREEZE
|
||||
//#Kun.Zhou@ANDROID.RESCONTROL, 2019/09/23, add for hans freeze manager
|
||||
if (is_async
|
||||
&& (alloc->free_async_space < 3 * (size + sizeof(struct binder_buffer))
|
||||
|| (alloc->free_async_space < ((alloc->buffer_size / 2) * 9 / 10)))) {
|
||||
rcu_read_lock();
|
||||
p = find_task_by_vpid(alloc->pid);
|
||||
rcu_read_unlock();
|
||||
if (p != NULL && is_frozen_tg(p)) {
|
||||
hans_report(ASYNC_BINDER, task_tgid_nr(current), task_uid(current).val, task_tgid_nr(p), task_uid(p).val, "free_buffer_full", -1);
|
||||
}
|
||||
}
|
||||
#endif /*OPLUS_FEATURE_HANS_FREEZE*/
|
||||
if (is_async &&
|
||||
alloc->free_async_space < size + sizeof(struct binder_buffer)) {
|
||||
binder_alloc_debug(BINDER_DEBUG_BUFFER_ALLOC,
|
||||
|
||||
@@ -196,6 +196,11 @@ static int __fw_state_check(struct fw_state *fw_st, enum fw_status status)
|
||||
#define FW_OPT_NO_WARN (1U << 3)
|
||||
#define FW_OPT_NOCACHE (1U << 4)
|
||||
|
||||
#ifdef VENDOR_EDIT
|
||||
//Tong.Han@Bsp.Group.Tp,2017-12-16,Add interface to get proper fw
|
||||
#define FW_OPT_COMPARE (1U << 5)
|
||||
#endif/*VENDOR_EDIT*/
|
||||
|
||||
struct firmware_cache {
|
||||
/* firmware_buf instance will be added into the below list */
|
||||
spinlock_t lock;
|
||||
@@ -396,8 +401,11 @@ static const char * const fw_path[] = {
|
||||
module_param_string(path, fw_path_para, sizeof(fw_path_para), 0644);
|
||||
MODULE_PARM_DESC(path, "customized firmware image search path with a higher priority than default path");
|
||||
|
||||
static int
|
||||
fw_get_filesystem_firmware(struct device *device, struct firmware_buf *buf)
|
||||
#ifdef VENDOR_EDIT
|
||||
//Wanghao@Bsp.Group.Tp,2018-02-13, Add to avoid direct pass encrypt tp firmware to driver
|
||||
static int fw_get_filesystem_firmware(struct device *device,
|
||||
struct firmware_buf *buf, unsigned int opt_flags)
|
||||
#endif
|
||||
{
|
||||
loff_t size;
|
||||
int i, len;
|
||||
@@ -406,6 +414,14 @@ fw_get_filesystem_firmware(struct device *device, struct firmware_buf *buf)
|
||||
enum kernel_read_file_id id = READING_FIRMWARE;
|
||||
size_t msize = INT_MAX;
|
||||
|
||||
#ifdef VENDOR_EDIT
|
||||
//Wanghao@Bsp.Group.Tp,2018-02-13, Add to avoid direct pass encrypt tp firmware to driver
|
||||
if(opt_flags & FW_OPT_COMPARE) {
|
||||
pr_err("%s opt_flags get FW_OPT_COMPARE!\n", __func__);
|
||||
return rc;
|
||||
}
|
||||
#endif/*VENDOR_EDIT*/
|
||||
|
||||
/* Already populated data member means we're loading into a buffer */
|
||||
if (buf->data) {
|
||||
id = READING_FIRMWARE_PREALLOC_BUFFER;
|
||||
@@ -1039,6 +1055,11 @@ static int _request_firmware_load(struct firmware_priv *fw_priv,
|
||||
struct device *f_dev = &fw_priv->dev;
|
||||
struct firmware_buf *buf = fw_priv->buf;
|
||||
|
||||
#ifdef VENDOR_EDIT
|
||||
//Tong.Han@Bsp.Group.Tp,2017-12-16,Add interface to get proper fw
|
||||
char *envp[2]={"FwUp=compare", NULL};
|
||||
#endif/*VENDOR_EDIT*/
|
||||
|
||||
/* fall back on userspace loading */
|
||||
if (!buf->data)
|
||||
buf->is_paged_buf = true;
|
||||
@@ -1059,7 +1080,16 @@ static int _request_firmware_load(struct firmware_priv *fw_priv,
|
||||
buf->need_uevent = true;
|
||||
dev_set_uevent_suppress(f_dev, false);
|
||||
dev_dbg(f_dev, "firmware: requesting %s\n", buf->fw_id);
|
||||
#ifdef VENDOR_EDIT
|
||||
//Tong.Han@Bsp.Group.Tp,2017-12-16,Add interface to get proper fw
|
||||
if (opt_flags & FW_OPT_COMPARE) {
|
||||
kobject_uevent_env(&fw_priv->dev.kobj, KOBJ_CHANGE,envp);
|
||||
} else {
|
||||
kobject_uevent(&fw_priv->dev.kobj, KOBJ_ADD);
|
||||
}
|
||||
#else
|
||||
kobject_uevent(&fw_priv->dev.kobj, KOBJ_ADD);
|
||||
#endif/*VENDOR_EDIT*/
|
||||
} else {
|
||||
timeout = MAX_JIFFY_OFFSET;
|
||||
}
|
||||
@@ -1233,7 +1263,10 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
|
||||
if (ret <= 0) /* error or already assigned */
|
||||
goto out;
|
||||
|
||||
ret = fw_get_filesystem_firmware(device, fw->priv);
|
||||
#ifdef VENDOR_EDIT
|
||||
//Wanghao@Bsp.Group.Tp,2018-02-13, Add to avoid direct pass encrypt tp firmware to driver
|
||||
ret = fw_get_filesystem_firmware(device, fw->priv, opt_flags);
|
||||
#endif
|
||||
if (ret) {
|
||||
if (!(opt_flags & FW_OPT_NO_WARN))
|
||||
dev_dbg(device,
|
||||
@@ -1293,6 +1326,23 @@ request_firmware(const struct firmware **firmware_p, const char *name,
|
||||
}
|
||||
EXPORT_SYMBOL(request_firmware);
|
||||
|
||||
#ifdef VENDOR_EDIT
|
||||
//Tong.Han@Bsp.Group.Tp,2017-12-16,Add interface to get proper fw
|
||||
int request_firmware_select(const struct firmware **firmware_p, const char *name,
|
||||
struct device *device)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Need to pin this module until return */
|
||||
__module_get(THIS_MODULE);
|
||||
ret = _request_firmware(firmware_p, name, device, NULL, 0,
|
||||
FW_OPT_UEVENT | FW_OPT_FALLBACK | FW_OPT_COMPARE);
|
||||
module_put(THIS_MODULE);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(request_firmware_select);
|
||||
#endif/*VENDOR_EDIT*/
|
||||
|
||||
/**
|
||||
* request_firmware_direct: - load firmware directly without usermode helper
|
||||
* @firmware_p: pointer to firmware image
|
||||
|
||||
@@ -26,7 +26,9 @@
|
||||
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
||||
#if defined(OPLUS_FEATURE_MULTI_FREEAREA) && defined(CONFIG_PHYSICAL_ANTI_FRAGMENTATION)
|
||||
#include <linux/mmzone.h>
|
||||
#endif
|
||||
static DEFINE_MUTEX(mem_sysfs_mutex);
|
||||
|
||||
#define MEMORY_CLASS_NAME "memory"
|
||||
@@ -451,12 +453,32 @@ static DEVICE_ATTR(valid_zones, 0444, show_valid_zones, NULL);
|
||||
#ifdef CONFIG_MEMORY_HOTPLUG
|
||||
static int count_num_free_block_pages(struct zone *zone, int bid)
|
||||
{
|
||||
#if defined(OPLUS_FEATURE_MULTI_FREEAREA) && defined(CONFIG_PHYSICAL_ANTI_FRAGMENTATION)
|
||||
int order, type, flc;
|
||||
#else
|
||||
int order, type;
|
||||
#endif
|
||||
unsigned long freecount = 0;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&zone->lock, flags);
|
||||
for (type = 0; type < MIGRATE_TYPES; type++) {
|
||||
#if defined(OPLUS_FEATURE_MULTI_FREEAREA) && defined(CONFIG_PHYSICAL_ANTI_FRAGMENTATION)
|
||||
for (flc = 0; flc < FREE_AREA_COUNTS; flc++) {
|
||||
struct free_area *area;
|
||||
struct page *page;
|
||||
for (order = 0; order < MAX_ORDER; ++order) {
|
||||
area = &(zone->free_area[flc][order]);
|
||||
list_for_each_entry(page, &area->free_list[type], lru) {
|
||||
unsigned long pfn = page_to_pfn(page);
|
||||
int section_nr = pfn_to_section_nr(pfn);
|
||||
|
||||
if (bid == base_memory_block_id(section_nr))
|
||||
freecount += (1 << order);
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
for (order = 0; order < MAX_ORDER; ++order) {
|
||||
struct free_area *area;
|
||||
struct page *page;
|
||||
@@ -471,6 +493,7 @@ static int count_num_free_block_pages(struct zone *zone, int bid)
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
}
|
||||
spin_unlock_irqrestore(&zone->lock, flags);
|
||||
|
||||
|
||||
@@ -133,9 +133,19 @@ void device_pm_add(struct device *dev)
|
||||
dev->bus ? dev->bus->name : "No Bus", dev_name(dev));
|
||||
device_pm_check_callbacks(dev);
|
||||
mutex_lock(&dpm_list_mtx);
|
||||
#ifndef OPLUS_FEATURE_POWERINFO_STANDBY_DEBUG
|
||||
//Nanwei.Deng@BSP.CHG.Basic 2018/05/03 modify for power debug
|
||||
if (dev->parent && dev->parent->power.is_prepared)
|
||||
dev_warn(dev, "parent %s should not be sleeping\n",
|
||||
dev_name(dev->parent));
|
||||
#else
|
||||
if (dev->parent && dev->parent->power.is_prepared) {
|
||||
dev_warn(dev, "parent %s should not be sleeping\n",
|
||||
dev_name(dev->parent));
|
||||
pr_info("debug Adding info for %s:%s\n",
|
||||
dev->bus ? dev->bus->name : "No Bus", dev_name(dev));
|
||||
}
|
||||
#endif /* VENDOR_EDIT */
|
||||
list_add_tail(&dev->power.entry, &dpm_list);
|
||||
dev->power.in_dpm_list = true;
|
||||
mutex_unlock(&dpm_list_mtx);
|
||||
|
||||
@@ -19,10 +19,25 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/wakeup_reason.h>
|
||||
#include <trace/events/power.h>
|
||||
#ifdef OPLUS_FEATURE_LOGKIT
|
||||
//Yanzhen.Feng@ANDROID.DEBUG.702252, 2016/06/21, Add for Sync App and Kernel time
|
||||
#include <linux/rtc.h>
|
||||
#include <soc/oplus/system/oplus_sync_time.h>
|
||||
#endif /* OPLUS_FEATURE_LOGKIT */
|
||||
#include <linux/irq.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/irqdesc.h>
|
||||
|
||||
#ifdef OPLUS_FEATURE_POWERINFO_STANDBY
|
||||
//Nanwei.Deng@BSP.Power.Basic, 2020/07/27, add for wakelock profiler
|
||||
#include "../../drivers/soc/oplus/owakelock/oplus_wakelock_profiler_qcom.h"
|
||||
#endif /* OPLUS_FEATURE_POWERINFO_STANDBY */
|
||||
|
||||
#ifdef OPLUS_FEATURE_POWERINFO_STANDBY
|
||||
//SunFaliang@BSP.Power.Basic, 2020/11/18, add for standby monitor
|
||||
#include <linux/proc_fs.h>
|
||||
#endif /* OPLUS_FEATURE_POWERINFO_STANDBY */
|
||||
|
||||
#include "power.h"
|
||||
|
||||
#ifndef CONFIG_SUSPEND
|
||||
@@ -585,6 +600,11 @@ static void wakeup_source_activate(struct wakeup_source *ws)
|
||||
"unregistered wakeup source\n"))
|
||||
return;
|
||||
|
||||
#ifdef OPLUS_FEATURE_POWERINFO_STANDBY
|
||||
//Nanwei.Deng@BSP.Power.Basic, 2020/07/27, add for wakelock profiler
|
||||
//wakeup_get_start_hold_time();
|
||||
wakeup_get_start_time();
|
||||
#endif /* OPLUS_FEATURE_POWERINFO_STANDBY */
|
||||
ws->active = true;
|
||||
ws->active_count++;
|
||||
ws->last_time = ktime_get();
|
||||
@@ -726,8 +746,13 @@ static void wakeup_source_deactivate(struct wakeup_source *ws)
|
||||
trace_wakeup_source_deactivate(ws->name, cec);
|
||||
|
||||
split_counters(&cnt, &inpr);
|
||||
if (!inpr && waitqueue_active(&wakeup_count_wait_queue))
|
||||
if (!inpr && waitqueue_active(&wakeup_count_wait_queue)){
|
||||
#ifdef OPLUS_FEATURE_POWERINFO_STANDBY
|
||||
//Nanwei.Deng@BSP.Power.Basic, 2020/07/27, add for wakelock profiler
|
||||
wakeup_get_end_hold_time();
|
||||
#endif /* OPLUS_FEATURE_POWERINFO_STANDBY */
|
||||
wake_up(&wakeup_count_wait_queue);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -874,8 +899,14 @@ void pm_get_active_wakeup_sources(char *pending_wakeup_source, size_t max)
|
||||
if (!active)
|
||||
len += scnprintf(pending_wakeup_source, max,
|
||||
"Pending Wakeup Sources: ");
|
||||
#ifndef OPLUS_FEATURE_POWERINFO_STANDBY_DEBUG
|
||||
//Nanwei.Deng@BSP.CHG.Basic 2018/05/03 modify for power debug
|
||||
len += scnprintf(pending_wakeup_source + len, max - len,
|
||||
"%s ", ws->name);
|
||||
#else
|
||||
len += scnprintf(pending_wakeup_source + len, max - len,
|
||||
"%s, %ld, %ld ", ws->name, ws->active_count, ktime_to_ms(ws->total_time));
|
||||
#endif
|
||||
active = true;
|
||||
} else if (!active &&
|
||||
(!last_active_ws ||
|
||||
@@ -885,11 +916,22 @@ void pm_get_active_wakeup_sources(char *pending_wakeup_source, size_t max)
|
||||
}
|
||||
}
|
||||
if (!active && last_active_ws) {
|
||||
#ifndef OPLUS_FEATURE_POWERINFO_STANDBY_DEBUG
|
||||
//Nanwei.Deng@BSP.CHG.Basic 2018/05/03 modify for power debug
|
||||
scnprintf(pending_wakeup_source, max,
|
||||
"Last active Wakeup Source: %s",
|
||||
last_active_ws->name);
|
||||
#else
|
||||
scnprintf(pending_wakeup_source, max,
|
||||
"Last active Wakeup Source: %s, %ld, %ld",
|
||||
last_active_ws->name, last_active_ws->active_count, ktime_to_ms(last_active_ws->total_time));
|
||||
#endif
|
||||
}
|
||||
srcu_read_unlock(&wakeup_srcu, srcuidx);
|
||||
#ifdef OPLUS_FEATURE_POWERINFO_STANDBY_DEBUG
|
||||
//Nanwei.Deng@BSP.CHG.Basic 2018/05/03 modify for power debug
|
||||
pr_info("%s, active: %d, pending: %s for debug\n", __func__, active, pending_wakeup_source);
|
||||
#endif
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pm_get_active_wakeup_sources);
|
||||
|
||||
@@ -902,7 +944,12 @@ void pm_print_active_wakeup_sources(void)
|
||||
srcuidx = srcu_read_lock(&wakeup_srcu);
|
||||
list_for_each_entry_rcu(ws, &wakeup_sources, entry) {
|
||||
if (ws->active) {
|
||||
#ifdef OPLUS_FEATURE_POWERINFO_STANDBY_DEBUG
|
||||
//Nanwei.Deng@BSP.Power.Basic, 2020/07/27, add for wakelock profiler
|
||||
pr_info("active wakeup source: %s, %ld, %ld\n", ws->name, ws->active_count, ktime_to_ms(ws->total_time));
|
||||
#else
|
||||
pr_debug("active wakeup source: %s\n", ws->name);
|
||||
#endif /* OPLUS_FEATURE_POWERINFO_STANDBY_DEBUG */
|
||||
active = 1;
|
||||
} else if (!active &&
|
||||
(!last_activity_ws ||
|
||||
@@ -912,13 +959,48 @@ void pm_print_active_wakeup_sources(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (!active && last_activity_ws)
|
||||
if (!active && last_activity_ws) {
|
||||
#ifdef OPLUS_FEATURE_POWERINFO_STANDBY_DEBUG
|
||||
//Nanwei.Deng@BSP.Power.Basic, 2020/07/27, add for wakelock profiler
|
||||
pr_info("last active wakeup source: %s, %ld, %ld\n",
|
||||
last_activity_ws->name, last_activity_ws->active_count, ktime_to_ms(last_activity_ws->total_time));
|
||||
#else
|
||||
pr_debug("last active wakeup source: %s\n",
|
||||
last_activity_ws->name);
|
||||
#endif /* OPLUS_FEATURE_POWERINFO_STANDBY_DEBUG */
|
||||
}
|
||||
srcu_read_unlock(&wakeup_srcu, srcuidx);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pm_print_active_wakeup_sources);
|
||||
|
||||
#ifdef OPLUS_FEATURE_POWERINFO_STANDBY
|
||||
//Nanwei.Deng@BSP.Power.Basic, 2020/07/27, add for wakelock profiler
|
||||
void get_ws_listhead(struct list_head **ws)
|
||||
{
|
||||
if (ws)
|
||||
*ws = &wakeup_sources;
|
||||
}
|
||||
|
||||
void wakeup_srcu_read_lock(int *srcuidx)
|
||||
{
|
||||
*srcuidx = srcu_read_lock(&wakeup_srcu);
|
||||
}
|
||||
|
||||
void wakeup_srcu_read_unlock(int srcuidx)
|
||||
{
|
||||
srcu_read_unlock(&wakeup_srcu, srcuidx);
|
||||
}
|
||||
|
||||
bool ws_all_release(void)
|
||||
{
|
||||
unsigned int cnt, inpr;
|
||||
|
||||
pr_info("Enter: %s\n", __func__);
|
||||
split_counters(&cnt, &inpr);
|
||||
return (!inpr) ? true : false;
|
||||
}
|
||||
#endif /* OPLUS_FEATURE_POWERINFO_STANDBY */
|
||||
|
||||
/**
|
||||
* pm_wakeup_pending - Check if power transition in progress should be aborted.
|
||||
*
|
||||
@@ -944,6 +1026,14 @@ bool pm_wakeup_pending(void)
|
||||
spin_unlock_irqrestore(&events_lock, flags);
|
||||
|
||||
if (ret) {
|
||||
#ifndef OPLUS_FEATURE_POWERINFO_STANDBY_DEBUG
|
||||
//Nanwei.Deng@BSP.Power.Basic, 2020/07/27, add for wakelock profiler
|
||||
pr_debug("PM: Wakeup pending, aborting suspend\n");
|
||||
#else
|
||||
pr_info("PM: Wakeup pending, aborting suspend\n");
|
||||
wakeup_reasons_statics(IRQ_NAME_ABORT, WS_CNT_ABORT);
|
||||
#endif /* OPLUS_FEATURE_POWERINFO_STANDBY_DEBUG */
|
||||
pm_print_active_wakeup_sources();
|
||||
pm_get_active_wakeup_sources(suspend_abort,
|
||||
MAX_SUSPEND_ABORT_LEN);
|
||||
log_suspend_abort_reason(suspend_abort);
|
||||
@@ -988,6 +1078,11 @@ void pm_system_irq_wakeup(unsigned int irq_number)
|
||||
pr_warn("%s: %d triggered %s\n", __func__,
|
||||
irq_number, name);
|
||||
|
||||
#ifdef OPLUS_FEATURE_POWERINFO_STANDBY
|
||||
//Nanwei.Deng@BSP.Power.Basic, 2020/07/27, add for wakelock profiler
|
||||
pr_info("%s: resume caused by irq=%d, name=%s\n", __func__, irq_number, name);
|
||||
wakeup_reasons_statics(name, WS_CNT_POWERKEY|WS_CNT_RTCALARM);
|
||||
#endif /* OPLUS_FEATURE_POWERINFO_STANDBY */
|
||||
}
|
||||
pm_wakeup_irq = irq_number;
|
||||
pm_system_wakeup();
|
||||
@@ -1169,12 +1264,27 @@ static const struct file_operations wakeup_sources_stats_fops = {
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
#ifdef OPLUS_FEATURE_LOGKIT
|
||||
//Yanzhen.Feng@ANDROID.DEBUG.702252, 2016/06/21, Add for Sync App and Kernel time
|
||||
.write = watchdog_write,
|
||||
#endif /* OPLUS_FEATURE_LOGKIT */
|
||||
};
|
||||
|
||||
static int __init wakeup_sources_debugfs_init(void)
|
||||
{
|
||||
#ifndef OPLUS_FEATURE_LOGKIT
|
||||
//Yanzhen.Feng@ANDROID.DEBUG.702252, 2016/06/21, Modify for Sync App and Kernel time
|
||||
wakeup_sources_stats_dentry = debugfs_create_file("wakeup_sources",
|
||||
S_IRUGO, NULL, NULL, &wakeup_sources_stats_fops);
|
||||
#else /* OPLUS_FEATURE_LOGKIT */
|
||||
wakeup_sources_stats_dentry = debugfs_create_file("wakeup_sources",
|
||||
S_IRUGO| S_IWUGO, NULL, NULL, &wakeup_sources_stats_fops);
|
||||
#endif /* OPLUS_FEATURE_LOGKIT */
|
||||
|
||||
#ifdef OPLUS_FEATURE_POWERINFO_STANDBY
|
||||
//SunFaliang@BSP.Power.Basic, 2020/11/18, add for standby monitor
|
||||
proc_create_data("wakeup_sources", 0444, NULL, &wakeup_sources_stats_fops, NULL);
|
||||
#endif /* OPLUS_FEATURE_POWERINFO_STANDBY */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -499,7 +499,12 @@ EXPORT_SYMBOL_GPL(regcache_drop_region);
|
||||
void regcache_cache_only(struct regmap *map, bool enable)
|
||||
{
|
||||
map->lock(map->lock_arg);
|
||||
#ifndef OPLUS_ARCH_EXTENDS
|
||||
/*Suresh.Alla@MULTIMEDIA.AUDIODRIVER.PLATFORM.1234162, 2020/08/14,
|
||||
*Delete for uart issue due to warning log.
|
||||
*/
|
||||
WARN_ON(map->cache_bypass && enable);
|
||||
#endif /* OPLUS_ARCH_EXTENDS */
|
||||
map->cache_only = enable;
|
||||
trace_regmap_cache_only(map, enable);
|
||||
map->unlock(map->lock_arg);
|
||||
|
||||
@@ -53,3 +53,12 @@ config ZRAM_MEMORY_TRACKING
|
||||
/sys/kernel/debug/zram/zramX/block_state.
|
||||
|
||||
See Documentation/blockdev/zram.txt for more information.
|
||||
|
||||
#ifdef OPLUS_FEATURE_ZRAM_OPT
|
||||
config OPLUS_ZRAM_OPT
|
||||
bool "zram optimization"
|
||||
depends on ZRAM
|
||||
default y
|
||||
help
|
||||
oplus zram optimization
|
||||
#endif /*OPLUS_FEATURE_ZRAM_OPT*/
|
||||
|
||||
@@ -2689,7 +2689,12 @@ EXPORT_SYMBOL_GPL(clk_set_flags);
|
||||
|
||||
static struct dentry *rootdir;
|
||||
static int inited = 0;
|
||||
#ifndef OPLUS_FEATURE_POWERINFO_STANDBY
|
||||
//Nanwei.Deng@BSP.CHG.Basic 2018/05/03 modify for power debug
|
||||
static u32 debug_suspend;
|
||||
#else
|
||||
static u32 debug_suspend = 1;
|
||||
#endif /* VENDOR_EDIT */
|
||||
static DEFINE_MUTEX(clk_debug_lock);
|
||||
static HLIST_HEAD(clk_debug_list);
|
||||
|
||||
|
||||
@@ -806,9 +806,16 @@ static int dsi_pll_read_stored_trim_codes(struct mdss_pll_resources *pll_res,
|
||||
codes_info->pll_codes.pll_codes_2,
|
||||
codes_info->pll_codes.pll_codes_3);
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Params,2019-11-17 fix mipi clk setting error */
|
||||
if ((vco_clk_rate / 1000) != (codes_info->clk_rate / 1000) &&
|
||||
codes_info->is_valid) {
|
||||
#else
|
||||
if (vco_clk_rate != codes_info->clk_rate &&
|
||||
codes_info->is_valid)
|
||||
codes_info->is_valid) {
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
continue;
|
||||
}
|
||||
|
||||
pll_res->cache_pll_trim_codes[0] =
|
||||
codes_info->pll_codes.pll_codes_1;
|
||||
|
||||
@@ -204,6 +204,14 @@ struct cpufreq_policy *cpufreq_cpu_get_raw(unsigned int cpu)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(cpufreq_cpu_get_raw);
|
||||
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
struct list_head *get_cpufreq_policy_list(void)
|
||||
{
|
||||
return &cpufreq_policy_list;
|
||||
}
|
||||
EXPORT_SYMBOL(get_cpufreq_policy_list);
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
|
||||
unsigned int cpufreq_generic_get(unsigned int cpu)
|
||||
{
|
||||
struct cpufreq_policy *policy = cpufreq_cpu_get_raw(cpu);
|
||||
@@ -909,6 +917,20 @@ static ssize_t show_bios_limit(struct cpufreq_policy *policy, char *buf)
|
||||
return sprintf(buf, "%u\n", policy->cpuinfo.max_freq);
|
||||
}
|
||||
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
//Jiheng.Xie@TECH.BSP.Performance,2019-07-29,add for cpufreq limit info
|
||||
#ifdef CONFIG_OPPO_HEALTHINFO
|
||||
static ssize_t show_freq_change_info(struct cpufreq_policy *policy, char *buf)
|
||||
{
|
||||
ssize_t i = 0;
|
||||
|
||||
i += sprintf(buf, "%u,%s\n", policy->org_max, policy->change_comm);
|
||||
|
||||
return i;
|
||||
}
|
||||
#endif
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
|
||||
cpufreq_freq_attr_ro_perm(cpuinfo_cur_freq, 0400);
|
||||
cpufreq_freq_attr_ro(cpuinfo_min_freq);
|
||||
cpufreq_freq_attr_ro(cpuinfo_max_freq);
|
||||
@@ -919,6 +941,12 @@ cpufreq_freq_attr_ro(scaling_cur_freq);
|
||||
cpufreq_freq_attr_ro(bios_limit);
|
||||
cpufreq_freq_attr_ro(related_cpus);
|
||||
cpufreq_freq_attr_ro(affected_cpus);
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
//Jiheng.Xie@TECH.BSP.Performance,2019-07-29,add for cpufreq limit info
|
||||
#ifdef CONFIG_OPPO_HEALTHINFO
|
||||
cpufreq_freq_attr_ro(freq_change_info);
|
||||
#endif
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
cpufreq_freq_attr_rw(scaling_min_freq);
|
||||
cpufreq_freq_attr_rw(scaling_max_freq);
|
||||
cpufreq_freq_attr_rw(scaling_governor);
|
||||
@@ -936,6 +964,12 @@ static struct attribute *default_attrs[] = {
|
||||
&scaling_driver.attr,
|
||||
&scaling_available_governors.attr,
|
||||
&scaling_setspeed.attr,
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
//Jiheng.Xie@TECH.BSP.Performance,2019-07-29,add for cpufreq limit info
|
||||
#ifdef CONFIG_OPPO_HEALTHINFO
|
||||
&freq_change_info.attr,
|
||||
#endif
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -2244,7 +2278,12 @@ static int cpufreq_set_policy(struct cpufreq_policy *policy,
|
||||
|
||||
pr_debug("setting new policy for CPU %u: %u - %u kHz\n",
|
||||
new_policy->cpu, new_policy->min, new_policy->max);
|
||||
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
//Jiheng.Xie@TECH.BSP.Performance,2019-07-29,add for cpufreq limit info
|
||||
#ifdef CONFIG_OPPO_HEALTHINFO
|
||||
policy->org_max = new_policy->max;
|
||||
#endif
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
memcpy(&new_policy->cpuinfo, &policy->cpuinfo, sizeof(policy->cpuinfo));
|
||||
|
||||
/*
|
||||
@@ -2282,6 +2321,13 @@ static int cpufreq_set_policy(struct cpufreq_policy *policy,
|
||||
policy->min = new_policy->min;
|
||||
policy->max = new_policy->max;
|
||||
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
//Jiheng.Xie@TECH.BSP.Performance,2019-07-29,add for cpufreq limit info
|
||||
#ifdef CONFIG_OPPO_HEALTHINFO
|
||||
strncpy(policy->change_comm, current->comm, TASK_COMM_LEN);
|
||||
#endif
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
|
||||
arch_set_max_freq_scale(policy->cpus, policy->max);
|
||||
|
||||
trace_cpu_frequency_limits(policy->max, policy->min, policy->cpu);
|
||||
|
||||
@@ -46,6 +46,16 @@
|
||||
#include <uapi/linux/dma-buf.h>
|
||||
#include <uapi/linux/magic.h>
|
||||
|
||||
#ifdef OPLUS_FEATURE_LOWMEM_DBG
|
||||
/* #Hailong.Liu@BSP.Kernel.MM, 2020/06/19, Add for dump memory */
|
||||
/* usage when lowmmem occurs. */
|
||||
#include <soc/oplus/lowmem_dbg.h>
|
||||
#endif /* OPLUS_FEATURE_LOWMEM_DBG */
|
||||
|
||||
#if defined(OPLUS_FEATURE_PERFORMANCE) && defined(CONFIG_PROC_FS)
|
||||
#include <linux/proc_fs.h>
|
||||
#endif
|
||||
|
||||
static atomic_long_t name_counter;
|
||||
|
||||
static inline int is_dma_buf_file(struct file *);
|
||||
@@ -78,7 +88,6 @@ static void dmabuf_dent_put(struct dma_buf *dmabuf)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static char *dmabuffs_dname(struct dentry *dentry, char *buffer, int buflen)
|
||||
{
|
||||
struct dma_buf *dmabuf;
|
||||
@@ -131,7 +140,6 @@ static void dma_buf_release(struct dentry *dentry)
|
||||
reservation_object_fini(dmabuf->resv);
|
||||
|
||||
module_put(dmabuf->owner);
|
||||
dmabuf_dent_put(dmabuf);
|
||||
}
|
||||
|
||||
static int dma_buf_file_release(struct inode *inode, struct file *file)
|
||||
@@ -499,6 +507,15 @@ static inline int is_dma_buf_file(struct file *file)
|
||||
return file->f_op == &dma_buf_fops;
|
||||
}
|
||||
|
||||
#ifdef OPLUS_FEATURE_LOWMEM_DBG
|
||||
/* #Hailong.Liu@BSP.Kernel.MM, 2020/06/19, Add for dump memory */
|
||||
/* usage when lowmmem occurs. */
|
||||
inline int oplus_is_dma_buf_file(struct file *file)
|
||||
{
|
||||
return is_dma_buf_file(file);
|
||||
}
|
||||
#endif /* OPLUS_FEATURE_LOWMEM_DBG */
|
||||
|
||||
static struct file *dma_buf_getfile(struct dma_buf *dmabuf, int flags)
|
||||
{
|
||||
static const struct qstr this = QSTR_INIT("dmabuf", 6);
|
||||
@@ -1360,7 +1377,7 @@ int dma_buf_get_flags(struct dma_buf *dmabuf, unsigned long *flags)
|
||||
}
|
||||
EXPORT_SYMBOL(dma_buf_get_flags);
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
#if defined(CONFIG_DEBUG_FS) || (defined(OPLUS_FEATURE_PERFORMANCE) && defined(CONFIG_PROC_FS))
|
||||
static int dma_buf_debug_show(struct seq_file *s, void *unused)
|
||||
{
|
||||
int ret;
|
||||
@@ -1601,6 +1618,7 @@ static const struct file_operations dma_procs_debug_fops = {
|
||||
.release = single_release
|
||||
};
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
static struct dentry *dma_buf_debugfs_dir;
|
||||
|
||||
static int dma_buf_init_debugfs(void)
|
||||
@@ -1642,6 +1660,64 @@ static void dma_buf_uninit_debugfs(void)
|
||||
if (dma_buf_debugfs_dir)
|
||||
debugfs_remove_recursive(dma_buf_debugfs_dir);
|
||||
}
|
||||
#else /* CONFIG_DEBUG_FS */
|
||||
static inline int dma_buf_init_debugfs(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline void dma_buf_uninit_debugfs(void)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_DEBUG_FS */
|
||||
|
||||
#if defined(OPLUS_FEATURE_PERFORMANCE) && defined(CONFIG_PROC_FS)
|
||||
static struct proc_dir_entry *dma_buf_procfs_root;
|
||||
|
||||
int dma_buf_init_procfs(void)
|
||||
{
|
||||
struct proc_dir_entry *p;
|
||||
int err = 0;
|
||||
|
||||
p = proc_mkdir("dma_buf", NULL);
|
||||
if (IS_ERR(p))
|
||||
return PTR_ERR(p);
|
||||
|
||||
dma_buf_procfs_root = p;
|
||||
|
||||
p = proc_create_data("bufinfo",
|
||||
S_IFREG | 0664,
|
||||
dma_buf_procfs_root,
|
||||
&dma_buf_debug_fops,
|
||||
NULL);
|
||||
if (IS_ERR(p)) {
|
||||
pr_debug("dma_buf: procfs: failed to create node bufinfo\n");
|
||||
proc_remove(dma_buf_procfs_root);
|
||||
dma_buf_procfs_root = NULL;
|
||||
err = PTR_ERR(dma_buf_procfs_root);
|
||||
return err;
|
||||
}
|
||||
|
||||
p = proc_create_data("dmaprocs",
|
||||
S_IFREG | 0664,
|
||||
dma_buf_procfs_root,
|
||||
&dma_procs_debug_fops,
|
||||
NULL);
|
||||
if (IS_ERR(p)) {
|
||||
pr_debug("dma_buf: procfs: failed to create node dmaprocs\n");
|
||||
proc_remove(dma_buf_procfs_root);
|
||||
dma_buf_procfs_root = NULL;
|
||||
err = PTR_ERR(dma_buf_procfs_root);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
void dma_buf_uninit_procfs(void)
|
||||
{
|
||||
proc_remove(dma_buf_procfs_root);
|
||||
}
|
||||
#endif /* defined(OPLUS_FEATURE_PERFORMANCE) && defined(CONFIG_PROC_FS) */
|
||||
|
||||
#else
|
||||
static inline int dma_buf_init_debugfs(void)
|
||||
{
|
||||
@@ -1661,6 +1737,9 @@ static int __init dma_buf_init(void)
|
||||
mutex_init(&db_list.lock);
|
||||
INIT_LIST_HEAD(&db_list.head);
|
||||
dma_buf_init_debugfs();
|
||||
#if defined(OPLUS_FEATURE_PERFORMANCE) && defined(CONFIG_PROC_FS)
|
||||
dma_buf_init_procfs();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
subsys_initcall(dma_buf_init);
|
||||
@@ -1669,5 +1748,8 @@ static void __exit dma_buf_deinit(void)
|
||||
{
|
||||
dma_buf_uninit_debugfs();
|
||||
kern_unmount(dma_buf_mnt);
|
||||
#if defined(OPLUS_FEATURE_PERFORMANCE) && defined(CONFIG_PROC_FS)
|
||||
dma_buf_uninit_procfs();
|
||||
#endif
|
||||
}
|
||||
__exitcall(dma_buf_deinit);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
config MSM_TZ_LOG
|
||||
tristate "MSM Trust Zone (TZ) Log Driver"
|
||||
depends on DEBUG_FS
|
||||
#ifdef OPLUS_FEATURE_SECURITY_COMMON
|
||||
#depends on DEBUG_FS
|
||||
#endif
|
||||
help
|
||||
This option enables a driver with a debugfs interface for messages
|
||||
produced by the Secure code (Trust zone). These messages provide
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
#include <soc/qcom/scm.h>
|
||||
#include <soc/qcom/qseecomi.h>
|
||||
|
||||
//#ifdef OPLUS_FEATURE_SECURITY_COMMON
|
||||
#include <linux/proc_fs.h>
|
||||
#define TZDBG_DIR_NAME "tzdbg"
|
||||
//#endif
|
||||
/* QSEE_LOG_BUF_SIZE = 32K */
|
||||
#define QSEE_LOG_BUF_SIZE 0x8000
|
||||
|
||||
@@ -808,7 +812,12 @@ static ssize_t tzdbgfs_read(struct file *file, char __user *buf,
|
||||
size_t count, loff_t *offp)
|
||||
{
|
||||
int len = 0;
|
||||
int *tz_id = file->private_data;
|
||||
//#ifdef OPLUS_FEATURE_SECURITY_COMMON
|
||||
struct seq_file *seq = file->private_data;
|
||||
int *tz_id = (int *)(seq->private);
|
||||
//else
|
||||
//int *tz_id = file->private_data;
|
||||
//#endif
|
||||
|
||||
if (*tz_id == TZDBG_BOOT || *tz_id == TZDBG_RESET ||
|
||||
*tz_id == TZDBG_INTERRUPT || *tz_id == TZDBG_GENERAL ||
|
||||
@@ -867,16 +876,29 @@ static ssize_t tzdbgfs_read(struct file *file, char __user *buf,
|
||||
tzdbg.stat[(*tz_id)].data, len);
|
||||
}
|
||||
|
||||
//#ifdef OPLUS_FEATURE_SECURITY_COMMON
|
||||
static int tzdbg_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, NULL, PDE_DATA(inode));
|
||||
}
|
||||
//#elseif
|
||||
/*
|
||||
static int tzdbgfs_open(struct inode *inode, struct file *pfile)
|
||||
{
|
||||
pfile->private_data = inode->i_private;
|
||||
return 0;
|
||||
}
|
||||
|
||||
*/
|
||||
//#endif
|
||||
const struct file_operations tzdbg_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.read = tzdbgfs_read,
|
||||
.open = tzdbgfs_open,
|
||||
//#ifdef OPLUS_FEATURE_SECURITY_COMMON
|
||||
.open = tzdbg_proc_open,
|
||||
.release = single_release,
|
||||
//else
|
||||
//.open = tzdbgfs_open,
|
||||
//#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -939,6 +961,61 @@ err:
|
||||
return;
|
||||
}
|
||||
|
||||
//#ifdef OPLUS_FEATURE_SECURITY_COMMON
|
||||
//change tzdbg node to proc.
|
||||
static int tzdbg_procfs_init(struct platform_device *pdev)
|
||||
{
|
||||
int rc = 0;
|
||||
int i;
|
||||
struct proc_dir_entry *dent_dir;
|
||||
struct proc_dir_entry *dent;
|
||||
|
||||
dent_dir = proc_mkdir(TZDBG_DIR_NAME, NULL);
|
||||
if (dent_dir == NULL) {
|
||||
dev_err(&pdev->dev, "tzdbg proc_mkdir failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
for (i = 0; i < TZDBG_STATS_MAX; i++) {
|
||||
tzdbg.debug_tz[i] = i;
|
||||
dent = proc_create_data(tzdbg.stat[i].name,
|
||||
0444, dent_dir,
|
||||
&tzdbg_fops, &tzdbg.debug_tz[i]);
|
||||
if (dent == NULL) {
|
||||
dev_err(&pdev->dev, "TZ proc_create_data failed\n");
|
||||
rc = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
tzdbg.disp_buf = kzalloc(max(debug_rw_buf_size,
|
||||
tzdbg.hyp_debug_rw_buf_size), GFP_KERNEL);
|
||||
if (tzdbg.disp_buf == NULL)
|
||||
goto err;
|
||||
platform_set_drvdata(pdev, dent_dir);
|
||||
return 0;
|
||||
err:
|
||||
if(dent_dir){
|
||||
remove_proc_entry(TZDBG_DIR_NAME, NULL);
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void tzdbg_procfs_exit(struct platform_device *pdev)
|
||||
{
|
||||
struct proc_dir_entry *dent_dir;
|
||||
|
||||
kzfree(tzdbg.disp_buf);
|
||||
dent_dir = platform_get_drvdata(pdev);
|
||||
if(dent_dir){
|
||||
remove_proc_entry(TZDBG_DIR_NAME, NULL);
|
||||
}
|
||||
if (g_qsee_log)
|
||||
dma_free_coherent(&pdev->dev, QSEE_LOG_BUF_SIZE,
|
||||
(void *)g_qsee_log, coh_pmem);
|
||||
}
|
||||
//else
|
||||
/*
|
||||
static int tzdbgfs_init(struct platform_device *pdev)
|
||||
{
|
||||
int rc = 0;
|
||||
@@ -986,7 +1063,8 @@ static void tzdbgfs_exit(struct platform_device *pdev)
|
||||
dma_free_coherent(&pdev->dev, QSEE_LOG_BUF_SIZE,
|
||||
(void *)g_qsee_log, coh_pmem);
|
||||
}
|
||||
|
||||
*/
|
||||
//#endif
|
||||
static int __update_hypdbg_base(struct platform_device *pdev,
|
||||
void __iomem *virt_iobase)
|
||||
{
|
||||
@@ -1138,7 +1216,11 @@ static int tz_log_probe(struct platform_device *pdev)
|
||||
|
||||
tzdbg.diag_buf = (struct tzdbg_t *)ptr;
|
||||
|
||||
if (tzdbgfs_init(pdev))
|
||||
//#ifdef OPLUS_FEATURE_SECURITY_COMMON
|
||||
if (tzdbg_procfs_init(pdev))
|
||||
//else
|
||||
//if (tzdbgfs_init(pdev))
|
||||
//#endif
|
||||
goto err;
|
||||
|
||||
tzdbg_register_qsee_log_buf(pdev);
|
||||
@@ -1156,7 +1238,11 @@ static int tz_log_remove(struct platform_device *pdev)
|
||||
kzfree(tzdbg.diag_buf);
|
||||
if (tzdbg.hyp_diag_buf)
|
||||
kzfree(tzdbg.hyp_diag_buf);
|
||||
tzdbgfs_exit(pdev);
|
||||
//#ifdef OPLUS_FEATURE_SECURITY_COMMON
|
||||
tzdbg_procfs_exit(pdev);
|
||||
//else
|
||||
//tzdbgfs_exit(pdev);
|
||||
//#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1055,7 +1055,11 @@ EXPORT_SYMBOL(mipi_dsi_dcs_set_tear_scanline);
|
||||
int mipi_dsi_dcs_set_display_brightness(struct mipi_dsi_device *dsi,
|
||||
u16 brightness)
|
||||
{
|
||||
u8 payload[2] = { brightness & 0xff, brightness >> 8 };
|
||||
//#ifdef OPLUS_BUG_STABILITY
|
||||
//Jiasong.Zhong@PSW.MM.Display.LCD.Stable, 2020/02/27, Add for fix 10bit Backlight
|
||||
//u8 payload[2] = { brightness & 0xff, brightness >> 8 };
|
||||
u8 payload[2] = { brightness >> 8, brightness & 0xff };
|
||||
//#endif /* OPLUS_BUG_STABILITY */
|
||||
ssize_t err;
|
||||
|
||||
err = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_DISPLAY_BRIGHTNESS,
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
ccflags-y := -Iinclude/drm -Idrivers/gpu/drm/msm -Idrivers/gpu/drm/msm/dsi-staging -Idrivers/gpu/drm/msm/dp
|
||||
ccflags-y += -Idrivers/gpu/drm/msm/display-manager
|
||||
ccflags-$(CONFIG_DRM_MSM_DSI) += -Idrivers/gpu/drm/msm/dsi
|
||||
ccflags-y += -Idrivers/gpu/drm/msm/oplus
|
||||
ccflags-$(CONFIG_DRM_MSM_DSI_PLL) += -Idrivers/gpu/drm/msm/dsi
|
||||
ccflags-y += -Idrivers/gpu/drm/msm/sde
|
||||
ccflags-y += -Idrivers/media/platform/msm/sde/rotator
|
||||
@@ -219,4 +220,21 @@ msm_drm-$(CONFIG_DRM_MSM) += \
|
||||
msm_fence.o \
|
||||
msm_debugfs.o
|
||||
|
||||
msm_drm-y += oplus/oppo_mm_kevent_fb.o \
|
||||
oplus/oppo_mm_kevent.o \
|
||||
oplus/oppo_dsi_support.o \
|
||||
oplus/oppo_display_private_api.o \
|
||||
oplus/oppo_dc_diming.o \
|
||||
oplus/oppo_onscreenfingerprint.o \
|
||||
oplus/oppo_aod.o \
|
||||
oplus/oppo_ffl.o \
|
||||
oplus/oppo_display_panel.o \
|
||||
oplus/oppo_display_panel_power.o \
|
||||
oplus/oppo_display_panel_seed.o \
|
||||
oplus/oppo_display_panel_common.o \
|
||||
oplus/oppo_display_panel_hbm.o
|
||||
|
||||
#xupengcheng@MULTIMEDIA.MM.Display.LCD.Stability,2020/09/18,add for 19696 LCD CABC feature
|
||||
msm_drm-y += oplus/oplus_display_panel_cabc.o
|
||||
|
||||
obj-$(CONFIG_DRM_MSM) += msm_drm.o
|
||||
|
||||
@@ -14,7 +14,12 @@
|
||||
|
||||
#define pr_fmt(fmt) "[drm-dp] %s: " fmt, __func__
|
||||
|
||||
#ifndef OPLUS_FEATURE_DP_MAX20328
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2018-11-05 support max20328 dp switch */
|
||||
#include <linux/soc/qcom/fsa4480-i2c.h>
|
||||
#else /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
#include <linux/soc/qcom/max20328.h>
|
||||
#endif /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
#include <linux/usb/usbpd.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
@@ -817,7 +822,12 @@ static int dp_aux_configure_aux_switch(struct dp_aux *dp_aux,
|
||||
{
|
||||
struct dp_aux_private *aux;
|
||||
int rc = 0;
|
||||
#ifndef OPLUS_FEATURE_DP_MAX20328
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2018-11-05 support max20328 dp switch */
|
||||
enum fsa_function event = FSA_USBC_DISPLAYPORT_DISCONNECTED;
|
||||
#else /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
enum max20328_function event = MAX20328_USBC_DISPLAYPORT_DISCONNECTED;
|
||||
#endif /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
|
||||
if (!dp_aux) {
|
||||
pr_err("invalid input\n");
|
||||
@@ -828,19 +838,34 @@ static int dp_aux_configure_aux_switch(struct dp_aux *dp_aux,
|
||||
aux = container_of(dp_aux, struct dp_aux_private, dp_aux);
|
||||
|
||||
if (!aux->aux_switch_node) {
|
||||
#ifndef OPLUS_FEATURE_DP_MAX20328
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2018-11-05 support max20328 dp switch */
|
||||
pr_debug("undefined fsa4480 handle\n");
|
||||
#else /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
pr_debug("undefined max20328 handle\n");
|
||||
#endif /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
rc = -EINVAL;
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (enable) {
|
||||
switch (orientation) {
|
||||
#ifndef OPLUS_FEATURE_DP_MAX20328
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2018-11-05 support max20328 dp switch */
|
||||
case ORIENTATION_CC1:
|
||||
event = FSA_USBC_ORIENTATION_CC1;
|
||||
break;
|
||||
case ORIENTATION_CC2:
|
||||
event = FSA_USBC_ORIENTATION_CC2;
|
||||
break;
|
||||
#else /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
case ORIENTATION_CC1:
|
||||
event = MAX20328_USBC_ORIENTATION_CC1;
|
||||
break;
|
||||
case ORIENTATION_CC2:
|
||||
event = MAX20328_USBC_ORIENTATION_CC2;
|
||||
break;
|
||||
#endif /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
default:
|
||||
pr_err("invalid orientation\n");
|
||||
rc = -EINVAL;
|
||||
@@ -851,9 +876,16 @@ static int dp_aux_configure_aux_switch(struct dp_aux *dp_aux,
|
||||
pr_debug("enable=%d, orientation=%d, event=%d\n",
|
||||
enable, orientation, event);
|
||||
|
||||
#ifndef OPLUS_FEATURE_DP_MAX20328
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2018-11-05 support max20328 dp switch */
|
||||
rc = fsa4480_switch_event(aux->aux_switch_node, event);
|
||||
if (rc)
|
||||
pr_err("failed to configure fsa4480 i2c device (%d)\n", rc);
|
||||
#else /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
rc = max20328_switch_event(event);
|
||||
if (rc)
|
||||
pr_err("failed to configure max20328 i2c device (%d)\n", rc);
|
||||
#endif /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
end:
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,12 @@
|
||||
#include <linux/component.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/extcon.h>
|
||||
#ifndef OPLUS_FEATURE_DP_MAX20328
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2018-11-05 support max20328 dp switch */
|
||||
#include <linux/soc/qcom/fsa4480-i2c.h>
|
||||
#else /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
#include <linux/soc/qcom/max20328.h>
|
||||
#endif /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
|
||||
#include "sde_connector.h"
|
||||
|
||||
@@ -104,7 +109,12 @@ struct dp_display_private {
|
||||
|
||||
struct workqueue_struct *wq;
|
||||
struct delayed_work hdcp_cb_work;
|
||||
#ifdef OPLUS_FEATURE_DP_MAX20328
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2019-04-14 fix dp connect timeout on bootup */
|
||||
struct delayed_work connect_work;
|
||||
#else /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
struct work_struct connect_work;
|
||||
#endif /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
struct work_struct attention_work;
|
||||
struct mutex session_lock;
|
||||
bool suspended;
|
||||
@@ -935,7 +945,12 @@ static int dp_display_usbpd_configure_cb(struct device *dev)
|
||||
|
||||
/* check for hpd high */
|
||||
if (dp->hpd->hpd_high)
|
||||
#ifdef OPLUS_FEATURE_DP_MAX20328
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2019-04-14 fix dp connect timeout on bootup */
|
||||
queue_delayed_work(dp->wq, &dp->connect_work, 0);
|
||||
#else /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
queue_work(dp->wq, &dp->connect_work);
|
||||
#endif /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
else
|
||||
dp->process_hpd_connect = true;
|
||||
mutex_unlock(&dp->session_lock);
|
||||
@@ -1032,7 +1047,12 @@ static void dp_display_disconnect_sync(struct dp_display_private *dp)
|
||||
dp->aux->abort(dp->aux, false);
|
||||
|
||||
/* wait for idle state */
|
||||
#ifdef OPLUS_FEATURE_DP_MAX20328
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2019-04-14 fix dp connect timeout on bootup */
|
||||
cancel_delayed_work(&dp->connect_work);
|
||||
#else /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
cancel_work(&dp->connect_work);
|
||||
#endif /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
cancel_work(&dp->attention_work);
|
||||
flush_workqueue(dp->wq);
|
||||
|
||||
@@ -1124,7 +1144,12 @@ static void dp_display_attention_work(struct work_struct *work)
|
||||
dp_display_handle_disconnect(dp);
|
||||
} else {
|
||||
if (!dp->mst.mst_active)
|
||||
#ifdef OPLUS_FEATURE_DP_MAX20328
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2019-04-14 fix dp connect timeout on bootup */
|
||||
queue_delayed_work(dp->wq, &dp->connect_work, 0);
|
||||
#else /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
queue_work(dp->wq, &dp->connect_work);
|
||||
#endif /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
}
|
||||
|
||||
goto mst_attention;
|
||||
@@ -1134,7 +1159,12 @@ static void dp_display_attention_work(struct work_struct *work)
|
||||
dp_display_handle_disconnect(dp);
|
||||
|
||||
dp->panel->video_test = true;
|
||||
#ifdef OPLUS_FEATURE_DP_MAX20328
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2019-04-14 fix dp connect timeout on bootup */
|
||||
queue_delayed_work(dp->wq, &dp->connect_work, 0);
|
||||
#else /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
queue_work(dp->wq, &dp->connect_work);
|
||||
#endif /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
|
||||
goto mst_attention;
|
||||
}
|
||||
@@ -1192,18 +1222,34 @@ static int dp_display_usbpd_attention_cb(struct device *dev)
|
||||
dp->debug->mst_hpd_sim)
|
||||
queue_work(dp->wq, &dp->attention_work);
|
||||
else if (dp->process_hpd_connect || !dp->is_connected)
|
||||
#ifdef OPLUS_FEATURE_DP_MAX20328
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2019-04-14 fix dp connect timeout on bootup */
|
||||
queue_delayed_work(dp->wq, &dp->connect_work, 0);
|
||||
#else /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
queue_work(dp->wq, &dp->connect_work);
|
||||
#endif /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
else
|
||||
pr_debug("ignored\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef OPLUS_FEATURE_DP_MAX20328
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2019-04-13 fix dp bootup timeout */
|
||||
extern int oppo_display_audio_ready;
|
||||
#endif /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
static void dp_display_connect_work(struct work_struct *work)
|
||||
{
|
||||
int rc = 0;
|
||||
#ifdef OPLUS_FEATURE_DP_MAX20328
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2019-04-14 fix dp connect timeout on bootup */
|
||||
struct delayed_work *dw = to_delayed_work(work);
|
||||
struct dp_display_private *dp = container_of(dw,
|
||||
struct dp_display_private, connect_work);
|
||||
#else /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
struct dp_display_private *dp = container_of(work,
|
||||
struct dp_display_private, connect_work);
|
||||
#endif /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
|
||||
if (atomic_read(&dp->aborted)) {
|
||||
pr_warn("HPD off requested\n");
|
||||
@@ -1215,6 +1261,16 @@ static void dp_display_connect_work(struct work_struct *work)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef OPLUS_FEATURE_DP_MAX20328
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2019-04-14 fix dp connect timeout on bootup */
|
||||
if (!oppo_display_audio_ready) {
|
||||
if (ktime_to_ms(ktime_get()) < 80000) {
|
||||
queue_delayed_work(dp->wq, &dp->connect_work, 5*HZ);
|
||||
pr_warn("Wait for display and audio service ready\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
rc = dp_display_process_hpd_high(dp);
|
||||
|
||||
if (!rc && dp->panel->video_test)
|
||||
@@ -2177,7 +2233,12 @@ static int dp_display_create_workqueue(struct dp_display_private *dp)
|
||||
}
|
||||
|
||||
INIT_DELAYED_WORK(&dp->hdcp_cb_work, dp_display_hdcp_cb_work);
|
||||
#ifdef OPLUS_FEATURE_DP_MAX20328
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2019-04-14 fix dp connect timeout on bootup */
|
||||
INIT_DELAYED_WORK(&dp->connect_work, dp_display_connect_work);
|
||||
#else /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
INIT_WORK(&dp->connect_work, dp_display_connect_work);
|
||||
#endif /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
INIT_WORK(&dp->attention_work, dp_display_attention_work);
|
||||
|
||||
return 0;
|
||||
@@ -2211,6 +2272,10 @@ static int dp_display_fsa4480_callback(struct notifier_block *self,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef OPLUS_FEATURE_DP_MAX20328
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2018-12-28 limit dp aux switch probe defer times*/
|
||||
static int dp_retry_times = 10;
|
||||
#endif /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
static int dp_display_init_aux_switch(struct dp_display_private *dp)
|
||||
{
|
||||
int rc = 0;
|
||||
@@ -2230,6 +2295,8 @@ static int dp_display_init_aux_switch(struct dp_display_private *dp)
|
||||
goto end;
|
||||
}
|
||||
|
||||
#ifndef OPLUS_FEATURE_DP_MAX20328
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2018-11-05 support max20328 dp switch */
|
||||
nb.notifier_call = dp_display_fsa4480_callback;
|
||||
nb.priority = 0;
|
||||
|
||||
@@ -2240,6 +2307,34 @@ static int dp_display_init_aux_switch(struct dp_display_private *dp)
|
||||
}
|
||||
|
||||
fsa4480_unreg_notifier(&nb, dp->aux_switch_node);
|
||||
#else /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
if (!of_device_is_compatible(dp->aux_switch_node, "max20328")) {
|
||||
pr_err("Unsupport aux switch device node %s\n", dp->aux_switch_node->full_name);
|
||||
dp->aux_switch_node = NULL;
|
||||
goto end;
|
||||
}
|
||||
if (!of_device_is_available(dp->aux_switch_node)) {
|
||||
pr_err("dp aux switch device not available\n");
|
||||
dp->aux_switch_node = NULL;
|
||||
goto end;
|
||||
}
|
||||
nb.notifier_call = dp_display_fsa4480_callback;
|
||||
nb.priority = 0;
|
||||
|
||||
rc = max20328_reg_notifier(&nb, dp->aux_switch_node);
|
||||
if (rc) {
|
||||
pr_err("failed to register notifier (%d)\n", rc);
|
||||
if (dp_retry_times > 0) {
|
||||
dp_retry_times--;
|
||||
} else {
|
||||
rc = 0;
|
||||
dp->aux_switch_node = NULL;
|
||||
}
|
||||
goto end;
|
||||
}
|
||||
max20328_unreg_notifier(&nb, dp->aux_switch_node);
|
||||
#endif /* OPLUS_FEATURE_DP_MAX20328 */
|
||||
|
||||
end:
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -81,6 +81,11 @@ static const struct of_device_id msm_dsi_of_match[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
// #ifdef OPLUS_BUG_STABILITY
|
||||
/* Shusheng.Bei@MULTIMEDIA.DISPLAY.LCD, 2020/11/10, modified for bring up NT36672C JDI panel */
|
||||
u32 g_scramble_switch_value = 0;
|
||||
// #endif /*OPLUS_BUG_STABILITY*/
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
static ssize_t debugfs_state_info_read(struct file *file,
|
||||
char __user *buff,
|
||||
@@ -1762,7 +1767,13 @@ static int dsi_ctrl_dts_parse(struct dsi_ctrl *dsi_ctrl,
|
||||
dsi_ctrl != NULL, of_node != NULL);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
// #ifdef OPLUS_BUG_STABILITY
|
||||
/* Shusheng.Bei@MULTIMEDIA.DISPLAY.LCD, 2020/11/10, modified for bring up NT36672C JDI panel */
|
||||
rc = of_property_read_u32(of_node, "oplus,scramble-switch", &g_scramble_switch_value);
|
||||
if (rc) {
|
||||
pr_debug("of_property_read_u32() failed\n");
|
||||
}
|
||||
// #endif /*OPLUS_BUG_STABILITY*/
|
||||
rc = of_property_read_u32(of_node, "cell-index", &index);
|
||||
if (rc) {
|
||||
pr_debug("cell index not set, default to 0\n");
|
||||
@@ -2401,7 +2412,12 @@ static void dsi_ctrl_handle_error_status(struct dsi_ctrl *dsi_ctrl,
|
||||
0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
#ifndef OPLUS_BUG_STABILITY
|
||||
/*Mark.Yao@PSW.MM.Display.Lcd.Stability, 2018-05-24,avoid printk too often*/
|
||||
pr_err("tx timeout error: 0x%lx\n", error);
|
||||
#else /* OPLUS_BUG_STABILITY */
|
||||
pr_err_ratelimited("tx timeout error: 0x%lx\n", error);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
}
|
||||
|
||||
/* DSI FIFO OVERFLOW error */
|
||||
|
||||
@@ -37,6 +37,11 @@ static const u8 cmd_mode_format_map[DSI_PIXEL_FORMAT_MAX] = {
|
||||
static const u8 video_mode_format_map[DSI_PIXEL_FORMAT_MAX] = {
|
||||
0x0, 0x1, 0x2, 0x3, 0x3, 0x3, 0x3 };
|
||||
|
||||
// #ifdef OPLUS_BUG_STABILITY
|
||||
/* Shusheng.Bei@MULTIMEDIA.DISPLAY.LCD, 2020/11/10, modified for bring up NT36672C JDI panel */
|
||||
extern u32 g_scramble_switch_value;
|
||||
// #endif /*OPLUS_BUG_STABILITY*/
|
||||
|
||||
/**
|
||||
* dsi_split_link_setup() - setup dsi split link configurations
|
||||
* @ctrl: Pointer to the controller host hardware.
|
||||
@@ -102,13 +107,17 @@ void dsi_ctrl_hw_cmn_host_setup(struct dsi_ctrl_hw *ctrl,
|
||||
dsi_setup_trigger_controls(ctrl, cfg);
|
||||
dsi_split_link_setup(ctrl, cfg);
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Liping-M@PSW.MM.Display.LCD,2020/6/03, Modify for LCD MIPI timming */
|
||||
DSI_W32(ctrl, DSI_TEST_PATTERN_GEN_VIDEO_ENABLE, 1);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
/* Setup T_CLK_PRE extend register */
|
||||
reg_value = DSI_R32(ctrl, DSI_TEST_PATTERN_GEN_VIDEO_ENABLE);
|
||||
if (cfg->t_clk_pre_extend)
|
||||
reg_value |= BIT(0);
|
||||
else
|
||||
reg_value &= ~BIT(0);
|
||||
DSI_W32(ctrl, DSI_TEST_PATTERN_GEN_VIDEO_ENABLE, reg_value);
|
||||
//reg_value = DSI_R32(ctrl, DSI_TEST_PATTERN_GEN_VIDEO_ENABLE);
|
||||
//if (cfg->t_clk_pre_extend)
|
||||
// reg_value |= BIT(0);
|
||||
//else
|
||||
// reg_value &= ~BIT(0);
|
||||
//DSI_W32(ctrl, DSI_TEST_PATTERN_GEN_VIDEO_ENABLE, reg_value);
|
||||
|
||||
/* Setup clocking timing controls */
|
||||
reg_value = ((cfg->t_clk_post & 0x3F) << 8);
|
||||
@@ -521,7 +530,12 @@ void dsi_ctrl_hw_cmn_video_engine_setup(struct dsi_ctrl_hw *ctrl,
|
||||
DSI_W32(ctrl, DSI_VIDEO_MODE_DATA_CTRL, reg);
|
||||
/* Disable Timing double buffering */
|
||||
DSI_W32(ctrl, DSI_DSI_TIMING_DB_MODE, 0x0);
|
||||
|
||||
// #ifdef OPLUS_BUG_STABILITY
|
||||
/* Shusheng.Bei@MULTIMEDIA.DISPLAY.LCD, 2020/11/06, modified for bring up NT36672C JDI panel */
|
||||
if (1 == g_scramble_switch_value) {
|
||||
DSI_W32(ctrl, DSI_SCRAMBLE_CTRL, 0x1);
|
||||
}
|
||||
// #endif /*OPLUS_BUG_STABILITY*/
|
||||
pr_debug("[DSI_%d] Video engine setup done\n", ctrl->index);
|
||||
}
|
||||
|
||||
|
||||
@@ -156,6 +156,8 @@
|
||||
#define DSI_CPHY_MODE_CTRL (0x02D8)
|
||||
#define DSI_LOGICAL_LANE_SWAP_CTRL (0x0310)
|
||||
#define DSI_SPLIT_LINK (0x0330)
|
||||
|
||||
|
||||
// #ifdef OPLUS_BUG_STABILITY
|
||||
/* Shusheng.Bei@MULTIMEDIA.DISPLAY.LCD, 2020/11/06, modified for bring up NT36672C JDI panel */
|
||||
#define DSI_SCRAMBLE_CTRL (0x0328)
|
||||
// #endif /*OPLUS_BUG_STABILITY*/
|
||||
#endif /* _DSI_CTRL_REG_H_ */
|
||||
|
||||
@@ -53,6 +53,18 @@
|
||||
#define display_for_each_ctrl(index, display) \
|
||||
for (index = 0; (index < (display)->ctrl_count) &&\
|
||||
(index < MAX_DSI_CTRLS_PER_DISPLAY); index++)
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@MM.Display.LCD.Stability,2020/10/08
|
||||
* debug logs
|
||||
*/
|
||||
#define DSI_WARN(fmt, ...) DRM_WARN("[msm-dsi-warn]: "fmt, ##__VA_ARGS__)
|
||||
#define DSI_ERR(fmt, ...) DRM_DEV_ERROR(NULL, "[msm-dsi-error]: " fmt, \
|
||||
##__VA_ARGS__)
|
||||
#define DSI_INFO(fmt, ...) DRM_DEV_INFO(NULL, "[msm-dsi-info]: "fmt, \
|
||||
##__VA_ARGS__)
|
||||
#define DSI_DEBUG(fmt, ...) DRM_DEV_DEBUG(NULL, "[msm-dsi-debug]: "fmt, \
|
||||
##__VA_ARGS__)
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
/**
|
||||
* enum dsi_pixel_format - DSI pixel formats
|
||||
* @DSI_PIXEL_FORMAT_RGB565:
|
||||
@@ -282,6 +294,23 @@ enum dsi_dyn_clk_feature_type {
|
||||
* @DSI_CMD_SET_POST_TIMING_SWITCH: Post timing switch
|
||||
* @DSI_CMD_SET_QSYNC_ON Enable qsync mode
|
||||
* @DSI_CMD_SET_QSYNC_OFF Disable qsync mode
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
* @ Gou shengjun@PSW.MM.Display.LCD.Stability,2018/12/14, add for lcd notes
|
||||
* @DSI_CMD_POST_ON_BACKLIGHT: Panel on cmd send for AOD and Fingerprint
|
||||
* @DSI_CMD_AOD_ON: Panel AOD on cmd
|
||||
* @DSI_CMD_AOD_OFF: Panel AOD off cmd
|
||||
* @DSI_CMD_HBM_ON: Panel Fingerprint high brightness 670nit on cmd
|
||||
* @DSI_CMD_HBM_OFF: Panel Fingerprint high brightness off cmd
|
||||
* @DSI_CMD_AOD_HBM_ON: Panel AOD and Fingerprint high brightness 670nit on cmd
|
||||
* @DSI_CMD_AOD_HBM_OFF: Panel AOD and Fingerprint high brightness off cmd
|
||||
* @DSI_CMD_SEED_DCI_P3: Panel seed level 3 cmd
|
||||
* @DSI_CMD_SEED_SRGB: Panel seed SRGB mode cmd
|
||||
* @DSI_CMD_SEED_OFF: Panel seed off cmd
|
||||
* @DSI_CMD_NORMAL_HBM_ON: Panel normal HBM 600nit on cmd
|
||||
* @DSI_CMD_CABC_OFF: Shutdown IC CABC cmd
|
||||
* @DSI_CMD_CABC_LOW_LEVEL: Load 11.5% CABC cmd
|
||||
* @DSI_CMD_CABC_HIGH_LEVEL, Load 25% CABC cmd
|
||||
#endif // OPLUS_BUG_STABILITY
|
||||
* @DSI_CMD_SET_MAX
|
||||
*/
|
||||
enum dsi_cmd_set_type {
|
||||
@@ -308,6 +337,52 @@ enum dsi_cmd_set_type {
|
||||
DSI_CMD_SET_POST_TIMING_SWITCH,
|
||||
DSI_CMD_SET_QSYNC_ON,
|
||||
DSI_CMD_SET_QSYNC_OFF,
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Gou shengjun@PSW.MM.Display.LCD.Stability,2018/07/03
|
||||
* optimize screen on
|
||||
*/
|
||||
DSI_CMD_POST_ON_BACKLIGHT,
|
||||
DSI_CMD_AOD_ON,
|
||||
DSI_CMD_AOD_OFF,
|
||||
DSI_CMD_HBM_ON,
|
||||
DSI_CMD_HBM_OFF,
|
||||
DSI_CMD_AOD_HBM_ON,
|
||||
DSI_CMD_AOD_HBM_OFF,
|
||||
/*mark.yao@PSW.MM.Display.LCD.Stability,2018/4/28,add for sRGB and DCI-P3*/
|
||||
DSI_CMD_SEED_MODE0,
|
||||
DSI_CMD_SEED_MODE1,
|
||||
DSI_CMD_SEED_MODE2,
|
||||
DSI_CMD_SEED_MODE3,
|
||||
DSI_CMD_SEED_MODE4,
|
||||
DSI_CMD_SEED_OFF,
|
||||
DSI_CMD_NORMAL_HBM_ON,
|
||||
DSI_CMD_AOD_HIGH_LIGHT_MODE,
|
||||
DSI_CMD_AOD_LOW_LIGHT_MODE,
|
||||
DSI_CMD_CABC_OFF,
|
||||
DSI_CMD_CABC_LOW_MODE,
|
||||
DSI_CMD_CABC_HIGH_MODE,
|
||||
DSI_CMD_DATA_DIMMING_ON,
|
||||
DSI_CMD_DATA_DIMMING_OFF,
|
||||
DSI_CMD_OSC_CLK_MODEO0,
|
||||
DSI_CMD_OSC_CLK_MODEO1,
|
||||
/*Song.Gao@PSW.MM.Display.LCD.Stability,2020/04/21,add for DC backlight V2 enter and exit sequence*/
|
||||
DSI_CMD_SEED_ENTER,
|
||||
DSI_CMD_SEED_EXIT,
|
||||
DSI_CMD_HBM_ENTER_SWITCH,
|
||||
DSI_CMD_HBM_EXIT_SWITCH,
|
||||
DSI_CMD_LEVELKEY_END,
|
||||
#ifdef OPLUS_FEATURE_AOD_RAMLESS
|
||||
/*Jiasong.Zhong@PSW.MM.Display.LCD.Stability,2019/11/18,add FAIL SAFE API for 19125 panel*/
|
||||
DSI_CMD_FAILSAFE_ON,
|
||||
DSI_CMD_FAILSAFE_OFF,
|
||||
#endif /* OPLUS_FEATURE_AOD_RAMLESS */
|
||||
#ifdef OPLUS_FEATURE_LCD_CABC
|
||||
/*xupengcheng@MULTIMEDIA.MM.Display.LCD.Stability,2020/09/18,add for 19696 LCD CABC feature*/
|
||||
DSI_CMD_CABC_UI,
|
||||
DSI_CMD_CABC_IMAGE,
|
||||
DSI_CMD_CABC_VIDEO,
|
||||
#endif /*OPLUS_FEATURE_LCD_CABC*/
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
DSI_CMD_SET_MAX
|
||||
};
|
||||
|
||||
@@ -616,6 +691,18 @@ struct dsi_display_mode_priv_info {
|
||||
struct msm_display_dsc_info dsc;
|
||||
bool dsc_enabled;
|
||||
struct msm_roi_caps roi_caps;
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Sachin Shukla@PSW.MM.Display.LCD.Stable,2019-11-17 add for fingerprint */
|
||||
int fod_th_brightness;
|
||||
int fod_on_vblank;
|
||||
int fod_off_vblank;
|
||||
int fod_on_delay;
|
||||
int fod_off_delay;
|
||||
int fod_on_vblank_above_th;
|
||||
int fod_off_vblank_above_th;
|
||||
int fod_on_delay_above_th;
|
||||
int fod_off_delay_above_th;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,6 +33,45 @@
|
||||
#include "dsi_parser.h"
|
||||
#include "dsi_phy.h"
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@PSW.MM.Display.Lcd.Stability, 2018-05-31
|
||||
* add for drm notifier for display connect
|
||||
*/
|
||||
#include "oppo_mm_kevent_fb.h"
|
||||
#include <linux/msm_drm_notify.h>
|
||||
#include <linux/notifier.h>
|
||||
#include "oppo_display_private_api.h"
|
||||
#include "oppo_ffl.h"
|
||||
#include <soc/oppo/boot_mode.h>
|
||||
extern int msm_drm_notifier_call_chain(unsigned long val, void *v);
|
||||
/* Don't panic if smmu fault*/
|
||||
extern int sde_kms_set_smmu_no_fatal_faults(struct drm_device *drm);
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
//Sachin@PSW.BSP.TP, 2020/02/27, Add for notify TP display fps change
|
||||
__attribute__((weak)) void sec_refresh_switch(int fps)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
#ifdef OPLUS_FEATURE_TP_BASIC
|
||||
//Qicai.gu@PSW.BSP.TP, 2020/08/21, Add for notify TP display fps change
|
||||
__attribute__((weak)) void lcd_tp_refresh_switch(int fps)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif /* OPLUS_FEATURE_TP_BASIC*/
|
||||
|
||||
/* Add for solve sau issue*/
|
||||
extern int lcd_closebl_flag;
|
||||
/* Add for fingerprint silence*/
|
||||
extern int lcd_closebl_flag_fp;
|
||||
/* Add for ffl feature */
|
||||
extern bool oppo_ffl_trigger_finish;
|
||||
/* Add for first osc clk setting*/
|
||||
extern int osc_count;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
#define to_dsi_display(x) container_of(x, struct dsi_display, host)
|
||||
#define INT_BASE_10 10
|
||||
#define NO_OVERRIDE -1
|
||||
@@ -45,6 +84,14 @@
|
||||
#define DSI_CLOCK_BITRATE_RADIX 10
|
||||
#define MAX_TE_SOURCE_ID 2
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@PSW.MM.Display.Lcd.Stability, 2018-05-31
|
||||
* add for drm notifier for display connect
|
||||
*/
|
||||
static struct dsi_display *primary_display;
|
||||
static struct dsi_display *secondary_display;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
DEFINE_MUTEX(dsi_display_clk_mutex);
|
||||
|
||||
static char dsi_display_primary[MAX_CMDLINE_PARAM_LEN];
|
||||
@@ -198,12 +245,46 @@ int dsi_display_set_backlight(struct drm_connector *connector,
|
||||
|
||||
panel = dsi_display->panel;
|
||||
|
||||
|
||||
mutex_lock(&panel->panel_lock);
|
||||
if (!dsi_panel_initialized(panel)) {
|
||||
rc = -EINVAL;
|
||||
goto error;
|
||||
}
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Gou shengjun@PSW.MM.Display.LCD.Stable,2018-06-27
|
||||
* Add key log for debug
|
||||
*/
|
||||
if ((bl_lvl == 0 && panel->bl_config.bl_level != 0) ||
|
||||
(bl_lvl != 0 && panel->bl_config.bl_level == 0))
|
||||
pr_err("backlight level changed %d -> %d\n",
|
||||
panel->bl_config.bl_level, bl_lvl);
|
||||
|
||||
/* Add some delay to avoid screen flash */
|
||||
if (panel->need_power_on_backlight && bl_lvl) {
|
||||
panel->need_power_on_backlight = false;
|
||||
rc = dsi_display_clk_ctrl(dsi_display->dsi_clk_handle,
|
||||
DSI_CORE_CLK, DSI_CLK_ON);
|
||||
if (rc) {
|
||||
pr_err("[%s] failed to send DSI_CMD_POST_ON_BACKLIGHT cmds, rc=%d\n",
|
||||
panel->name, rc);
|
||||
goto error;
|
||||
}
|
||||
|
||||
rc = dsi_panel_tx_cmd_set(panel, DSI_CMD_POST_ON_BACKLIGHT);
|
||||
|
||||
rc = dsi_display_clk_ctrl(dsi_display->dsi_clk_handle,
|
||||
DSI_CORE_CLK, DSI_CLK_OFF);
|
||||
if (rc) {
|
||||
pr_err("[%s] failed to send DSI_CMD_POST_ON_BACKLIGHT cmds, rc=%d\n",
|
||||
panel->name, rc);
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Gou shengjun@PSW.MM.Display.LCD.Stable,2018-10-25 fix ffl dsi abnormal on esd scene */
|
||||
//oppo_start_ffl_thread();
|
||||
}
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
panel->bl_config.bl_level = bl_lvl;
|
||||
|
||||
/* scale backlight */
|
||||
@@ -223,6 +304,17 @@ int dsi_display_set_backlight(struct drm_connector *connector,
|
||||
dsi_display->name, rc);
|
||||
goto error;
|
||||
}
|
||||
#ifdef OPLUS_FEATURE_SAU
|
||||
/* Gou shengjun@PSW.MM.Display.LCD.Stability,2018/4/28
|
||||
* Add for silence/sau reboot
|
||||
*/
|
||||
if(lcd_closebl_flag) {
|
||||
pr_err("silence reboot we should set backlight to zero\n");
|
||||
bl_temp = 0;
|
||||
} else if (bl_lvl) {
|
||||
lcd_closebl_flag_fp = 0;
|
||||
}
|
||||
#endif /* OPLUS_FEATURE_SAU */
|
||||
|
||||
rc = dsi_panel_set_backlight(panel, (u32)bl_temp);
|
||||
if (rc)
|
||||
@@ -241,7 +333,14 @@ error:
|
||||
return rc;
|
||||
}
|
||||
|
||||
#ifndef OPLUS_BUG_STABILITY
|
||||
static int dsi_display_cmd_engine_enable(struct dsi_display *display)
|
||||
/* Sachin Shukla@PSW.MM.Display.LCD.Stability,2018/4/28
|
||||
* Add for public function
|
||||
*/
|
||||
#else
|
||||
int dsi_display_cmd_engine_enable(struct dsi_display *display)
|
||||
#endif /*OPLUS_BUG_STABILITY*/
|
||||
{
|
||||
int rc = 0;
|
||||
int i;
|
||||
@@ -285,7 +384,14 @@ done:
|
||||
return rc;
|
||||
}
|
||||
|
||||
#ifndef OPLUS_BUG_STABILITY
|
||||
static int dsi_display_cmd_engine_disable(struct dsi_display *display)
|
||||
#else
|
||||
/* Sachin Shukla@PSW.MM.Display.LCD.Stability,2018/4/28
|
||||
* Add for public function
|
||||
*/
|
||||
int dsi_display_cmd_engine_disable(struct dsi_display *display)
|
||||
#endif /*OPLUS_BUG_STABILITY*/
|
||||
{
|
||||
int rc = 0;
|
||||
int i;
|
||||
@@ -471,7 +577,11 @@ error:
|
||||
}
|
||||
|
||||
/* Allocate memory for cmd dma tx buffer */
|
||||
#ifndef OPLUS_BUG_STABILITY
|
||||
static int dsi_host_alloc_cmd_tx_buffer(struct dsi_display *display)
|
||||
#else
|
||||
int dsi_host_alloc_cmd_tx_buffer(struct dsi_display *display)
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
{
|
||||
int rc = 0, cnt = 0;
|
||||
struct dsi_display_ctrl *display_ctrl;
|
||||
@@ -578,6 +688,21 @@ static bool dsi_display_validate_reg_read(struct dsi_panel *panel)
|
||||
group += len;
|
||||
}
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin@PSW.MM.Display.Lcd.Stability, 2018-12-04, add for solve esd fail */
|
||||
{
|
||||
unsigned char payload[150] = "";
|
||||
int cnt = 0;
|
||||
|
||||
cnt += scnprintf(payload, sizeof(payload), "NULL$$EventID@@%d$$ESD Error is@@",OPPO_MM_DIRVER_FB_EVENT_ID_ESD);
|
||||
for (i = 0; i < len; ++i) {
|
||||
cnt += scnprintf(payload + cnt, sizeof(payload) - cnt, "[%02x] ", config->return_buf[i]);
|
||||
}
|
||||
DRM_ERROR("ESD check failed: %s\n", payload);
|
||||
upload_mm_kevent_fb_data(OPPO_MM_DIRVER_FB_EVENT_MODULE_DISPLAY,payload);
|
||||
}
|
||||
#endif /*OPLUS_BUG_STABILITY*/
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -4026,6 +4151,11 @@ static void _dsi_display_calc_pipe_delay(struct dsi_display *display,
|
||||
struct dsi_phy_cfg *cfg;
|
||||
int phy_ver;
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Yuwei.Zhang@MULTIMEDIA.DISPLAY.LCD, 2021/01/05, fix flicker when mipi clock is switched at low brightness */
|
||||
u32 cust_pll_delay = display->panel->oppo_priv.pll_delay;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
m_ctrl = &display->ctrl[display->clk_master_idx];
|
||||
dsi_ctrl = m_ctrl->ctrl;
|
||||
|
||||
@@ -4068,11 +4198,21 @@ static void _dsi_display_calc_pipe_delay(struct dsi_display *display,
|
||||
*/
|
||||
phy_ver = dsi_phy_get_version(m_ctrl->phy);
|
||||
if (phy_ver <= DSI_PHY_VERSION_3_0)
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Yuwei.Zhang@MULTIMEDIA.DISPLAY.LCD, 2021/01/05, fix flicker when mipi clock is switched at low brightness */
|
||||
delay->pll_delay = cust_pll_delay ? cust_pll_delay : 100;
|
||||
#else
|
||||
delay->pll_delay = 100;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
else
|
||||
delay->pll_delay = 25;
|
||||
|
||||
delay->pll_delay = (delay->pll_delay * esc_clk_rate_hz) / 1000000;
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Yuwei.Zhang@MULTIMEDIA.DISPLAY.LCD, 2021/01/05, fix flicker when mipi clock is switched at low brightness */
|
||||
pr_debug("cust_pll_delay = %d, pll_delay = %d\n", cust_pll_delay, delay->pll_delay);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
}
|
||||
|
||||
static int _dsi_display_dyn_update_clks(struct dsi_display *display,
|
||||
@@ -4652,6 +4792,14 @@ static int dsi_display_set_mode_sub(struct dsi_display *display,
|
||||
pr_err("failed to add DSI PHY timing params");
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* LiPing-M@PSW.MM.Display.LCD.Stability,2020-05-08 Add for panel osc clk setting */
|
||||
if (mode->dsi_mode_flags & DSI_MODE_FLAG_DYN_CLK) {
|
||||
if(MSM_BOOT_MODE__NORMAL == get_boot_mode() && (osc_count != 0))
|
||||
oppo_display_dynamic_clk_update_osc_clk(clk_rate);
|
||||
}
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
error:
|
||||
return rc;
|
||||
}
|
||||
@@ -5098,6 +5246,24 @@ static int dsi_display_bind(struct device *dev,
|
||||
if (!display->disp_node)
|
||||
return 0;
|
||||
|
||||
#ifdef OPLUS_FEATURE_SAU
|
||||
/* Gou shengjun@PSW.MM.Display.LCD.Stability,2018/06/05
|
||||
* Add for save select panel and give different feature SAU
|
||||
*/
|
||||
if(0 != oppo_set_display_vendor(display)) {
|
||||
pr_err("maybe send a null point to oppo display manager 1\n");
|
||||
if(0 != set_oppo_display_vendor(display->name)) {
|
||||
pr_err("maybe send a null point to oppo display manager 2\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* Add for SAU feature request */
|
||||
if(is_silence_reboot()) {
|
||||
lcd_closebl_flag = 1;
|
||||
lcd_closebl_flag_fp = 1;
|
||||
}
|
||||
#endif /* OPLUS_FEATURE_SAU */
|
||||
|
||||
/* defer bind if ext bridge driver is not loaded */
|
||||
for (i = 0; i < display->panel->host_config.ext_bridge_num; i++) {
|
||||
j = display->panel->host_config.ext_bridge_map[i];
|
||||
@@ -5376,7 +5542,11 @@ static struct platform_driver dsi_display_driver = {
|
||||
static int dsi_display_init(struct dsi_display *display)
|
||||
{
|
||||
int rc = 0;
|
||||
struct platform_device *pdev = display->pdev;
|
||||
struct platform_device *pdev = display->pdev;
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin@PSW.MM.Display.LCD.Machine, 2019/02/11,add for mm kevent fb. */
|
||||
unsigned char payload[150] = "";
|
||||
#endif /*OPLUS_BUG_STABILITY*/
|
||||
|
||||
mutex_init(&display->display_lock);
|
||||
|
||||
@@ -5387,8 +5557,18 @@ static int dsi_display_init(struct dsi_display *display)
|
||||
}
|
||||
|
||||
rc = component_add(&pdev->dev, &dsi_display_comp_ops);
|
||||
|
||||
#ifndef OPLUS_BUG_STABILITY
|
||||
/* Gou shengjun@PSW.MM.Display.LCD.Machine, 2019/02/11,add for mm kevent fb. */
|
||||
if (rc)
|
||||
pr_err("component add failed, rc=%d\n", rc);
|
||||
#else
|
||||
if (rc) {
|
||||
pr_err("component add failed, rc=%d\n", rc);
|
||||
scnprintf(payload, sizeof(payload), "NULL$$EventID@@%d$$component add error panel match fault rc=%d",OPPO_MM_DIRVER_FB_EVENT_ID_PANEL_MATCH_FAULT,rc);
|
||||
upload_mm_kevent_fb_data(OPPO_MM_DIRVER_FB_EVENT_MODULE_DISPLAY,payload);
|
||||
}
|
||||
#endif /*OPLUS_BUG_STABILITY*/
|
||||
|
||||
pr_debug("component add success: %s\n", display->name);
|
||||
end:
|
||||
@@ -5493,6 +5673,16 @@ int dsi_display_dev_probe(struct platform_device *pdev)
|
||||
|
||||
platform_set_drvdata(pdev, display);
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@PSW.MM.Display.Lcd.Stability, 2020-08-05
|
||||
* add for drm notifier for display connect
|
||||
*/
|
||||
if (!strcmp(dsi_type, "primary"))
|
||||
primary_display = display;
|
||||
else
|
||||
secondary_display = display;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
rc = dsi_display_init(display);
|
||||
if (rc)
|
||||
goto end;
|
||||
@@ -6391,16 +6581,9 @@ int dsi_display_get_modes(struct dsi_display *display,
|
||||
}
|
||||
end = array_idx;
|
||||
/*
|
||||
* if POMS is enabled and boot up mode is video mode,
|
||||
* skip bit clk rates update for command mode,
|
||||
* else if dynamic clk switch is supported then update all
|
||||
* the bit clk rates.
|
||||
* if dynamic clk switch is supported then update all the bit
|
||||
* clk rates.
|
||||
*/
|
||||
|
||||
if (is_cmd_mode &&
|
||||
(display->panel->panel_mode == DSI_OP_VIDEO_MODE))
|
||||
continue;
|
||||
|
||||
_dsi_display_populate_bit_clks(display, start, end, &array_idx);
|
||||
}
|
||||
|
||||
@@ -6568,6 +6751,12 @@ int dsi_display_validate_mode_change(struct dsi_display *display,
|
||||
/* dfps and dynamic clock with const fps use case */
|
||||
if (dsi_display_mode_switch_dfps(cur_mode, adj_mode)) {
|
||||
dsi_panel_get_dfps_caps(display->panel, &dfps_caps);
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*liping-m@PSW.MM.Display.LCD,2019/6/20,for 90FPS LCD */
|
||||
if (cur_mode->timing.refresh_rate != adj_mode->timing.refresh_rate) {
|
||||
pr_err("dsi_cmd set fps: %d\n", adj_mode->timing.refresh_rate);
|
||||
}
|
||||
#endif /*OPLUS_BUG_STABILITY*/
|
||||
if (dfps_caps.dfps_support ||
|
||||
dyn_clk_caps->maintain_const_fps) {
|
||||
pr_debug("mode switch is variable refresh\n");
|
||||
@@ -6710,6 +6899,16 @@ int dsi_display_set_mode(struct dsi_display *display,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
//yulujiang@PSW.BSP.TP, 2019/09/29, Add for notify TP display fps change
|
||||
sec_refresh_switch(adj_mode.timing.refresh_rate);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
#ifdef OPLUS_FEATURE_TP_BASIC
|
||||
//Qicai.gu@PSW.BSP.TP, 2020/08/21, Add for notify TP display fps change
|
||||
lcd_tp_refresh_switch(adj_mode.timing.refresh_rate);
|
||||
#endif /* OPLUS_FEATURE_TP_BASIC*/
|
||||
|
||||
memcpy(display->panel->cur_mode, &adj_mode, sizeof(adj_mode));
|
||||
error:
|
||||
mutex_unlock(&display->display_lock);
|
||||
@@ -7523,6 +7722,12 @@ int dsi_display_enable(struct dsi_display *display)
|
||||
}
|
||||
|
||||
display->panel->panel_initialized = true;
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Gou shengjun@PSW.MM.Display.LCD.Stability,2018/4/28
|
||||
* when continous splash enabled, we should set power mode to OPPO_DISPLAY_POWER_ON here
|
||||
*/
|
||||
set_oppo_display_power_status(OPPO_DISPLAY_POWER_ON);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
pr_debug("cont splash enabled, display enable not required\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -7599,6 +7804,11 @@ error:
|
||||
return rc;
|
||||
}
|
||||
|
||||
#ifdef OPLUS_FEATURE_AOD_RAMLESS
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2020-01-08 fix aod ramless fingerprint */
|
||||
extern ktime_t oppo_onscreenfp_pressed_time;
|
||||
extern u32 oppo_onscreenfp_vblank_count;
|
||||
#endif /* OPLUS_FEATURE_AOD_RAMLESS */
|
||||
int dsi_display_post_enable(struct dsi_display *display)
|
||||
{
|
||||
int rc = 0;
|
||||
@@ -7614,8 +7824,21 @@ int dsi_display_post_enable(struct dsi_display *display)
|
||||
if (display->config.panel_mode == DSI_OP_CMD_MODE)
|
||||
dsi_panel_mode_switch_to_cmd(display->panel);
|
||||
|
||||
#ifdef OPLUS_FEATURE_AOD_RAMLESS
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2020-01-08 fix aod ramless fingerprint */
|
||||
if (display->config.panel_mode == DSI_OP_VIDEO_MODE) {
|
||||
if (display->panel->oppo_priv.is_aod_ramless &&
|
||||
display->drm_conn && display->drm_conn->state &&
|
||||
display->drm_conn->state->crtc) {
|
||||
oppo_onscreenfp_vblank_count = drm_crtc_vblank_count(display->drm_conn->state->crtc);
|
||||
oppo_onscreenfp_pressed_time = ktime_get();
|
||||
}
|
||||
dsi_panel_mode_switch_to_vid(display->panel);
|
||||
}
|
||||
#else
|
||||
if (display->config.panel_mode == DSI_OP_VIDEO_MODE)
|
||||
dsi_panel_mode_switch_to_vid(display->panel);
|
||||
#endif /* OPLUS_FEATURE_AOD_RAMLESS */
|
||||
} else {
|
||||
rc = dsi_panel_post_enable(display->panel);
|
||||
if (rc)
|
||||
@@ -7643,6 +7866,14 @@ int dsi_display_pre_disable(struct dsi_display *display)
|
||||
|
||||
mutex_lock(&display->display_lock);
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2019-05-08 fix race on backlight and power change */
|
||||
display->panel->need_power_on_backlight = false;
|
||||
/* Gou shengjun@PSW.MM.Display.LCD.Stable,2018-10-25
|
||||
* fix ffl dsi abnormal on esd scene
|
||||
*/
|
||||
//oppo_stop_ffl_thread();
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
/* enable the clk vote for CMD mode panels */
|
||||
if (display->config.panel_mode == DSI_OP_CMD_MODE)
|
||||
dsi_display_clk_ctrl(display->dsi_clk_handle,
|
||||
@@ -7668,6 +7899,13 @@ int dsi_display_pre_disable(struct dsi_display *display)
|
||||
int dsi_display_disable(struct dsi_display *display)
|
||||
{
|
||||
int rc = 0;
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Gou shengjun@PSW.MM.Display.LCD.Stability,2018/4/13
|
||||
* Add a notify for when disable display
|
||||
*/
|
||||
int blank;
|
||||
struct msm_drm_notifier notifier_data;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
if (!display) {
|
||||
pr_err("Invalid params\n");
|
||||
@@ -7675,6 +7913,7 @@ int dsi_display_disable(struct dsi_display *display)
|
||||
}
|
||||
|
||||
SDE_EVT32(SDE_EVTLOG_FUNC_ENTRY);
|
||||
|
||||
mutex_lock(&display->display_lock);
|
||||
|
||||
rc = dsi_display_wake_up(display);
|
||||
@@ -7698,14 +7937,35 @@ int dsi_display_disable(struct dsi_display *display)
|
||||
}
|
||||
|
||||
if (!display->poms_pending) {
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Gou shengjun@PSW.MM.Display.LCD.Stability,2018/4/13
|
||||
* Add a notify for when disable display
|
||||
*/
|
||||
blank = MSM_DRM_BLANK_POWERDOWN;
|
||||
notifier_data.data = ␣
|
||||
notifier_data.id = 0;
|
||||
msm_drm_notifier_call_chain(MSM_DRM_EARLY_EVENT_BLANK,
|
||||
¬ifier_data);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
rc = dsi_panel_disable(display->panel);
|
||||
if (rc)
|
||||
pr_err("[%s] failed to disable DSI panel, rc=%d\n",
|
||||
display->name, rc);
|
||||
|
||||
#ifdef OPLUS_FEATURE_SAU
|
||||
/* Gou shengjun@PSW.MM.Display.LCD.Stability,2018/4/13
|
||||
* Add a notify for when disable display
|
||||
*/
|
||||
set_oppo_display_scene(OPPO_DISPLAY_NORMAL_SCENE);
|
||||
msm_drm_notifier_call_chain(MSM_DRM_EVENT_BLANK,
|
||||
¬ifier_data);
|
||||
#endif /* OPLUS_FEATURE_SAU */
|
||||
}
|
||||
|
||||
mutex_unlock(&display->display_lock);
|
||||
SDE_EVT32(SDE_EVTLOG_FUNC_EXIT);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -7800,6 +8060,16 @@ int dsi_display_unprepare(struct dsi_display *display)
|
||||
return rc;
|
||||
}
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Gou shengjun@PSW.MM.Display.LCD.Stability,2018/4/28
|
||||
* Add for support aod,hbm,seed
|
||||
*/
|
||||
struct dsi_display *get_main_display(void) {
|
||||
return primary_display;
|
||||
}
|
||||
EXPORT_SYMBOL(get_main_display);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
static int __init dsi_display_register(void)
|
||||
{
|
||||
dsi_phy_drv_register();
|
||||
|
||||
@@ -702,6 +702,17 @@ enum dsi_pixel_format dsi_display_get_dst_format(
|
||||
* Return: Zero on Success
|
||||
*/
|
||||
int dsi_display_cont_splash_config(void *display);
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@PSW.MM.Display.LCD.Stability,2018/10/21
|
||||
* Add for support aod,hbm,seed
|
||||
*/
|
||||
struct dsi_display *get_main_display(void);
|
||||
|
||||
/* Add for implement panel register read */
|
||||
int dsi_host_alloc_cmd_tx_buffer(struct dsi_display *display);
|
||||
int dsi_display_cmd_engine_enable(struct dsi_display *display);
|
||||
int dsi_display_cmd_engine_disable(struct dsi_display *display);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
/*
|
||||
* dsi_display_get_panel_vfp - get panel vsync
|
||||
* @display: Pointer to private display structure
|
||||
|
||||
@@ -412,6 +412,10 @@ static bool dsi_bridge_mode_fixup(struct drm_bridge *bridge,
|
||||
if (rc) {
|
||||
pr_err("[%s] seamless mode mismatch failure rc=%d\n",
|
||||
c_bridge->display->name, rc);
|
||||
/*
|
||||
*Chao.Zhang@MULTIMEDIA.DISPLAY.LCD, 2020/09/25, add for 19081 LCD
|
||||
*note: orignal change was abandoned here due to compatibility
|
||||
*/
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -441,6 +445,25 @@ static bool dsi_bridge_mode_fixup(struct drm_bridge *bridge,
|
||||
display->is_cont_splash_enabled))
|
||||
dsi_mode.dsi_mode_flags |= DSI_MODE_FLAG_DMS;
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2019-12-09 skip dms switch if cont_splash not ready */
|
||||
if (display->is_cont_splash_enabled)
|
||||
dsi_mode.dsi_mode_flags &= ~DSI_MODE_FLAG_DMS;
|
||||
|
||||
#ifdef OPLUS_FEATURE_AOD_RAMLESS
|
||||
// Yuwei.Zhang@MULTIMEDIA.DISPLAY.LCD, 2020/09/25, sepolicy for aod ramless
|
||||
if (display->panel && display->panel->oppo_priv.is_aod_ramless) {
|
||||
if (crtc_state->active_changed && (dsi_mode.dsi_mode_flags & DSI_MODE_FLAG_DYN_CLK)) {
|
||||
DSI_ERR("dyn clk changed when active_changed, WA to skip dyn clk change\n");
|
||||
dsi_mode.dsi_mode_flags &= ~DSI_MODE_FLAG_DYN_CLK;
|
||||
}
|
||||
|
||||
if (dsi_mode.dsi_mode_flags & DSI_MODE_FLAG_DMS)
|
||||
dsi_mode.dsi_mode_flags |= DSI_MODE_FLAG_SEAMLESS;
|
||||
}
|
||||
#endif /* OPLUS_FEATURE_AOD_RAMLESS */
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
/* Reject seemless transition when active/connectors changed.*/
|
||||
if ((crtc_state->active_changed ||
|
||||
(crtc_state->connectors_changed && clone_mode)) &&
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -29,6 +29,15 @@
|
||||
#include "dsi_pwr.h"
|
||||
#include "dsi_parser.h"
|
||||
#include "msm_drv.h"
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@PSW.MM.Display.LCD.Stability,2018/11/21
|
||||
* Add for save display panel power status at oppo display management
|
||||
*/
|
||||
struct oppo_brightness_alpha {
|
||||
u32 brightness;
|
||||
u32 alpha;
|
||||
};
|
||||
#endif /*OPLUS_BUG_STABILITY*/
|
||||
|
||||
#define MAX_BL_LEVEL 4096
|
||||
#define MAX_BL_SCALE_LEVEL 1024
|
||||
@@ -36,7 +45,7 @@
|
||||
#define DSI_CMD_PPS_SIZE 135
|
||||
|
||||
#define DSI_MODE_MAX 5
|
||||
|
||||
extern int tp_gesture_enable_flag(void);
|
||||
enum dsi_panel_rotation {
|
||||
DSI_PANEL_ROTATE_NONE = 0,
|
||||
DSI_PANEL_ROTATE_HV_FLIP,
|
||||
@@ -115,6 +124,13 @@ struct dsi_backlight_config {
|
||||
u32 bl_max_level;
|
||||
u32 brightness_max_level;
|
||||
u32 brightness_default_level;
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Sachin Shukla@PSW.MM.Display.LCD.Feature,2019-11-04 add for
|
||||
* global hbm
|
||||
*/
|
||||
u32 bl_normal_max_level;
|
||||
u32 brightness_normal_max_level;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
u32 bl_level;
|
||||
u32 bl_scale;
|
||||
u32 bl_scale_ad;
|
||||
@@ -144,6 +160,20 @@ struct dsi_panel_reset_config {
|
||||
int disp_en_gpio;
|
||||
int lcd_mode_sel_gpio;
|
||||
u32 mode_sel_state;
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Chao.Zhang@MULTIMEDIA.DISPLAY.LCD, 2020/09/18, add for 19081 LCD */
|
||||
int lcd_vci_gpio;
|
||||
int err_flag_gpio;
|
||||
u32 lcd_delay_vci_gpio;
|
||||
/* Chao.Zhang@MULTIMEDIA.DISPLAY.LCD, 2020/09/23, add for lcd reset gpio delay */
|
||||
u32 lcd_delay_disp_en_gpio;
|
||||
u32 lcd_delay_reset_gpio;
|
||||
u32 lcd_delay_mode_sel_gpio;
|
||||
u32 lcd_delay_set_pinctrl_state;
|
||||
u32 lcd_delay_enable_regulator;
|
||||
/* xupengcheng@MULTIMEDIA.DISPLAY.LCD, 2020/10/30, add for 19781 lp11 delay */
|
||||
u32 lcd_delay_lp11_state;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
};
|
||||
|
||||
enum esd_check_status_mode {
|
||||
@@ -168,6 +198,38 @@ struct drm_panel_esd_config {
|
||||
u32 groups;
|
||||
};
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Sachin hukla@PSW.MM.Display.LCD.Feature,2019-11-07 add for
|
||||
* oppo custom info
|
||||
*/
|
||||
struct dsi_panel_oppo_privite {
|
||||
const char *vendor_name;
|
||||
const char *manufacture_name;
|
||||
bool skip_mipi_last_cmd;
|
||||
bool is_pxlw_iris5;
|
||||
#ifdef OPLUS_FEATURE_AOD_RAMLESS
|
||||
// Yuwei.Zhang@MULTIMEDIA.DISPLAY.LCD, 2020/09/25, sepolicy for aod ramless
|
||||
bool is_aod_ramless;
|
||||
#endif /* OPLUS_FEATURE_AOD_RAMLESS */
|
||||
/* xupengcheng@MULTIMEDIA.DISPLAY.LCD.Feature,2020-10-21 optimize osc adaptive */
|
||||
bool is_osc_support;
|
||||
bool is_19781_lcd;
|
||||
u32 osc_clk_mode0_rate;
|
||||
u32 osc_clk_mode1_rate;
|
||||
u32 osc_clk_current_rate;
|
||||
int seed_bl_max;
|
||||
bool bl_interpolate_nosub;
|
||||
struct oppo_brightness_alpha *bl_remap;
|
||||
int bl_remap_count;
|
||||
#ifdef OPLUS_FEATURE_LCD_CABC
|
||||
/*xupengcheng@MULTIMEDIA.MM.Display.LCD.Stability,2020/09/18,add for 19696 LCD CABC feature*/
|
||||
bool is_19696_lcd;
|
||||
#endif /*OPLUS_FEATURE_LCD_CABC*/
|
||||
u32 pll_delay;
|
||||
u32 prj_flag;
|
||||
};
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
struct dsi_panel {
|
||||
const char *name;
|
||||
const char *type;
|
||||
@@ -218,6 +280,26 @@ struct dsi_panel {
|
||||
bool sync_broadcast_en;
|
||||
int power_mode;
|
||||
enum dsi_panel_physical_type panel_type;
|
||||
|
||||
//#ifdef OPLUS_BUG_STABILITY
|
||||
/* Gou shengjun@PSW.MM.Display.Service.Feature,2018/11/21
|
||||
* For OnScreenFingerprint feature
|
||||
*/
|
||||
bool is_hbm_enabled;
|
||||
/* Fix aod flash problem */
|
||||
bool need_power_on_backlight;
|
||||
/*DuanSu@MULTIMEDIA.DISPLAY.LCD, 2020/08/03, Add for 19567 project reset */
|
||||
bool reset_timing;
|
||||
/*Sachin Shukla@PSW.MM.Display.LCD.Feature,2019-10-30 add for fod brightness */
|
||||
struct oppo_brightness_alpha *ba_seq;
|
||||
struct oppo_brightness_alpha *dc_ba_seq;
|
||||
int ba_count;
|
||||
int dc_ba_count;
|
||||
struct dsi_panel_oppo_privite oppo_priv;
|
||||
/* Chao.Zhang@MULTIMEDIA.DISPLAY.LCD, 2020/09/18, add for 19081 LCD */
|
||||
bool is_err_flag_irq_enabled;
|
||||
bool err_flag_status;
|
||||
//#endif /* OPLUS_BUG_STABILITY */
|
||||
};
|
||||
|
||||
static inline bool dsi_panel_ulps_feature_enabled(struct dsi_panel *panel)
|
||||
@@ -337,5 +419,14 @@ struct dsi_panel *dsi_panel_ext_bridge_get(struct device *parent,
|
||||
int dsi_panel_parse_esd_reg_read_configs(struct dsi_panel *panel);
|
||||
|
||||
void dsi_panel_ext_bridge_put(struct dsi_panel *panel);
|
||||
|
||||
//#ifdef OPLUS_BUG_STABILITY
|
||||
/* Gou shengjun@PSW.MM.Display.LCD.Stability,2018/11/21
|
||||
* Add for oppo display new structure
|
||||
*/
|
||||
int dsi_panel_tx_cmd_set(struct dsi_panel *panel,
|
||||
enum dsi_cmd_set_type type);
|
||||
/* add begin by zhangchaofan@ODM_LQ@Multimedia.TP,for tp resume upload fw 2019-11-14*/
|
||||
extern void lcd_queue_load_tp_fw(void);
|
||||
/* add end by zhangchaofan@ODM_LQ@Multimedia.TP,for tp resume upload fw 2019-11-14 */
|
||||
//#endif /* OPLUS_BUG_STABILITY */
|
||||
#endif /* _DSI_PANEL_H_ */
|
||||
|
||||
@@ -236,7 +236,10 @@ static void dsi_phy_hw_v3_0_dphy_lane_settings(struct dsi_phy_hw *phy,
|
||||
DSI_W32(phy, DSIPHY_LNX_CFG1(i), cfg->lanecfg.lane[i][1]);
|
||||
DSI_W32(phy, DSIPHY_LNX_CFG2(i), cfg->lanecfg.lane[i][2]);
|
||||
DSI_W32(phy, DSIPHY_LNX_CFG3(i), cfg->lanecfg.lane[i][3]);
|
||||
DSI_W32(phy, DSIPHY_LNX_OFFSET_TOP_CTRL(i), 0x0);
|
||||
//#ifdef OPLUS_BUG_STABILITY
|
||||
/* Liping-M@PSW.MM.Display.LCD,2020/3/17, Modify for LCD MIPI */
|
||||
DSI_W32(phy, DSIPHY_LNX_OFFSET_TOP_CTRL(i), 0x1F);
|
||||
//#endif /* OPLUS_BUG_STABILITY */
|
||||
DSI_W32(phy, DSIPHY_LNX_OFFSET_BOT_CTRL(i), 0x0);
|
||||
DSI_W32(phy, DSIPHY_LNX_TX_DCTRL(i), tx_dctrl[i]);
|
||||
}
|
||||
@@ -358,7 +361,10 @@ static void dsi_phy_hw_dphy_enable(struct dsi_phy_hw *phy,
|
||||
DSI_W32(phy, DSIPHY_CMN_GLBL_CTRL, 0x10);
|
||||
|
||||
/* Enable LDO */
|
||||
DSI_W32(phy, DSIPHY_CMN_VREG_CTRL, 0x59);
|
||||
//#ifdef OPLUS_BUG_STABILITY
|
||||
/* Liping-M@PSW.MM.Display.LCD,2020/3/17, Modify for LCD MIPI */
|
||||
DSI_W32(phy, DSIPHY_CMN_VREG_CTRL, 0x5B);
|
||||
//#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
/* Configure PHY lane swap */
|
||||
dsi_phy_hw_v3_0_lane_swap_config(phy, &cfg->lane_map);
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "dsi_pwr.h"
|
||||
#include "dsi_parser.h"
|
||||
|
||||
static int tp_gesture_pwr_flag = 0;
|
||||
/*
|
||||
* dsi_pwr_parse_supply_node() - parse power supply node from root device node
|
||||
*/
|
||||
@@ -137,6 +138,15 @@ static int dsi_pwr_enable_vregs(struct dsi_regulator_info *regs, bool enable)
|
||||
|
||||
if (enable) {
|
||||
for (i = 0; i < regs->count; i++) {
|
||||
if (tp_gesture_pwr_flag) {
|
||||
if ((strcmp(regs->vregs[i].vreg_name,"lab")==0) ||
|
||||
(strcmp(regs->vregs[i].vreg_name,"ibb")==0) ||
|
||||
(strcmp(regs->vregs[i].vreg_name,"vddio")==0) ) {
|
||||
tp_gesture_pwr_flag--;
|
||||
//pr_info("LQTP-no enable vreg %s\n",regs->vregs[i].vreg_name);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
vreg = ®s->vregs[i];
|
||||
if (vreg->pre_on_sleep)
|
||||
msleep(vreg->pre_on_sleep);
|
||||
@@ -172,6 +182,16 @@ static int dsi_pwr_enable_vregs(struct dsi_regulator_info *regs, bool enable)
|
||||
}
|
||||
} else {
|
||||
for (i = (regs->count - 1); i >= 0; i--) {
|
||||
if (tp_gesture_enable_flag()) {
|
||||
if ((strcmp(regs->vregs[i].vreg_name,"lab")==0) ||
|
||||
(strcmp(regs->vregs[i].vreg_name,"ibb")==0) ||
|
||||
(strcmp(regs->vregs[i].vreg_name,"vddio")==0) ) {
|
||||
tp_gesture_pwr_flag++;
|
||||
//pr_info("LQTP-no disable vreg %s\n",regs->vregs[i].vreg_name);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (regs->vregs[i].pre_off_sleep)
|
||||
msleep(regs->vregs[i].pre_off_sleep);
|
||||
|
||||
|
||||
@@ -112,4 +112,5 @@ int dsi_pwr_enable_regulator(struct dsi_regulator_info *regs, bool enable);
|
||||
int dsi_pwr_panel_regulator_mode_set(struct dsi_regulator_info *regs,
|
||||
const char *reg_name,
|
||||
int regulator_mode);
|
||||
extern int tp_gesture_enable_flag(void);
|
||||
#endif /* _DSI_PWR_H_ */
|
||||
|
||||
@@ -73,11 +73,24 @@ EXPORT_SYMBOL(msm_drm_unregister_client);
|
||||
* @v: notifier data, inculde display id and display blank
|
||||
* event(unblank or power down).
|
||||
*/
|
||||
|
||||
#ifndef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@PSW.MM.Display.Lcd.Stability, 2018-05-31
|
||||
* add for export drm_notifier
|
||||
*/
|
||||
static int msm_drm_notifier_call_chain(unsigned long val, void *v)
|
||||
{
|
||||
return blocking_notifier_call_chain(&msm_drm_notifier_list, val,
|
||||
v);
|
||||
}
|
||||
#else /*OPLUS_BUG_STABILITY*/
|
||||
int msm_drm_notifier_call_chain(unsigned long val, void *v)
|
||||
{
|
||||
return blocking_notifier_call_chain(&msm_drm_notifier_list, val,
|
||||
v);
|
||||
}
|
||||
EXPORT_SYMBOL(msm_drm_notifier_call_chain);
|
||||
#endif /*OPLUS_BUG_STABILITY*/
|
||||
|
||||
/* block until specified crtcs are no longer pending update, and
|
||||
* atomically mark them as pending update
|
||||
@@ -263,8 +276,12 @@ msm_disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
|
||||
blank = MSM_DRM_BLANK_POWERDOWN;
|
||||
notifier_data.data = ␣
|
||||
notifier_data.id = crtc_idx;
|
||||
msm_drm_notifier_call_chain(MSM_DRM_EARLY_EVENT_BLANK,
|
||||
¬ifier_data);
|
||||
#ifndef OPLUS_BUG_STABILITY
|
||||
/*Sachin @PSW.MM.Display.LCD.Stable, 2020/04/09, Add for
|
||||
remove original drm notify for bug 12684 */
|
||||
msm_drm_notifier_call_chain(MSM_DRM_EARLY_EVENT_BLANK,
|
||||
¬ifier_data);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
}
|
||||
/*
|
||||
* Each encoder has at most one connector (since we always steal
|
||||
@@ -284,8 +301,12 @@ msm_disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
|
||||
if (connector->state->crtc &&
|
||||
connector->state->crtc->state->active_changed) {
|
||||
DRM_DEBUG_ATOMIC("Notify blank\n");
|
||||
#ifndef OPLUS_BUG_STABILITY
|
||||
/* Saching@PSW.MM.Display.LCD.Stable, 2020/04/09, Add for
|
||||
remove original drm notify for bug 12684 */
|
||||
msm_drm_notifier_call_chain(MSM_DRM_EVENT_BLANK,
|
||||
¬ifier_data);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -502,8 +523,12 @@ static void msm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
|
||||
notifier_data.id =
|
||||
connector->state->crtc->index;
|
||||
DRM_DEBUG_ATOMIC("Notify early unblank\n");
|
||||
#ifndef OPLUS_BUG_STABILITY
|
||||
/* Sachin@PSW.MM.Display.LCD.Stable, 2020/04/09, Add for
|
||||
remove original drm notify for bug 12684 */
|
||||
msm_drm_notifier_call_chain(MSM_DRM_EARLY_EVENT_BLANK,
|
||||
¬ifier_data);
|
||||
¬ifier_data);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
}
|
||||
/*
|
||||
* Each encoder has at most one connector (since we always steal
|
||||
@@ -557,8 +582,12 @@ static void msm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
|
||||
if (splash || (connector->state->crtc &&
|
||||
connector->state->crtc->state->active_changed)) {
|
||||
DRM_DEBUG_ATOMIC("Notify unblank\n");
|
||||
#ifndef OPLUS_BUG_STABILITY
|
||||
/*Sachin @PSW.MM.Display.LCD.Stable, 2020/04/09, Add for
|
||||
remove original drm notify for bug 12684 */
|
||||
msm_drm_notifier_call_chain(MSM_DRM_EVENT_BLANK,
|
||||
¬ifier_data);
|
||||
¬ifier_data);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
}
|
||||
}
|
||||
SDE_ATRACE_END("msm_enable");
|
||||
|
||||
@@ -121,6 +121,12 @@ enum msm_mdp_plane_property {
|
||||
PLANE_PROP_PREFILL_TIME,
|
||||
PLANE_PROP_SCALER_V1,
|
||||
PLANE_PROP_SCALER_V2,
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@PSW.MM.Display.LCD.Feature,2018-11-21
|
||||
* Support custom propertys
|
||||
*/
|
||||
PLANE_PROP_CUSTOM,
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
PLANE_PROP_ROT_OUT_FB,
|
||||
PLANE_PROP_INVERSE_PMA,
|
||||
|
||||
@@ -161,6 +167,12 @@ enum msm_mdp_crtc_property {
|
||||
CRTC_PROP_SECURITY_LEVEL,
|
||||
CRTC_PROP_IDLE_TIMEOUT,
|
||||
CRTC_PROP_DEST_SCALER,
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@PSW.MM.Display.LCD.Feature,2018-11-21
|
||||
* Support custom propertys
|
||||
*/
|
||||
CRTC_PROP_CUSTOM,
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
CRTC_PROP_CAPTURE_OUTPUT,
|
||||
|
||||
CRTC_PROP_IDLE_PC_STATE,
|
||||
@@ -191,7 +203,12 @@ enum msm_mdp_conn_property {
|
||||
CONNECTOR_PROP_ROI_V1,
|
||||
CONNECTOR_PROP_BL_SCALE,
|
||||
CONNECTOR_PROP_AD_BL_SCALE,
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@PSW.MM.Display.LCD.Feature,2018-011-21
|
||||
* Support custom propertys
|
||||
*/
|
||||
CONNECTOR_PROP_CUSTOM,
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
/* enum/bitmask properties */
|
||||
CONNECTOR_PROP_TOPOLOGY_NAME,
|
||||
CONNECTOR_PROP_TOPOLOGY_CONTROL,
|
||||
|
||||
@@ -18,6 +18,12 @@
|
||||
#include "msm_drv.h"
|
||||
#include "msm_mmu.h"
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@PSW.MM.Display.LCD.Machine, 2019/01/29,add for mm kevent fb. */
|
||||
#include "oppo_mm_kevent_fb.h"
|
||||
static int msm_smmu_count = 0;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
struct msm_iommu {
|
||||
struct msm_mmu base;
|
||||
struct iommu_domain *domain;
|
||||
@@ -28,9 +34,25 @@ static int msm_fault_handler(struct iommu_domain *domain, struct device *dev,
|
||||
unsigned long iova, int flags, void *arg)
|
||||
{
|
||||
struct msm_iommu *iommu = arg;
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin@PSW.MM.Display.LCD.Machine, 2019/01/29,add for mm kevent fb. */
|
||||
unsigned char payload[150] = "";
|
||||
#endif /*OPLUS_BUG_STABILITY*/
|
||||
|
||||
if (iommu->base.handler)
|
||||
return iommu->base.handler(iommu->base.arg, iova, flags);
|
||||
pr_warn_ratelimited("*** fault: iova=%08lx, flags=%d\n", iova, flags);
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin@PSW.MM.Display.LCD.Machine, 2019/01/29,add for mm kevent fb. */
|
||||
if (msm_smmu_count < 30) {
|
||||
scnprintf(payload, sizeof(payload), "NULL$$EventID@@%d$$SMMU msm fault@@%08lx flags=%d",OPPO_MM_DIRVER_FB_EVENT_ID_SMMU,iova,flags);
|
||||
upload_mm_kevent_fb_data(OPPO_MM_DIRVER_FB_EVENT_MODULE_DISPLAY,payload);
|
||||
msm_smmu_count ++;
|
||||
}
|
||||
#endif /*OPLUS_BUG_STABILITY*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,16 @@
|
||||
#include "sde_hw_interrupts.h"
|
||||
#include "sde_core_irq.h"
|
||||
#include "dsi_panel.h"
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@MM.Display.LCD.Stability, 2020/3/31, for
|
||||
* decoupling display driver
|
||||
*/
|
||||
#include "oppo_display_private_api.h"
|
||||
#include "oppo_onscreenfingerprint.h"
|
||||
extern struct drm_msm_pcc oppo_save_pcc;
|
||||
extern bool oppo_skip_pcc;
|
||||
extern bool oppo_pcc_enabled;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
struct sde_cp_node {
|
||||
u32 property_id;
|
||||
@@ -345,6 +355,14 @@ static struct sde_kms *get_kms(struct drm_crtc *crtc)
|
||||
return to_sde_kms(priv->kms);
|
||||
}
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* QianXu@MM.Display.LCD.Stability, 2020/3/31, for decoupling display driver */
|
||||
struct sde_kms *get_kms_(struct drm_crtc *crtc)
|
||||
{
|
||||
return get_kms(crtc);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void sde_cp_crtc_prop_attach(struct sde_cp_prop_attach *prop_attach)
|
||||
{
|
||||
|
||||
@@ -643,6 +661,27 @@ static void sde_cp_crtc_setfeature(struct sde_cp_node *prop_node,
|
||||
struct sde_ad_hw_cfg ad_cfg;
|
||||
|
||||
sde_cp_get_hw_payload(prop_node, &hw_cfg, &feature_enabled);
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2019-04-28 fix pcc abnormal on onscreenfinger scene */
|
||||
if (prop_node->feature == SDE_CP_CRTC_DSPP_PCC && is_dsi_panel(&sde_crtc->base)) {
|
||||
if (hw_cfg.payload && (hw_cfg.len == sizeof(oppo_save_pcc))) {
|
||||
memcpy(&oppo_save_pcc, hw_cfg.payload, hw_cfg.len);
|
||||
oppo_pcc_enabled = true;
|
||||
|
||||
if (is_skip_pcc(&sde_crtc->base)) {
|
||||
hw_cfg.payload = NULL;
|
||||
hw_cfg.len = 0;
|
||||
oppo_skip_pcc = true;
|
||||
} else {
|
||||
oppo_skip_pcc = false;
|
||||
}
|
||||
} else {
|
||||
oppo_pcc_enabled = false;
|
||||
}
|
||||
}
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
hw_cfg.num_of_mixers = sde_crtc->num_mixers;
|
||||
hw_cfg.last_feature = 0;
|
||||
|
||||
@@ -869,6 +908,12 @@ void sde_cp_crtc_apply_properties(struct drm_crtc *crtc)
|
||||
struct sde_cp_node *prop_node = NULL, *n = NULL;
|
||||
struct sde_hw_ctl *ctl;
|
||||
u32 num_mixers = 0, i = 0;
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Sachin Shukla@PSW.MM.Display.LCD.Stable,2019-04-28 fix
|
||||
* pcc abnormal on onscreenfinger scene
|
||||
*/
|
||||
bool dirty_pcc = false;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
if (!crtc || !crtc->dev) {
|
||||
DRM_ERROR("invalid crtc %pK dev %pK\n", crtc,
|
||||
@@ -890,12 +935,30 @@ void sde_cp_crtc_apply_properties(struct drm_crtc *crtc)
|
||||
|
||||
mutex_lock(&sde_crtc->crtc_cp_lock);
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*@PSW.MM.Display.LCD.Stable,2019-04-28 fix pcc abnormal
|
||||
* on onscreenfinger scene
|
||||
*/
|
||||
dirty_pcc = sde_cp_crtc_update_pcc(crtc);
|
||||
if (dirty_pcc) {
|
||||
set_dspp_flush = true;
|
||||
}
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
/* Check if dirty lists are empty and ad features are disabled for
|
||||
* early return. If ad properties are active then we need to issue
|
||||
* dspp flush.
|
||||
**/
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Sachin Shukla@PSW.MM.Display.LCD.Stable,2019-04-28 fix
|
||||
*pcc abnormal on onscreenfinger scene
|
||||
*/
|
||||
if (!dirty_pcc && list_empty(&sde_crtc->dirty_list) &&
|
||||
list_empty(&sde_crtc->ad_dirty)) {
|
||||
#else
|
||||
if (list_empty(&sde_crtc->dirty_list) &&
|
||||
list_empty(&sde_crtc->ad_dirty)) {
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
if (list_empty(&sde_crtc->ad_active)) {
|
||||
DRM_DEBUG_DRIVER("Dirty list is empty\n");
|
||||
goto exit;
|
||||
|
||||
@@ -152,4 +152,10 @@ void sde_cp_crtc_post_ipc(struct drm_crtc *crtc);
|
||||
*/
|
||||
int sde_cp_hist_interrupt(struct drm_crtc *crtc_drm, bool en,
|
||||
struct sde_irq_callback *hist_irq);
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* QianXu@MM.Display.LCD.Stability, 2020/3/31, for decoupling display driver */
|
||||
struct sde_kms *get_kms_(struct drm_crtc *crtc);
|
||||
#endif
|
||||
|
||||
#endif /*_SDE_COLOR_PROCESSING_H */
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
#include "dsi_display.h"
|
||||
#include "sde_crtc.h"
|
||||
#include "sde_rm.h"
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
#include "oppo_display_private_api.h"
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
#define BL_NODE_NAME_SIZE 32
|
||||
|
||||
@@ -35,6 +38,16 @@
|
||||
#define SDE_ERROR_CONN(c, fmt, ...) SDE_ERROR("conn%d " fmt,\
|
||||
(c) ? (c)->base.base.id : -1, ##__VA_ARGS__)
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin@PSW.MM.Display.LCD.Feature,2020-06-08
|
||||
* Force enable dither on OnScreenFingerprint scene,add QCOM patch,
|
||||
* fix BUG:49203
|
||||
*/
|
||||
static u32 dither_matrix[DITHER_MATRIX_SZ] = {
|
||||
15, 7, 13, 5, 3, 11, 1, 9, 12, 4, 14, 6, 0, 8, 2, 10
|
||||
};
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
static const struct drm_prop_enum_list e_topology_name[] = {
|
||||
{SDE_RM_TOPOLOGY_NONE, "sde_none"},
|
||||
{SDE_RM_TOPOLOGY_SINGLEPIPE, "sde_singlepipe"},
|
||||
@@ -64,6 +77,11 @@ static const struct drm_prop_enum_list e_qsync_mode[] = {
|
||||
{SDE_RM_QSYNC_ONE_SHOT_MODE, "one_shot"},
|
||||
};
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Sachin@PSW.MM.Display.LCD.Feature,2019-11-04 add for global hbm */
|
||||
extern int oppo_debug_max_brightness;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
static int sde_backlight_device_update_status(struct backlight_device *bd)
|
||||
{
|
||||
int brightness;
|
||||
@@ -85,9 +103,49 @@ static int sde_backlight_device_update_status(struct backlight_device *bd)
|
||||
if (brightness > display->panel->bl_config.bl_max_level)
|
||||
brightness = display->panel->bl_config.bl_max_level;
|
||||
|
||||
#ifndef OPLUS_BUG_STABILITY
|
||||
/*Sachin Shukla@PSW.MM.Display.LCD.Feature,2019-11-04 add for global hbm */
|
||||
/* map UI brightness into driver backlight level with rounding */
|
||||
bl_lvl = mult_frac(brightness, display->panel->bl_config.bl_max_level,
|
||||
display->panel->bl_config.brightness_max_level);
|
||||
#else /* OPLUS_BUG_STABILITY */
|
||||
if (oppo_debug_max_brightness) {
|
||||
bl_lvl = mult_frac(brightness, oppo_debug_max_brightness,
|
||||
display->panel->bl_config.brightness_max_level);
|
||||
} else if (brightness == 0) {
|
||||
bl_lvl = 0;
|
||||
} else {
|
||||
if (display->panel->oppo_priv.bl_remap && display->panel->oppo_priv.bl_remap_count) {
|
||||
int i = 0;
|
||||
int count = display->panel->oppo_priv.bl_remap_count;
|
||||
struct oppo_brightness_alpha *lut = display->panel->oppo_priv.bl_remap;
|
||||
|
||||
for (i = 0; i < display->panel->oppo_priv.bl_remap_count; i++){
|
||||
if (display->panel->oppo_priv.bl_remap[i].brightness >= brightness)
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == 0)
|
||||
bl_lvl = lut[0].alpha;
|
||||
else if (i == count)
|
||||
bl_lvl = lut[count - 1].alpha;
|
||||
else
|
||||
bl_lvl = interpolate(brightness, lut[i-1].brightness,
|
||||
lut[i].brightness, lut[i-1].alpha,
|
||||
lut[i].alpha);
|
||||
} else if (brightness > display->panel->bl_config.brightness_normal_max_level) {
|
||||
bl_lvl = interpolate(brightness,
|
||||
display->panel->bl_config.brightness_normal_max_level,
|
||||
display->panel->bl_config.brightness_max_level,
|
||||
display->panel->bl_config.bl_normal_max_level,
|
||||
display->panel->bl_config.bl_max_level);
|
||||
} else {
|
||||
bl_lvl = mult_frac(brightness, display->panel->bl_config.bl_normal_max_level,
|
||||
display->panel->bl_config.brightness_normal_max_level);
|
||||
}
|
||||
}
|
||||
SDE_DEBUG("brightness = %d, bl_lvl = %d\n", brightness, bl_lvl);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
if (!bl_lvl && brightness)
|
||||
bl_lvl = 1;
|
||||
@@ -143,7 +201,12 @@ static int sde_backlight_setup(struct sde_connector *c_conn,
|
||||
display = (struct dsi_display *) c_conn->display;
|
||||
bl_config = &display->panel->bl_config;
|
||||
props.max_brightness = bl_config->brightness_max_level;
|
||||
#ifndef OPLUS_BUG_STABILITY
|
||||
/*Sachin@PSW.MM.Display.LCD.Feature,2019-11-04 modify for default brightness*/
|
||||
props.brightness = bl_config->brightness_max_level;
|
||||
#else /* OPLUS_BUG_STABILITY */
|
||||
props.brightness = bl_config->brightness_default_level;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
snprintf(bl_node_name, BL_NODE_NAME_SIZE, "panel%u-backlight",
|
||||
display_count);
|
||||
c_conn->bl_device = backlight_device_register(bl_node_name, dev->dev,
|
||||
@@ -236,13 +299,71 @@ void sde_connector_unregister_event(struct drm_connector *connector,
|
||||
(void)sde_connector_register_event(connector, event_idx, 0, 0);
|
||||
}
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin@PSW.MM.Display.LCD.Feature,2020-06-08
|
||||
* Force enable dither on OnScreenFingerprint scene,add QCOM patch,
|
||||
* fix BUG:49203
|
||||
*/
|
||||
static int _sde_connector_get_default_dither_cfg_v1(
|
||||
struct sde_connector *c_conn, void *cfg)
|
||||
{
|
||||
struct drm_msm_dither *dither_cfg = (struct drm_msm_dither *)cfg;
|
||||
enum dsi_pixel_format dst_format = DSI_PIXEL_FORMAT_MAX;
|
||||
|
||||
if (!c_conn || !cfg) {
|
||||
SDE_ERROR("invalid argument(s), c_conn %pK, cfg %pK\n",
|
||||
c_conn, cfg);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!c_conn->ops.get_dst_format) {
|
||||
SDE_DEBUG("get_dst_format is unavailable\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
dst_format = c_conn->ops.get_dst_format(&c_conn->base, c_conn->display);
|
||||
switch (dst_format) {
|
||||
case DSI_PIXEL_FORMAT_RGB888:
|
||||
dither_cfg->c0_bitdepth = 8;
|
||||
dither_cfg->c1_bitdepth = 8;
|
||||
dither_cfg->c2_bitdepth = 8;
|
||||
dither_cfg->c3_bitdepth = 8;
|
||||
break;
|
||||
case DSI_PIXEL_FORMAT_RGB666:
|
||||
case DSI_PIXEL_FORMAT_RGB666_LOOSE:
|
||||
dither_cfg->c0_bitdepth = 6;
|
||||
dither_cfg->c1_bitdepth = 6;
|
||||
dither_cfg->c2_bitdepth = 6;
|
||||
dither_cfg->c3_bitdepth = 6;
|
||||
break;
|
||||
default:
|
||||
SDE_DEBUG("no default dither config for dst_format %d\n",
|
||||
dst_format);
|
||||
return -ENODATA;
|
||||
}
|
||||
|
||||
memcpy(&dither_cfg->matrix, dither_matrix,
|
||||
sizeof(u32) * DITHER_MATRIX_SZ);
|
||||
dither_cfg->temporal_en = 0;
|
||||
return 0;
|
||||
}
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
static void _sde_connector_install_dither_property(struct drm_device *dev,
|
||||
struct sde_kms *sde_kms, struct sde_connector *c_conn)
|
||||
{
|
||||
char prop_name[DRM_PROP_NAME_LEN];
|
||||
struct sde_mdss_cfg *catalog = NULL;
|
||||
u32 version = 0;
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin@PSW.MM.Display.LCD.Feature,2020-06-08
|
||||
* Force enable dither on OnScreenFingerprint scene,add QCOM patch,fix BUG:49203
|
||||
*/
|
||||
struct drm_property_blob *blob_ptr;
|
||||
void *cfg;
|
||||
int ret = 0;
|
||||
u32 version = 0, len = 0;
|
||||
bool defalut_dither_needed = false;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
if (!dev || !sde_kms || !c_conn) {
|
||||
SDE_ERROR("invld args (s), dev %pK, sde_kms %pK, c_conn %pK\n",
|
||||
dev, sde_kms, c_conn);
|
||||
@@ -259,55 +380,76 @@ static void _sde_connector_install_dither_property(struct drm_device *dev,
|
||||
msm_property_install_blob(&c_conn->property_info, prop_name,
|
||||
DRM_MODE_PROP_BLOB,
|
||||
CONNECTOR_PROP_PP_DITHER);
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* LiPing-M@PSW.MM.Display.LCD.Feature,2020-06-08
|
||||
* Force enable dither on OnScreenFingerprint scene,add QCOM patch,
|
||||
* fix BUG:49203
|
||||
*/
|
||||
len = sizeof(struct drm_msm_dither);
|
||||
cfg = kzalloc(len, GFP_KERNEL);
|
||||
if (!cfg)
|
||||
return;
|
||||
|
||||
ret = _sde_connector_get_default_dither_cfg_v1(c_conn, cfg);
|
||||
if (!ret)
|
||||
defalut_dither_needed = true;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
break;
|
||||
default:
|
||||
SDE_ERROR("unsupported dither version %d\n", version);
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin@PSW.MM.Display.LCD.Feature,2020-06-08
|
||||
* Force enable dither on OnScreenFingerprint scene,add QCOM patch,
|
||||
* fix BUG:49203
|
||||
*/
|
||||
if (defalut_dither_needed) {
|
||||
blob_ptr = drm_property_create_blob(dev, len, cfg);
|
||||
if (IS_ERR_OR_NULL(blob_ptr))
|
||||
goto exit;
|
||||
c_conn->blob_dither = blob_ptr;
|
||||
}
|
||||
exit:
|
||||
kfree(cfg);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
}
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* LiPing-M@PSW.MM.Display.LCD.Feature,2020-06-08
|
||||
* Force enable dither on OnScreenFingerprint scene,add QCOM patch,fix BUG:49203
|
||||
*/
|
||||
int sde_connector_get_dither_cfg(struct drm_connector *conn,
|
||||
struct drm_connector_state *state, void **cfg,
|
||||
size_t *len, bool idle_pc)
|
||||
size_t *len)
|
||||
{
|
||||
struct sde_connector *c_conn = NULL;
|
||||
struct sde_connector_state *c_state = NULL;
|
||||
size_t dither_sz = 0;
|
||||
bool is_dirty;
|
||||
u32 *p = (u32 *)cfg;
|
||||
|
||||
if (!conn || !state || !p) {
|
||||
SDE_ERROR("invalid arguments\n");
|
||||
if (!conn || !state || !p)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
c_conn = to_sde_connector(conn);
|
||||
c_state = to_sde_connector_state(state);
|
||||
|
||||
is_dirty = msm_property_is_dirty(&c_conn->property_info,
|
||||
&c_state->property_state,
|
||||
CONNECTOR_PROP_PP_DITHER);
|
||||
|
||||
if (!is_dirty && !idle_pc) {
|
||||
return -ENODATA;
|
||||
} else if (is_dirty || idle_pc) {
|
||||
*cfg = msm_property_get_blob(&c_conn->property_info,
|
||||
&c_state->property_state,
|
||||
&dither_sz,
|
||||
CONNECTOR_PROP_PP_DITHER);
|
||||
/*
|
||||
* In idle_pc use case return early, when dither is
|
||||
* already disabled.
|
||||
*/
|
||||
if (idle_pc && *cfg == NULL)
|
||||
return -ENODATA;
|
||||
/* disable dither based on user config data */
|
||||
else if (*cfg == NULL)
|
||||
return 0;
|
||||
/* try to get user config data first */
|
||||
*cfg = msm_property_get_blob(&c_conn->property_info,
|
||||
&c_state->property_state,
|
||||
&dither_sz,
|
||||
CONNECTOR_PROP_PP_DITHER);
|
||||
/* if user config data doesn't exist, use default dither blob */
|
||||
if (*cfg == NULL && c_conn->blob_dither) {
|
||||
*cfg = c_conn->blob_dither->data;
|
||||
dither_sz = c_conn->blob_dither->length;
|
||||
}
|
||||
*len = dither_sz;
|
||||
return 0;
|
||||
}
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
int sde_connector_get_mode_info(struct drm_connector_state *conn_state,
|
||||
struct msm_mode_info *mode_info)
|
||||
@@ -463,6 +605,10 @@ static int _sde_connector_update_bl_scale(struct sde_connector *c_conn)
|
||||
struct dsi_display *dsi_display;
|
||||
struct dsi_backlight_config *bl_config;
|
||||
int rc = 0;
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Sachin@PSW.MM.Display.LCD.Stable,2019-03-7 fix backlight race problem */
|
||||
struct backlight_device *bd;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
if (!c_conn) {
|
||||
SDE_ERROR("Invalid params sde_connector null\n");
|
||||
@@ -477,10 +623,25 @@ static int _sde_connector_update_bl_scale(struct sde_connector *c_conn)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Sachin@PSW.MM.Display.LCD.Stable,2019-03-7 fix backlight race problem */
|
||||
bd = c_conn->bl_device;
|
||||
if (!bd) {
|
||||
SDE_ERROR("Invalid params backlight_device null\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
mutex_lock(&bd->update_lock);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
bl_config = &dsi_display->panel->bl_config;
|
||||
|
||||
if (!c_conn->allow_bl_update) {
|
||||
c_conn->unset_bl_level = bl_config->bl_level;
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Sachin@PSW.MM.Display.LCD.Stable,2019-03-7 fix backlight race problem */
|
||||
mutex_unlock(&bd->update_lock);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -503,10 +664,24 @@ static int _sde_connector_update_bl_scale(struct sde_connector *c_conn)
|
||||
rc = c_conn->ops.set_backlight(&c_conn->base,
|
||||
dsi_display, bl_config->bl_level);
|
||||
c_conn->unset_bl_level = 0;
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Sachin@PSW.MM.Display.LCD.Stable,2019-03-7 fix backlight race problem */
|
||||
mutex_unlock(&bd->update_lock);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@MM.Display.LCD.Stability, 2020/3/31, for
|
||||
*decoupling display driver
|
||||
*/
|
||||
int _sde_connector_update_bl_scale_(struct sde_connector *c_conn)
|
||||
{
|
||||
return _sde_connector_update_bl_scale(c_conn);
|
||||
}
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
void sde_connector_set_qsync_params(struct drm_connector *connector)
|
||||
{
|
||||
struct sde_connector *c_conn;
|
||||
@@ -2330,6 +2505,14 @@ struct drm_connector *sde_connector_init(struct drm_device *dev,
|
||||
0, 0, e_qsync_mode, ARRAY_SIZE(e_qsync_mode),
|
||||
CONNECTOR_PROP_QSYNC_MODE);
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Gou shengjun@PSW.MM.Display.LCD.Feature,2018-11-21
|
||||
* Support custom propertys
|
||||
*/
|
||||
msm_property_install_range(&c_conn->property_info,"CONNECTOR_CUST",
|
||||
0x0, 0, INT_MAX, 0, CONNECTOR_PROP_CUSTOM);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
msm_property_install_range(&c_conn->property_info, "bl_scale",
|
||||
0x0, 0, MAX_BL_SCALE_LEVEL, MAX_BL_SCALE_LEVEL,
|
||||
CONNECTOR_PROP_BL_SCALE);
|
||||
|
||||
@@ -802,18 +802,21 @@ static inline bool sde_connector_needs_offset(struct drm_connector *connector)
|
||||
return (c_conn->connector_type != DRM_MODE_CONNECTOR_VIRTUAL);
|
||||
}
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin@PSW.MM.Display.LCD.Feature,2020-06-08
|
||||
* Force enable dither on OnScreenFingerprint scene,add QCOM patch,fix BUG:49203
|
||||
*/
|
||||
/**
|
||||
* sde_connector_get_dither_cfg - get dither property data
|
||||
* @conn: Pointer to drm_connector struct
|
||||
* @state: Pointer to drm_connector_state struct
|
||||
* @cfg: Pointer to pointer to dither cfg
|
||||
* @len: length of the dither data
|
||||
* @idle_pc: flag to indicate idle_pc_restore happened
|
||||
* Returns: Zero on success
|
||||
*/
|
||||
int sde_connector_get_dither_cfg(struct drm_connector *conn,
|
||||
struct drm_connector_state *state, void **cfg,
|
||||
size_t *len, bool idle_pc);
|
||||
struct drm_connector_state *state, void **cfg, size_t *len);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
/**
|
||||
* sde_connector_set_blob_data - set connector blob property data
|
||||
@@ -908,4 +911,11 @@ int sde_connector_get_panel_vfp(struct drm_connector *connector,
|
||||
*/
|
||||
int sde_connector_esd_status(struct drm_connector *connector);
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@MM.Display.LCD.Stability, 2020/3/31, for
|
||||
*decoupling display driver
|
||||
*/
|
||||
int _sde_connector_update_bl_scale_(struct sde_connector *c_conn);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
#endif /* _SDE_CONNECTOR_H_ */
|
||||
|
||||
@@ -42,6 +42,23 @@
|
||||
#include "sde_power_handle.h"
|
||||
#include "sde_core_perf.h"
|
||||
#include "sde_trace.h"
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@PSW.MM.Display.Lcd.Stability, 2018-11-21
|
||||
* Add for drm notifier for display connect
|
||||
*/
|
||||
#include <linux/msm_drm_notify.h>
|
||||
#include <linux/notifier.h>
|
||||
#include "oppo_display_private_api.h"
|
||||
#include "oppo_onscreenfingerprint.h"
|
||||
|
||||
extern int oppo_dimlayer_fingerprint_failcount;
|
||||
extern int oppo_underbrightness_alpha;
|
||||
extern int msm_drm_notifier_call_chain(unsigned long val, void *v);
|
||||
#ifdef OPLUS_FEATURE_AOD_RAMLESS
|
||||
// Yuwei.Zhang@MULTIMEDIA.DISPLAY.LCD, 2020/09/25, sepolicy for aod ramless
|
||||
extern int oppo_display_atomic_check(struct drm_crtc *crtc, struct drm_crtc_state *state);
|
||||
#endif /* OPLUS_FEATURE_AOD_RAMLESS */
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
#define SDE_PSTATES_MAX (SDE_STAGE_MAX * 4)
|
||||
#define SDE_MULTIRECT_PLANE_MAX (SDE_STAGE_MAX * 2)
|
||||
@@ -113,6 +130,16 @@ static inline struct sde_kms *_sde_crtc_get_kms(struct drm_crtc *crtc)
|
||||
return to_sde_kms(priv->kms);
|
||||
}
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@MM.Display.LCD.Stability, 2020/3/31, for
|
||||
* decoupling display driver
|
||||
*/
|
||||
struct sde_kms *_sde_crtc_get_kms_(struct drm_crtc *crtc)
|
||||
{
|
||||
return _sde_crtc_get_kms(crtc);
|
||||
}
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
static inline int _sde_crtc_power_enable(struct sde_crtc *sde_crtc, bool enable)
|
||||
{
|
||||
struct drm_crtc *crtc;
|
||||
@@ -973,6 +1000,11 @@ static void _sde_crtc_setup_blend_cfg(struct sde_crtc_mixer *mixer,
|
||||
|
||||
/* default to opaque blending */
|
||||
fg_alpha = sde_plane_get_property(pstate, PLANE_PROP_ALPHA);
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Sachin@PSW.MM.Display.LCD.Stable,2019-01-12 support plane skip */
|
||||
if (pstate->is_skip)
|
||||
fg_alpha = 0;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
bg_alpha = 0xFF - fg_alpha;
|
||||
blend_op = SDE_BLEND_FG_ALPHA_FG_CONST | SDE_BLEND_BG_ALPHA_BG_CONST;
|
||||
blend_type = sde_plane_get_property(pstate, PLANE_PROP_BLEND_OP);
|
||||
@@ -2138,6 +2170,38 @@ static void _sde_crtc_blend_setup_mixer(struct drm_crtc *crtc,
|
||||
for (i = 0; i < cstate->num_dim_layers; i++)
|
||||
_sde_crtc_setup_dim_layer_cfg(crtc, sde_crtc,
|
||||
mixer, &cstate->dim_layer[i]);
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@PSW.MM.Display.Service.Feature,2018/11/21
|
||||
* For OnScreenFingerprint feature
|
||||
*/
|
||||
if (cstate->fingerprint_dim_layer) {
|
||||
bool is_dim_valid = true;
|
||||
uint32_t zpos_max = 0;
|
||||
|
||||
drm_atomic_crtc_for_each_plane(plane, crtc) {
|
||||
state = plane->state;
|
||||
if (!state)
|
||||
continue;
|
||||
pstate = to_sde_plane_state(state);
|
||||
|
||||
if (zpos_max < pstate->stage)
|
||||
zpos_max = pstate->stage;
|
||||
SDE_EVT32(pstate->stage, cstate->fingerprint_dim_layer->stage, zpos_max);
|
||||
if (pstate->stage == cstate->fingerprint_dim_layer->stage) {
|
||||
is_dim_valid = false;
|
||||
oppo_dimlayer_fingerprint_failcount++;
|
||||
SDE_ERROR("Skip fingerprint_dim_layer as it shared plane stage %d %d\n",
|
||||
pstate->stage, cstate->fingerprint_dim_layer->stage);
|
||||
SDE_EVT32(pstate->stage, cstate->fingerprint_dim_layer->stage, zpos_max, oppo_dimlayer_fingerprint_failcount);
|
||||
}
|
||||
}
|
||||
if (is_dim_valid) {
|
||||
_sde_crtc_setup_dim_layer_cfg(crtc, sde_crtc,
|
||||
mixer, cstate->fingerprint_dim_layer);
|
||||
}
|
||||
}
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
}
|
||||
|
||||
_sde_crtc_program_lm_output_roi(crtc);
|
||||
@@ -3051,7 +3115,11 @@ static void sde_crtc_frame_event_work(struct kthread_work *work)
|
||||
spin_unlock_irqrestore(&sde_crtc->spin_lock, flags);
|
||||
SDE_ATRACE_END("crtc_frame_event");
|
||||
}
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Feature,2019-07-25 support onscreenfinger */
|
||||
extern u32 oppo_onscreenfp_vblank_count;
|
||||
extern ktime_t oppo_onscreenfp_pressed_time;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
void sde_crtc_complete_commit(struct drm_crtc *crtc,
|
||||
struct drm_crtc_state *old_state)
|
||||
{
|
||||
@@ -3066,6 +3134,69 @@ void sde_crtc_complete_commit(struct drm_crtc *crtc,
|
||||
SDE_EVT32_VERBOSE(DRMID(crtc));
|
||||
|
||||
sde_core_perf_crtc_update(crtc, 0, false);
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@PSW.MM.Display.LCD.Feature,2018-11-21
|
||||
* Add for OnScreenFingerprint
|
||||
*/
|
||||
{
|
||||
struct sde_crtc_state *old_cstate;
|
||||
struct sde_crtc_state *cstate;
|
||||
struct msm_drm_notifier notifier_data;
|
||||
int blank;
|
||||
|
||||
if (!old_state) {
|
||||
SDE_ERROR("failed to find old cstate");
|
||||
return;
|
||||
}
|
||||
old_cstate = to_sde_crtc_state(old_state);
|
||||
cstate = to_sde_crtc_state(crtc->state);
|
||||
|
||||
if (old_cstate->fingerprint_pressed != cstate->fingerprint_pressed) {
|
||||
blank = cstate->fingerprint_pressed;
|
||||
notifier_data.data = ␣
|
||||
|
||||
if (cstate->fingerprint_defer_sync) {
|
||||
u32 target_vblank = oppo_onscreenfp_vblank_count + 2;
|
||||
struct timeval vblanktime;
|
||||
ktime_t exp_ktime;
|
||||
u32 current_vblank;
|
||||
int ret;
|
||||
|
||||
current_vblank = drm_crtc_vblank_count_and_time(crtc, &vblanktime);
|
||||
|
||||
/*
|
||||
* possible hbm setting insert hardware te irq and soft vblank update
|
||||
* cause vblank calc error, add 4ms check to avoid this scene
|
||||
*/
|
||||
if (current_vblank == (oppo_onscreenfp_vblank_count + 1)) {
|
||||
exp_ktime = ktime_add_ms(oppo_onscreenfp_pressed_time, 4);
|
||||
if (ktime_compare_safe(exp_ktime, timeval_to_ktime(vblanktime)) > 0) {
|
||||
target_vblank++;
|
||||
pr_err("hbm setting may hit into hardware irq and soft update, wait one more vblank\n");
|
||||
}
|
||||
}
|
||||
|
||||
ret = wait_event_timeout(*drm_crtc_vblank_waitqueue(crtc),
|
||||
target_vblank <= drm_crtc_vblank_count(crtc),
|
||||
msecs_to_jiffies(50));
|
||||
if (!ret)
|
||||
pr_err("[fingerprint CRTC:%d:%s] vblank wait timed out\n",
|
||||
crtc->base.id, crtc->name);
|
||||
|
||||
if (current_vblank == drm_crtc_vblank_count(crtc)) {
|
||||
ret = wait_event_timeout(*drm_crtc_vblank_waitqueue(crtc),
|
||||
current_vblank != drm_crtc_vblank_count(crtc),
|
||||
msecs_to_jiffies(17));
|
||||
}
|
||||
}
|
||||
pr_err("fingerprint status: %s",
|
||||
blank ? "pressed" : "up");
|
||||
usleep_range(17000, 18000);
|
||||
msm_drm_notifier_call_chain(MSM_DRM_ONSCREENFINGERPRINT_EVENT,
|
||||
¬ifier_data);
|
||||
}
|
||||
}
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5251,6 +5382,181 @@ static int _sde_crtc_check_secure_state(struct drm_crtc *crtc,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@PSW.MM.Display.LCD.Feature,2018-11-21
|
||||
* Add for OnScreenFingerprint
|
||||
*/
|
||||
extern int oppo_onscreenfp_status;
|
||||
extern int lcd_closebl_flag_fp;
|
||||
extern int oppo_dimlayer_hbm;
|
||||
extern int oppo_dimlayer_bl_alpha_value;
|
||||
extern int oppo_dimlayer_bl_enable;
|
||||
extern bool oppo_ffl_trigger_finish;
|
||||
extern int oppo_dimlayer_bl;
|
||||
extern ktime_t oppo_backlight_time;
|
||||
extern u32 oppo_backlight_delta;
|
||||
#ifdef OPLUS_FEATURE_AOD_RAMLESS
|
||||
// Yuwei.Zhang@MULTIMEDIA.DISPLAY.LCD, 2020/09/25, sepolicy for aod ramless
|
||||
extern bool is_oppo_aod_ramless(void);
|
||||
#endif /* OPLUS_FEATURE_AOD_RAMLESS */
|
||||
|
||||
static int sde_crtc_onscreenfinger_atomic_check(struct sde_crtc_state *cstate,
|
||||
struct plane_state *pstates, int cnt)
|
||||
{
|
||||
int fp_index = -1;
|
||||
int fppressed_index = -1;
|
||||
int aod_index = -1;
|
||||
int zpos = INT_MAX;
|
||||
int mode;
|
||||
int fp_mode = oppo_onscreenfp_status;
|
||||
int dimlayer_hbm = oppo_dimlayer_hbm;
|
||||
int dimlayer_bl = 0;
|
||||
bool dimlayer_is_top = false;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < cnt; i++) {
|
||||
mode = sde_plane_check_fingerprint_layer(pstates[i].drm_pstate);
|
||||
if (mode == 1)
|
||||
fp_index = i;
|
||||
if (mode == 2)
|
||||
fppressed_index = i;
|
||||
if (mode == 3)
|
||||
aod_index = i;
|
||||
if (pstates[i].sde_pstate)
|
||||
pstates[i].sde_pstate->is_skip = false;
|
||||
}
|
||||
|
||||
if (!is_dsi_panel(cstate->base.crtc))
|
||||
return 0;
|
||||
|
||||
if (oppo_dimlayer_bl_enable) {
|
||||
int backlight = oppo_get_panel_brightness();
|
||||
|
||||
if (backlight > 1 && backlight < oppo_dimlayer_bl_alpha_value &&
|
||||
oppo_ffl_trigger_finish == true && !dimlayer_hbm) {
|
||||
ktime_t now = ktime_get();
|
||||
ktime_t delta = ktime_sub(now, oppo_backlight_time);
|
||||
|
||||
if (oppo_backlight_delta > 9) {
|
||||
if (oppo_dimlayer_bl == 0 && ktime_to_ns(delta) > 25000000)
|
||||
oppo_dimlayer_bl = 1;
|
||||
} else {
|
||||
oppo_dimlayer_bl = 1;
|
||||
}
|
||||
if (oppo_dimlayer_bl)
|
||||
dimlayer_bl = 1;
|
||||
} else {
|
||||
oppo_dimlayer_bl = 0;
|
||||
}
|
||||
} else {
|
||||
oppo_dimlayer_bl = 0;
|
||||
}
|
||||
|
||||
if (fppressed_index >= 0) {
|
||||
if (fp_mode == 0) {
|
||||
pstates[fppressed_index].sde_pstate->is_skip = true;
|
||||
fppressed_index = -1;
|
||||
}
|
||||
}
|
||||
|
||||
SDE_EVT32(cstate->fingerprint_dim_layer);
|
||||
cstate->fingerprint_mode = false;
|
||||
cstate->fingerprint_pressed = false;
|
||||
|
||||
if (dimlayer_hbm || dimlayer_bl) {
|
||||
if (fp_index >= 0 && fppressed_index >= 0) {
|
||||
if (pstates[fp_index].stage >= pstates[fppressed_index].stage) {
|
||||
SDE_ERROR("Bug!!: fp layer top of fppressed layer\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
if (lcd_closebl_flag_fp) {
|
||||
oppo_underbrightness_alpha = 0;
|
||||
cstate->fingerprint_dim_layer = NULL;
|
||||
cstate->fingerprint_mode = false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (dimlayer_hbm)
|
||||
cstate->fingerprint_mode = true;
|
||||
else
|
||||
cstate->fingerprint_mode = false;
|
||||
|
||||
SDE_DEBUG("debug for get cstate->fingerprint_mode = %d\n", cstate->fingerprint_mode);
|
||||
|
||||
if (aod_index >= 0) {
|
||||
if (zpos > pstates[aod_index].stage)
|
||||
zpos = pstates[aod_index].stage;
|
||||
pstates[aod_index].stage++;
|
||||
}
|
||||
if (fppressed_index >= 0) {
|
||||
if (zpos > pstates[fppressed_index].stage)
|
||||
zpos = pstates[fppressed_index].stage;
|
||||
pstates[fppressed_index].stage++;
|
||||
}
|
||||
if (fp_index >= 0) {
|
||||
if (zpos > pstates[fp_index].stage)
|
||||
zpos = pstates[fp_index].stage;
|
||||
pstates[fp_index].stage++;
|
||||
}
|
||||
|
||||
for (i = 0; i < cnt; i++) {
|
||||
if (i == fp_index || i == fppressed_index ||
|
||||
i == aod_index)
|
||||
continue;
|
||||
if (pstates[i].stage >= zpos) {
|
||||
pstates[i].stage++;
|
||||
}
|
||||
}
|
||||
|
||||
if (zpos == INT_MAX) {
|
||||
zpos = 0;
|
||||
dimlayer_is_top = true;
|
||||
for (i = 0; i < cnt; i++) {
|
||||
if (pstates[i].stage > zpos)
|
||||
zpos = pstates[i].stage;
|
||||
}
|
||||
zpos++;
|
||||
}
|
||||
|
||||
SDE_EVT32(zpos, fp_index, aod_index, fppressed_index, cstate->num_dim_layers);
|
||||
if (sde_crtc_config_fingerprint_dim_layer(&cstate->base, zpos)) {
|
||||
//SDE_ERROR("Failed to config dim layer\n");
|
||||
if (dimlayer_is_top && !cstate->fingerprint_dim_layer) {
|
||||
oppo_underbrightness_alpha = 0;
|
||||
cstate->fingerprint_dim_layer = NULL;
|
||||
cstate->fingerprint_mode = false;
|
||||
cstate->fingerprint_pressed = false;
|
||||
return 0;
|
||||
}
|
||||
SDE_EVT32(zpos, fp_index, aod_index, fppressed_index, cstate->num_dim_layers);
|
||||
return -EINVAL;
|
||||
}
|
||||
#ifdef OPLUS_FEATURE_AOD_RAMLESS
|
||||
// Yuwei.Zhang@MULTIMEDIA.DISPLAY.LCD, 2020/09/25, sepolicy for aod ramless
|
||||
if (fppressed_index >= 0 && !(is_oppo_aod_ramless() && cstate->base.mode.flags & DRM_MODE_FLAG_CMD_MODE_PANEL))
|
||||
#else
|
||||
if (fppressed_index >= 0)
|
||||
#endif /* OPLUS_FEATURE_AOD_RAMLESS */
|
||||
cstate->fingerprint_pressed = true;
|
||||
else
|
||||
cstate->fingerprint_pressed = false;
|
||||
|
||||
SDE_DEBUG("debug for get cstate->fingerprint_pressed = %d\n", cstate->fingerprint_pressed);
|
||||
} else {
|
||||
oppo_underbrightness_alpha = 0;
|
||||
cstate->fingerprint_dim_layer = NULL;
|
||||
cstate->fingerprint_mode = false;
|
||||
cstate->fingerprint_pressed = false;
|
||||
}
|
||||
SDE_EVT32(cstate->fingerprint_dim_layer);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
static int sde_crtc_atomic_check(struct drm_crtc *crtc,
|
||||
struct drm_crtc_state *state)
|
||||
{
|
||||
@@ -5446,6 +5752,21 @@ static int sde_crtc_atomic_check(struct drm_crtc *crtc,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@PSW.MM.Display.Service.Feature,2018/11/21
|
||||
* For OnScreenFingerprint feature
|
||||
*/
|
||||
#ifdef OPLUS_FEATURE_AOD_RAMLESS
|
||||
// Yuwei.Zhang@MULTIMEDIA.DISPLAY.LCD, 2020/09/25, sepolicy for aod ramless
|
||||
rc = oppo_display_atomic_check(crtc, state);
|
||||
if (rc)
|
||||
return rc;
|
||||
#endif /* OPLUS_FEATURE_AOD_RAMLESS */
|
||||
|
||||
rc = sde_crtc_onscreenfinger_atomic_check(cstate, pstates, cnt);
|
||||
if (rc)
|
||||
goto end;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
/* assign mixer stages based on sorted zpos property */
|
||||
if (cnt > 0)
|
||||
sort(pstates, cnt, sizeof(pstates[0]), pstate_cmp, NULL);
|
||||
@@ -5732,6 +6053,14 @@ static void sde_crtc_install_properties(struct drm_crtc *crtc,
|
||||
ARRAY_SIZE(e_cwb_data_points),
|
||||
CRTC_PROP_CAPTURE_OUTPUT);
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@PSW.MM.Display.LCD.Feature,2018-11-21
|
||||
* Support custom propertys
|
||||
*/
|
||||
msm_property_install_range(&sde_crtc->property_info,"CRTC_CUST",
|
||||
0x0, 0, INT_MAX, 0, CRTC_PROP_CUSTOM);
|
||||
#endif
|
||||
|
||||
msm_property_install_blob(&sde_crtc->property_info, "capabilities",
|
||||
DRM_MODE_PROP_IMMUTABLE, CRTC_PROP_INFO);
|
||||
|
||||
@@ -5748,8 +6077,14 @@ static void sde_crtc_install_properties(struct drm_crtc *crtc,
|
||||
if (catalog->has_dim_layer) {
|
||||
msm_property_install_volatile_range(&sde_crtc->property_info,
|
||||
"dim_layer_v1", 0x0, 0, ~0, 0, CRTC_PROP_DIM_LAYER_V1);
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Sachin Shukla@PSW.MM.Display.LCD.Stable,2019-04-17 fix dc backlight aging test fail */
|
||||
sde_kms_info_add_keyint(info, "dim_layer_v1_max_layers",
|
||||
SDE_MAX_DIM_LAYERS - 1);
|
||||
#else
|
||||
sde_kms_info_add_keyint(info, "dim_layer_v1_max_layers",
|
||||
SDE_MAX_DIM_LAYERS);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
}
|
||||
|
||||
sde_kms_info_add_keyint(info, "hw_version", catalog->hwversion);
|
||||
@@ -6928,7 +7263,7 @@ struct drm_crtc *sde_crtc_init(struct drm_device *dev, struct drm_plane *plane)
|
||||
kthread_init_delayed_work(&sde_crtc->idle_notify_work,
|
||||
__sde_crtc_idle_notify_work);
|
||||
|
||||
SDE_DEBUG("%s: successfully initialized crtc\n", sde_crtc->name);
|
||||
SDE_ERROR("%s: successfully initialized crtc\n", sde_crtc->name);
|
||||
return crtc;
|
||||
}
|
||||
|
||||
|
||||
@@ -437,6 +437,15 @@ struct sde_crtc_state {
|
||||
u32 padding_dummy;
|
||||
|
||||
struct sde_crtc_respool rp;
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@PSW.MM.Display.Service.Feature,2018/11/21
|
||||
* For OnScreenFingerprint feature
|
||||
*/
|
||||
bool fingerprint_mode;
|
||||
bool fingerprint_pressed;
|
||||
bool fingerprint_defer_sync;
|
||||
struct sde_hw_dim_layer *fingerprint_dim_layer;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
};
|
||||
|
||||
enum sde_crtc_irq_state {
|
||||
@@ -850,6 +859,13 @@ int sde_crtc_calc_vpadding_param(struct drm_crtc_state *state,
|
||||
uint32_t crtc_y, uint32_t crtc_h, uint32_t *padding_y,
|
||||
uint32_t *padding_start, uint32_t *padding_height);
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@MM.Display.LCD.Stability, 2020/3/31, for
|
||||
* decoupling display driver
|
||||
*/
|
||||
struct sde_kms *_sde_crtc_get_kms_(struct drm_crtc *crtc);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
/**
|
||||
* sde_crtc_get_num_datapath - get the number of datapath active
|
||||
* of primary connector
|
||||
|
||||
@@ -39,6 +39,14 @@
|
||||
#include "sde_core_irq.h"
|
||||
#include "sde_hw_top.h"
|
||||
#include "sde_hw_qdss.h"
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@MM.Display.LCD.Stability, 2020/3/31, for
|
||||
* decoupling display driver
|
||||
*/
|
||||
#include "oppo_display_private_api.h"
|
||||
#include "oppo_onscreenfingerprint.h"
|
||||
#include "oppo_dc_diming.h"
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
#define SDE_DEBUG_ENC(e, fmt, ...) SDE_DEBUG("enc%d " fmt,\
|
||||
(e) ? (e)->base.base.id : -1, ##__VA_ARGS__)
|
||||
@@ -280,6 +288,11 @@ struct sde_encoder_virt {
|
||||
struct kthread_work input_event_work;
|
||||
struct kthread_work esd_trigger_work;
|
||||
struct input_handler *input_handler;
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2019-12-09 fix
|
||||
input_handler register/unregister */
|
||||
bool input_handler_init;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
bool input_handler_registered;
|
||||
struct msm_display_topology topology;
|
||||
bool vblank_enabled;
|
||||
@@ -1924,11 +1937,13 @@ static int _sde_encoder_update_rsc_client(
|
||||
int wait_count = 0;
|
||||
struct drm_crtc *primary_crtc;
|
||||
int pipe = -1;
|
||||
int rc = 0;
|
||||
int rc = 0, lp_mode = -1;
|
||||
int wait_refcount = 0;
|
||||
u32 qsync_mode = 0;
|
||||
struct msm_drm_private *priv;
|
||||
struct sde_kms *sde_kms;
|
||||
struct list_head *connector_list;
|
||||
struct drm_connector *conn = NULL, *conn_iter;
|
||||
|
||||
if (!drm_enc || !drm_enc->dev) {
|
||||
SDE_ERROR("invalid encoder arguments\n");
|
||||
@@ -1963,6 +1978,8 @@ static int _sde_encoder_update_rsc_client(
|
||||
}
|
||||
|
||||
sde_kms = to_sde_kms(priv->kms);
|
||||
connector_list = &sde_kms->dev->mode_config.connector_list;
|
||||
|
||||
/**
|
||||
* only primary command mode panel without Qsync can request CMD state.
|
||||
* all other panels/displays can request for VID state including
|
||||
@@ -2003,7 +2020,17 @@ static int _sde_encoder_update_rsc_client(
|
||||
(rsc_state == SDE_RSC_VID_STATE))
|
||||
rsc_state = SDE_RSC_CLK_STATE;
|
||||
|
||||
SDE_EVT32(rsc_state, qsync_mode);
|
||||
list_for_each_entry(conn_iter, connector_list, head)
|
||||
if (conn_iter->encoder == drm_enc)
|
||||
conn = conn_iter;
|
||||
|
||||
if (conn && conn->state) {
|
||||
lp_mode = sde_connector_get_property(conn->state, CONNECTOR_PROP_LP);
|
||||
if ((lp_mode == SDE_MODE_DPMS_LP1 || lp_mode == SDE_MODE_DPMS_LP2) && enable)
|
||||
rsc_state = SDE_RSC_CLK_STATE;
|
||||
}
|
||||
|
||||
SDE_EVT32(rsc_state, qsync_mode, lp_mode);
|
||||
|
||||
prefill_lines = config ? mode_info.prefill_lines +
|
||||
config->inline_rotate_prefill : mode_info.prefill_lines;
|
||||
@@ -2091,6 +2118,11 @@ static int _sde_encoder_update_rsc_client(
|
||||
if (crtc->base.id == wait_vblank_crtc_id) {
|
||||
ret = sde_encoder_wait_for_event(drm_enc,
|
||||
MSM_ENC_VBLANK);
|
||||
if (ret == -EWOULDBLOCK) {
|
||||
SDE_EVT32(DRMID(drm_enc), wait_vblank_crtc_id, crtc->base.id);
|
||||
msleep(PRIMARY_VBLANK_WORST_CASE_MS);
|
||||
ret = 0;
|
||||
}
|
||||
} else if (primary_crtc->state->active &&
|
||||
!drm_atomic_crtc_needs_modeset(
|
||||
primary_crtc->state)) {
|
||||
@@ -3124,6 +3156,11 @@ static int _sde_encoder_input_handler(
|
||||
|
||||
sde_enc->input_handler = input_handler;
|
||||
sde_enc->input_handler_registered = false;
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2019-12-09 fix
|
||||
input_handler register/unregister */
|
||||
sde_enc->input_handler_init = false;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
return rc;
|
||||
}
|
||||
@@ -3297,7 +3334,15 @@ static void sde_encoder_virt_enable(struct drm_encoder *drm_enc)
|
||||
SDE_ERROR(
|
||||
"input handler registration failed, rc = %d\n", ret);
|
||||
else
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Sachin@PSW.MM.Display.LCD.Stable,2019-12-09 fix
|
||||
input_handler register/unregister */
|
||||
{
|
||||
sde_enc->input_handler_registered = true;
|
||||
sde_enc->input_handler_init = true;
|
||||
}
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
}
|
||||
|
||||
if (!(msm_is_mode_seamless_vrr(cur_mode)
|
||||
@@ -3400,8 +3445,18 @@ static void sde_encoder_virt_disable(struct drm_encoder *drm_enc)
|
||||
sde_encoder_wait_for_event(drm_enc, MSM_ENC_TX_COMPLETE);
|
||||
|
||||
if (sde_enc->input_handler && sde_enc->input_handler_registered) {
|
||||
input_unregister_handler(sde_enc->input_handler);
|
||||
sde_enc->input_handler_registered = false;
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Sachin@PSW.MM.Display.LCD.Stable,2019-12-09 fix
|
||||
input_handler register/unregister */
|
||||
if (sde_enc->input_handler_init) {
|
||||
input_unregister_handler(sde_enc->input_handler);
|
||||
sde_enc->input_handler_init = false;
|
||||
}
|
||||
sde_enc->input_handler_registered = false;
|
||||
#else
|
||||
input_unregister_handler(sde_enc->input_handler);
|
||||
sde_enc->input_handler_registered = false;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3931,6 +3986,13 @@ void sde_encoder_helper_trigger_start(struct sde_encoder_phys *phys_enc)
|
||||
}
|
||||
}
|
||||
|
||||
void qcdbg_trigger_full_dump(void)
|
||||
{
|
||||
SDE_EVT32(0xbd, 0x1, 0xbd);
|
||||
SDE_DBG_DUMP("all", "dbg_bus", "vbif_dbg_bus");
|
||||
}
|
||||
EXPORT_SYMBOL(qcdbg_trigger_full_dump);
|
||||
|
||||
void sde_encoder_helper_hw_reset(struct sde_encoder_phys *phys_enc)
|
||||
{
|
||||
struct sde_encoder_virt *sde_enc;
|
||||
@@ -4250,7 +4312,13 @@ void sde_encoder_trigger_kickoff_pending(struct drm_encoder *drm_enc)
|
||||
|
||||
static void _sde_encoder_setup_dither(struct sde_encoder_phys *phys)
|
||||
{
|
||||
void *dither_cfg = NULL;
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin@PSW.MM.Display.LCD.Feature,2020-06-08
|
||||
* Force enable dither on OnScreenFingerprint scene,add QCOM patch,
|
||||
* fix BUG:49203
|
||||
*/
|
||||
void *dither_cfg;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
int ret = 0, rc, i = 0;
|
||||
size_t len = 0;
|
||||
enum sde_rm_topology_name topology;
|
||||
@@ -4284,11 +4352,15 @@ static void _sde_encoder_setup_dither(struct sde_encoder_phys *phys)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin@PSW.MM.Display.LCD.Feature,2020-06-08
|
||||
* Force enable dither on OnScreenFingerprint scene,add QCOM patch,fix BUG:49203
|
||||
*/
|
||||
ret = sde_connector_get_dither_cfg(phys->connector,
|
||||
phys->connector->state, &dither_cfg,
|
||||
&len, sde_enc->idle_pc_restore);
|
||||
phys->connector->state, &dither_cfg, &len);
|
||||
if (ret)
|
||||
return;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
if (TOPOLOGY_DUALPIPE_MERGE_MODE(topology)) {
|
||||
for (i = 0; i < MAX_CHANNELS_PER_ENC; i++) {
|
||||
@@ -4299,6 +4371,12 @@ static void _sde_encoder_setup_dither(struct sde_encoder_phys *phys)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin@PSW.MM.Display.LCD.Feature,2018-11-19
|
||||
* Force enable dither on OnScreenFingerprint scene
|
||||
*/
|
||||
if (_sde_encoder_setup_dither_for_onscreenfingerprint(phys, dither_cfg, len))
|
||||
//#endif /* OPLUS_BUG_STABILITY */
|
||||
phys->hw_pp->ops.setup_dither(phys->hw_pp, dither_cfg, len);
|
||||
}
|
||||
}
|
||||
@@ -4671,6 +4749,14 @@ int sde_encoder_prepare_for_kickoff(struct drm_encoder *drm_enc,
|
||||
SDE_DEBUG_ENC(sde_enc, "\n");
|
||||
SDE_EVT32(DRMID(drm_enc));
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Sachin Shukla@PSW.MM.Display.LCD.Stable,2019-03-26 add for dc backlight */
|
||||
if (sde_enc->cur_master) {
|
||||
sde_connector_update_backlight(sde_enc->cur_master->connector, false);
|
||||
sde_connector_update_hbm(sde_enc->cur_master->connector);
|
||||
}
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
/* save this for later, in case of errors */
|
||||
if (sde_enc->cur_master && sde_enc->cur_master->ops.get_wr_line_count)
|
||||
ln_cnt1 = sde_enc->cur_master->ops.get_wr_line_count(
|
||||
@@ -4839,6 +4925,11 @@ void sde_encoder_kickoff(struct drm_encoder *drm_enc, bool is_error)
|
||||
}
|
||||
|
||||
SDE_ATRACE_END("encoder_kickoff");
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Sachin@PSW.MM.Display.LCD.Stable,2020-02-23 add for data dimming */
|
||||
sde_connector_update_backlight(sde_enc->cur_master->connector, true);
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
}
|
||||
|
||||
int sde_encoder_helper_reset_mixers(struct sde_encoder_phys *phys_enc,
|
||||
|
||||
@@ -34,6 +34,13 @@
|
||||
|
||||
#define PP_TIMEOUT_MAX_TRIALS 4
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Sachin Shukl@PSW.MM.Display.Lcd.Stability, 2019-09-01, add for runing SDE_RECOVERY_HARD_RESET when pingpong timeout many times*/
|
||||
#define PP_TIMEOUT_BAD_TRIALS 10
|
||||
#include "oppo_mm_kevent_fb.h"
|
||||
extern int oppo_dimlayer_fingerprint_failcount;
|
||||
#endif /*OPLUS_BUG_STABILITY */
|
||||
|
||||
/*
|
||||
* Tearcheck sync start and continue thresholds are empirically found
|
||||
* based on common panels In the future, may want to allow panels to override
|
||||
@@ -545,6 +552,12 @@ static int _sde_encoder_phys_cmd_handle_ppdone_timeout(
|
||||
|
||||
conn = phys_enc->connector;
|
||||
sde_conn = to_sde_connector(conn);
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Mark.Yao@PSW.MM.Display.Lcd.Stability, 2018-05-24,avoid recursion handle*/
|
||||
if (cmd_enc->pp_timeout_report_cnt >= PP_TIMEOUT_BAD_TRIALS)
|
||||
return -EFAULT;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
cmd_enc->pp_timeout_report_cnt++;
|
||||
pending_kickoff_cnt = atomic_read(&phys_enc->pending_kickoff_cnt);
|
||||
|
||||
@@ -572,6 +585,11 @@ static int _sde_encoder_phys_cmd_handle_ppdone_timeout(
|
||||
sde_conn->panel_dead)
|
||||
goto exit;
|
||||
|
||||
//#ifdef VENDOR_EDIT
|
||||
//Jiasong.Zhong@PSW.MM.Display.LCD.Stable, 2020/10/29, Add log for ramdump,bugID:509564
|
||||
SDE_DBG_DUMP("all", "dbg_bus", "vbif_dbg_bus", "panic");
|
||||
//#endif /* VENDOR_EDIT */
|
||||
|
||||
/* to avoid flooding, only log first time, and "dead" time */
|
||||
if (cmd_enc->pp_timeout_report_cnt == 1) {
|
||||
SDE_ERROR_CMDENC(cmd_enc,
|
||||
@@ -599,6 +617,16 @@ static int _sde_encoder_phys_cmd_handle_ppdone_timeout(
|
||||
sde_connector_event_notify(conn, DRM_EVENT_SDE_HW_RECOVERY,
|
||||
sizeof(uint8_t), event);
|
||||
} else if (cmd_enc->pp_timeout_report_cnt) {
|
||||
#ifndef OPLUS_BUG_STABILITY
|
||||
/*Sachin@PSW.MM.Display.LCD.Stable,2019-12-15 add wr_ptr_irq
|
||||
irq kevent data */
|
||||
{
|
||||
unsigned char payload[150] = "";
|
||||
scnprintf(payload, sizeof(payload), "NULL$$EventID@@%d$$wr_ptr_irq_timeout@@%d",
|
||||
OPPO_MM_DIRVER_FB_EVENT_ID_ESD, oppo_dimlayer_fingerprint_failcount);
|
||||
upload_mm_kevent_fb_data(OPPO_MM_DIRVER_FB_EVENT_MODULE_DISPLAY,payload);
|
||||
}
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
SDE_DBG_DUMP("dsi_dbg_bus", "panic");
|
||||
}
|
||||
|
||||
@@ -692,7 +720,12 @@ static int _sde_encoder_phys_cmd_poll_write_pointer_started(
|
||||
phys_enc->hw_intf->idx - INTF_0,
|
||||
timeout_us,
|
||||
ret);
|
||||
#ifndef OPLUS_BUG_STABILITY
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2018-12-18 fix crash when unplug screen*/
|
||||
SDE_DBG_DUMP("all", "dbg_bus", "vbif_dbg_bus", "panic");
|
||||
#else /* OPLUS_BUG_STABILITY */
|
||||
SDE_DBG_DUMP("all", "dbg_bus", "vbif_dbg_bus");
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
}
|
||||
|
||||
end:
|
||||
|
||||
@@ -1004,6 +1004,7 @@ struct sde_reg_dma_cfg {
|
||||
SDE_HW_BLK_INFO;
|
||||
u32 version;
|
||||
u32 trigger_sel_off;
|
||||
u32 broadcast_disabled;
|
||||
u32 xin_id;
|
||||
u32 vbif_idx;
|
||||
enum sde_clk_ctrl_type clk_ctrl;
|
||||
|
||||
@@ -146,6 +146,14 @@ static void sde_hw_dsc_config_thresh(struct sde_hw_dsc *hw_dsc,
|
||||
struct sde_hw_blk_reg_map *dsc_c = &hw_dsc->hw;
|
||||
u32 off = 0x0;
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Stable,2019-04-18 sync NULL pointer fix from oneplus */
|
||||
if (!dsc->buf_thresh) {
|
||||
SDE_ERROR("dsc->buf_thresh is NULL pointer");
|
||||
return;
|
||||
}
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
lp = dsc->buf_thresh;
|
||||
off = DSC_RC_BUF_THRESH;
|
||||
for (i = 0; i < 14; i++) {
|
||||
|
||||
@@ -545,6 +545,8 @@ struct sde_hw_cp_cfg {
|
||||
void *mixer_info;
|
||||
u32 displayv;
|
||||
u32 displayh;
|
||||
struct sde_hw_dspp *dspp[DSPP_MAX];
|
||||
bool broadcast_disabled;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
#include "sde_hw_pingpong.h"
|
||||
#include "sde_dbg.h"
|
||||
#include "sde_kms.h"
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Mark.Yao@PSW.MM.Display.LCD.Feature,2019-07-25 add for aod function */
|
||||
#include "oppo_dsi_support.h"
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
#define PP_TEAR_CHECK_EN 0x000
|
||||
#define PP_SYNC_CONFIG_VSYNC 0x004
|
||||
@@ -163,6 +167,12 @@ static struct sde_pingpong_cfg *_pingpong_offset(enum sde_pingpong pp,
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Gou shengjun@PSW.MM.Display.Lcd.Stability,2018/11/21
|
||||
* For solve te sync issue at doze
|
||||
*/
|
||||
extern int oppo_request_power_status;
|
||||
#endif /*OPLUS_BUG_STABILITY*/
|
||||
static int sde_hw_pp_setup_te_config(struct sde_hw_pingpong *pp,
|
||||
struct sde_hw_tear_check *te)
|
||||
{
|
||||
@@ -177,7 +187,22 @@ static int sde_hw_pp_setup_te_config(struct sde_hw_pingpong *pp,
|
||||
if (te->hw_vsync_mode)
|
||||
cfg |= BIT(20);
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@PSW.MM.Display.Lcd.Stability,2018/11/21
|
||||
* For solve te sync issue at doze
|
||||
*/
|
||||
{
|
||||
int temp_vclks_line = te->vsync_count;
|
||||
|
||||
if((oppo_request_power_status == OPPO_DISPLAY_POWER_DOZE) || (oppo_request_power_status == OPPO_DISPLAY_POWER_DOZE_SUSPEND)) {
|
||||
temp_vclks_line = temp_vclks_line * 60 * 100 / 3000;
|
||||
}
|
||||
cfg |= temp_vclks_line;
|
||||
}
|
||||
#else /*OPLUS_BUG_STABILITY*/
|
||||
cfg |= te->vsync_count;
|
||||
#endif /*OPLUS_BUG_STABILITY*/
|
||||
|
||||
|
||||
SDE_REG_WRITE(c, PP_SYNC_CONFIG_VSYNC, cfg);
|
||||
SDE_REG_WRITE(c, PP_SYNC_CONFIG_HEIGHT, te->sync_cfg_height);
|
||||
|
||||
@@ -50,6 +50,14 @@
|
||||
#include <soc/qcom/scm.h>
|
||||
#include "soc/qcom/secure_buffer.h"
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@MM.Display.LCD.Stability, 2020/3/31, for
|
||||
* decoupling display driver
|
||||
*/
|
||||
#include "oppo_display_private_api.h"
|
||||
#include "oppo_onscreenfingerprint.h"
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include "sde_trace.h"
|
||||
|
||||
@@ -1377,7 +1385,14 @@ static int _sde_kms_setup_displays(struct drm_device *dev,
|
||||
.soft_reset = dsi_display_soft_reset,
|
||||
.pre_kickoff = dsi_conn_pre_kickoff,
|
||||
.clk_ctrl = dsi_display_clk_ctrl,
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@MM.Display.LCD.Stability, 2020/3/31, for
|
||||
* decoupling display driver
|
||||
*/
|
||||
.set_power = dsi_display_oppo_set_power,
|
||||
#else
|
||||
.set_power = dsi_display_set_power,
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
.get_mode_info = dsi_conn_get_mode_info,
|
||||
.get_dst_format = dsi_display_get_dst_format,
|
||||
.post_kickoff = dsi_conn_post_kickoff,
|
||||
|
||||
@@ -3976,6 +3976,12 @@ static int sde_plane_sspp_atomic_update(struct drm_plane *plane,
|
||||
case PLANE_PROP_ALPHA:
|
||||
case PLANE_PROP_INPUT_FENCE:
|
||||
case PLANE_PROP_BLEND_OP:
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@PSW.MM.Display.LCD.Feature,2018-11-21
|
||||
* Support custom property
|
||||
*/
|
||||
case PLANE_PROP_CUSTOM:
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
/* no special action required */
|
||||
break;
|
||||
case PLANE_PROP_FB_TRANSLATION_MODE:
|
||||
@@ -4417,6 +4423,13 @@ static void _sde_plane_install_properties(struct drm_plane *plane,
|
||||
|
||||
msm_property_install_range(&psde->property_info, "zpos",
|
||||
0x0, 0, zpos_max, zpos_def, PLANE_PROP_ZPOS);
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* Sachin Shukla@PSW.MM.Display.LCD.Feature,2018-11-21
|
||||
* Support custom propertys
|
||||
*/
|
||||
msm_property_install_range(&psde->property_info,"PLANE_CUST",
|
||||
0x0, 0, INT_MAX, 0, PLANE_PROP_CUSTOM);
|
||||
#endif
|
||||
|
||||
msm_property_install_range(&psde->property_info, "alpha",
|
||||
0x0, 0, 255, 255, PLANE_PROP_ALPHA);
|
||||
|
||||
@@ -158,6 +158,10 @@ struct sde_plane_state {
|
||||
bool const_alpha_en;
|
||||
bool pending;
|
||||
bool defer_prepare_fb;
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/*Sachin Shukla@PSW.MM.Display.LCD.Stable,2019-01-12 add is_skip check */
|
||||
bool is_skip;
|
||||
#endif /* OPLUS_BUG_STABILITY */
|
||||
uint32_t pipe_order_flags;
|
||||
|
||||
/* scaler configuration */
|
||||
|
||||
@@ -57,3 +57,6 @@ msm_adreno-objs = $(msm_adreno-y)
|
||||
|
||||
obj-$(CONFIG_QCOM_KGSL) += msm_kgsl_core.o
|
||||
obj-$(CONFIG_QCOM_KGSL) += msm_adreno.o
|
||||
#if defined(OPLUS_FEATURE_VIRTUAL_RESERVE_MEMORY) && defined(CONFIG_VIRTUAL_RESERVE_MEMORY)
|
||||
obj-$(CONFIG_VIRTUAL_RESERVE_MEMORY) += kgsl_reserved_area.o
|
||||
#endif /*defined(OPLUS_FEATURE_VIRTUAL_RESERVE_MEMORY) && defined(CONFIG_VIRTUAL_RESERVE_MEMORY)*/
|
||||
|
||||
@@ -946,12 +946,9 @@ static int a6xx_gmu_wait_for_lowest_idle(struct adreno_device *adreno_dev)
|
||||
|
||||
/* Collect abort data to help with debugging */
|
||||
gmu_core_regread(device, A6XX_GPU_GMU_AO_GPU_CX_BUSY_STATUS, ®2);
|
||||
kgsl_regread(device, A6XX_CP_STATUS_1, ®3);
|
||||
gmu_core_regread(device, A6XX_GMU_RBBM_INT_UNMASKED_STATUS, ®4);
|
||||
gmu_core_regread(device, A6XX_GMU_GMU_PWR_COL_KEEPALIVE, ®5);
|
||||
kgsl_regread(device, A6XX_CP_CP2GMU_STATUS, ®6);
|
||||
kgsl_regread(device, A6XX_CP_CONTEXT_SWITCH_CNTL, ®7);
|
||||
gmu_core_regread(device, A6XX_GMU_AO_SPARE_CNTL, ®8);
|
||||
gmu_core_regread(device, A6XX_GMU_RBBM_INT_UNMASKED_STATUS, ®3);
|
||||
gmu_core_regread(device, A6XX_GMU_GMU_PWR_COL_KEEPALIVE, ®4);
|
||||
gmu_core_regread(device, A6XX_GMU_AO_SPARE_CNTL, ®5);
|
||||
|
||||
dev_err(&gmu->pdev->dev,
|
||||
"----------------------[ GMU error ]----------------------\n");
|
||||
@@ -961,14 +958,23 @@ static int a6xx_gmu_wait_for_lowest_idle(struct adreno_device *adreno_dev)
|
||||
"Timestamps: %llx %llx %llx\n", ts1, ts2, ts3);
|
||||
dev_err(&gmu->pdev->dev,
|
||||
"RPMH_POWER_STATE=%x SPTPRAC_PWR_CLK_STATUS=%x\n", reg, reg1);
|
||||
dev_err(&gmu->pdev->dev,
|
||||
"CX_BUSY_STATUS=%x CP_STATUS_1=%x\n", reg2, reg3);
|
||||
dev_err(&gmu->pdev->dev, "CX_BUSY_STATUS=%x\n", reg2);
|
||||
dev_err(&gmu->pdev->dev,
|
||||
"RBBM_INT_UNMASKED_STATUS=%x PWR_COL_KEEPALIVE=%x\n",
|
||||
reg4, reg5);
|
||||
dev_err(&gmu->pdev->dev,
|
||||
"CP2GMU_STATUS=%x CONTEXT_SWITCH_CNTL=%x AO_SPARE_CNTL=%x\n",
|
||||
reg6, reg7, reg8);
|
||||
reg3, reg4);
|
||||
dev_err(&gmu->pdev->dev, "A6XX_GMU_AO_SPARE_CNTL=%x\n", reg5);
|
||||
|
||||
/* Access GX registers only when GX is ON */
|
||||
if (is_on(reg1)) {
|
||||
kgsl_regread(device, A6XX_CP_STATUS_1, ®6);
|
||||
kgsl_regread(device, A6XX_CP_CP2GMU_STATUS, ®7);
|
||||
kgsl_regread(device, A6XX_CP_CONTEXT_SWITCH_CNTL, ®8);
|
||||
|
||||
dev_err(&gmu->pdev->dev, "A6XX_CP_STATUS_1=%x\n", reg6);
|
||||
dev_err(&gmu->pdev->dev,
|
||||
"CP2GMU_STATUS=%x CONTEXT_SWITCH_CNTL=%x\n",
|
||||
reg7, reg8);
|
||||
}
|
||||
|
||||
WARN_ON(1);
|
||||
return -ETIMEDOUT;
|
||||
|
||||
@@ -2182,6 +2182,10 @@ static int dispatcher_do_fault(struct adreno_device *adreno_dev)
|
||||
if (gx_on)
|
||||
adreno_readreg64(adreno_dev, ADRENO_REG_CP_RB_BASE,
|
||||
ADRENO_REG_CP_RB_BASE_HI, &base);
|
||||
#if defined(OPLUS_FEATURE_GPU_MINIDUMP)
|
||||
// MeiDongting@MULTIMEIDA.FEATURE.GPU.MINIDUMP, 2020/04/06, Add for OPPO gpu mini dump
|
||||
device->snapshotfault = fault;
|
||||
#endif /*OPLUS_FEATURE_GPU_MINIDUMP*/
|
||||
|
||||
/*
|
||||
* Force the CP off for anything but a hard fault to make sure it is
|
||||
|
||||
@@ -35,6 +35,12 @@
|
||||
#include <asm/cacheflush.h>
|
||||
#include <uapi/linux/sched/types.h>
|
||||
#include <soc/qcom/boot_stats.h>
|
||||
#if defined(OPLUS_FEATURE_VIRTUAL_RESERVE_MEMORY) && defined(CONFIG_VIRTUAL_RESERVE_MEMORY)
|
||||
/*
|
||||
* collect reserve vma use count
|
||||
*/
|
||||
#include "kgsl_reserved_area.h"
|
||||
#endif
|
||||
|
||||
#include "kgsl.h"
|
||||
#include "kgsl_debugfs.h"
|
||||
@@ -4538,13 +4544,29 @@ static unsigned long _gpu_find_svm(struct kgsl_process_private *private,
|
||||
}
|
||||
|
||||
/* Search top down in the CPU VM region for a free address */
|
||||
#if defined(OPLUS_FEATURE_VIRTUAL_RESERVE_MEMORY) && defined(CONFIG_VIRTUAL_RESERVE_MEMORY)
|
||||
/*
|
||||
* get the unmap area from resrved area
|
||||
*/
|
||||
static unsigned long _cpu_get_unmapped_area(unsigned long bottom,
|
||||
unsigned long top, unsigned long len, unsigned long align,
|
||||
unsigned long mmap_flags)
|
||||
#else
|
||||
static unsigned long _cpu_get_unmapped_area(unsigned long bottom,
|
||||
unsigned long top, unsigned long len, unsigned long align)
|
||||
#endif
|
||||
{
|
||||
struct vm_unmapped_area_info info;
|
||||
unsigned long addr, err;
|
||||
|
||||
#if defined(OPLUS_FEATURE_VIRTUAL_RESERVE_MEMORY) && defined(CONFIG_VIRTUAL_RESERVE_MEMORY)
|
||||
/*
|
||||
* get the unmap area from resrved area
|
||||
*/
|
||||
info.flags = VM_UNMAPPED_AREA_TOPDOWN|mmap_flags;
|
||||
#else
|
||||
info.flags = VM_UNMAPPED_AREA_TOPDOWN;
|
||||
#endif
|
||||
info.low_limit = bottom;
|
||||
info.high_limit = top;
|
||||
info.length = len;
|
||||
@@ -4560,17 +4582,32 @@ static unsigned long _cpu_get_unmapped_area(unsigned long bottom,
|
||||
return err ? err : addr;
|
||||
}
|
||||
|
||||
#if defined(OPLUS_FEATURE_VIRTUAL_RESERVE_MEMORY) && defined(CONFIG_VIRTUAL_RESERVE_MEMORY)
|
||||
/*
|
||||
* get unmaped area from normal or reserved vma, decide by mmap_flags
|
||||
*/
|
||||
static unsigned long _search_range(struct kgsl_process_private *private,
|
||||
struct kgsl_mem_entry *entry,
|
||||
unsigned long start, unsigned long end,
|
||||
unsigned long len, uint64_t align, unsigned long mmap_flags)
|
||||
#else
|
||||
static unsigned long _search_range(struct kgsl_process_private *private,
|
||||
struct kgsl_mem_entry *entry,
|
||||
unsigned long start, unsigned long end,
|
||||
unsigned long len, uint64_t align)
|
||||
#endif
|
||||
{
|
||||
unsigned long cpu, gpu = end, result = -ENOMEM;
|
||||
|
||||
while (gpu > start) {
|
||||
/* find a new empty spot on the CPU below the last one */
|
||||
#if defined(OPLUS_FEATURE_VIRTUAL_RESERVE_MEMORY) && defined(CONFIG_VIRTUAL_RESERVE_MEMORY)
|
||||
cpu = _cpu_get_unmapped_area(start, gpu, len,
|
||||
(unsigned long) align, mmap_flags);
|
||||
#else
|
||||
cpu = _cpu_get_unmapped_area(start, gpu, len,
|
||||
(unsigned long) align);
|
||||
#endif
|
||||
if (IS_ERR_VALUE(cpu)) {
|
||||
result = cpu;
|
||||
break;
|
||||
@@ -4674,6 +4711,13 @@ static unsigned long _get_svm_area(struct kgsl_process_private *private,
|
||||
|
||||
vma = find_vma(current->mm, addr);
|
||||
|
||||
#if defined(OPLUS_FEATURE_VIRTUAL_RESERVE_MEMORY) && defined(CONFIG_VIRTUAL_RESERVE_MEMORY)
|
||||
/*
|
||||
* while vma is NULL, check whether the addr is valid in
|
||||
* reserve area or not.
|
||||
*/
|
||||
try_reserved_region(vma, addr, len, private, entry, result);
|
||||
#else
|
||||
if (vma == NULL || ((addr + len) <= vma->vm_start)) {
|
||||
result = _gpu_set_svm_region(private, entry, addr, len);
|
||||
|
||||
@@ -4681,6 +4725,7 @@ static unsigned long _get_svm_area(struct kgsl_process_private *private,
|
||||
if (!IS_ERR_VALUE(result))
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
/* no hint, start search at the top and work down */
|
||||
addr = end & ~(align - 1);
|
||||
@@ -4690,9 +4735,16 @@ static unsigned long _get_svm_area(struct kgsl_process_private *private,
|
||||
* Search downwards from the hint first. If that fails we
|
||||
* must try to search above it.
|
||||
*/
|
||||
#if defined(OPLUS_FEATURE_VIRTUAL_RESERVE_MEMORY) && defined(CONFIG_VIRTUAL_RESERVE_MEMORY)
|
||||
/*
|
||||
* try to get unmap area from reserved area
|
||||
*/
|
||||
result = kgsl_search_range(private, entry, start, end, addr, len, align, hint, _search_range);
|
||||
#else
|
||||
result = _search_range(private, entry, start, addr, len, align);
|
||||
if (IS_ERR_VALUE(result) && hint != 0)
|
||||
result = _search_range(private, entry, addr, end, len, align);
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -4737,6 +4789,12 @@ kgsl_get_unmapped_area(struct file *file, unsigned long addr,
|
||||
pid_nr(private->pid),
|
||||
current->mm->mmap_base, addr,
|
||||
pgoff, len, (int) val);
|
||||
#if defined(OPLUS_FEATURE_VIRTUAL_RESERVE_MEMORY) && defined(CONFIG_VIRTUAL_RESERVE_MEMORY)
|
||||
/*
|
||||
* record the process pid and svm_oom happend jiffies
|
||||
*/
|
||||
record_svm_oom_info(val);
|
||||
#endif
|
||||
}
|
||||
|
||||
put:
|
||||
|
||||
@@ -341,6 +341,11 @@ struct kgsl_device {
|
||||
unsigned int num_l3_pwrlevels;
|
||||
/* store current L3 vote to determine if we should change our vote */
|
||||
unsigned int cur_l3_pwrlevel;
|
||||
#if defined(OPLUS_FEATURE_GPU_MINIDUMP)
|
||||
// MeiDongting@MULTIMEIDA.FEATURE.GPU.MINIDUMP, 2020/04/06, Add for OPPO gpu mini dump
|
||||
bool snapshot_control;
|
||||
int snapshotfault;
|
||||
#endif /* OPLUS_FEATURE_GPU_MINIDUMP */
|
||||
};
|
||||
|
||||
#define KGSL_MMU_DEVICE(_mmu) \
|
||||
@@ -546,6 +551,10 @@ struct kgsl_snapshot {
|
||||
bool first_read;
|
||||
bool gmu_fault;
|
||||
bool recovered;
|
||||
#if defined(OPLUS_FEATURE_GPU_MINIDUMP)
|
||||
// MeiDongting@MULTIMEIDA.FEATURE.GPU.MINIDUMP, 2020/04/06, Add for OPPO gpu mini dump
|
||||
char snapshot_hashid[96];
|
||||
#endif /* OPLUS_FEATURE_GPU_MINIDUMP */
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -287,6 +287,10 @@ int kgsl_add_event(struct kgsl_device *device, struct kgsl_event_group *group,
|
||||
event->group = group;
|
||||
|
||||
INIT_WORK(&event->work, _kgsl_event_worker);
|
||||
#ifdef OPLUS_FEATURE_UIFIRST
|
||||
// caichen@TECH.Kernel.Sched, 2020/05/28, add for uifirst wq
|
||||
set_uxwork(&event->work);
|
||||
#endif
|
||||
|
||||
trace_kgsl_register_event(KGSL_CONTEXT_ID(context), timestamp, func);
|
||||
|
||||
|
||||
@@ -24,6 +24,12 @@
|
||||
#include <soc/qcom/scm.h>
|
||||
#include <soc/qcom/secure_buffer.h>
|
||||
#include <linux/compat.h>
|
||||
#if defined(OPLUS_FEATURE_VIRTUAL_RESERVE_MEMORY) && defined(CONFIG_VIRTUAL_RESERVE_MEMORY)
|
||||
/*
|
||||
* record the gpu highest addr
|
||||
*/
|
||||
#include <linux/resmap_account.h>
|
||||
#endif
|
||||
|
||||
#include "kgsl.h"
|
||||
#include "kgsl_device.h"
|
||||
@@ -1107,6 +1113,14 @@ static void setup_64bit_pagetable(struct kgsl_mmu *mmu,
|
||||
pt->compat_va_end = mmu->secure_base;
|
||||
pt->va_start = KGSL_IOMMU_VA_BASE64;
|
||||
pt->va_end = KGSL_IOMMU_VA_END64;
|
||||
|
||||
#if defined(OPLUS_FEATURE_VIRTUAL_RESERVE_MEMORY) && defined(CONFIG_VIRTUAL_RESERVE_MEMORY)
|
||||
/*
|
||||
* record the high limit of gpu mmap_base, used for create
|
||||
* reserved area
|
||||
*/
|
||||
gpu_compat_high_limit_addr = pt->compat_va_end;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (pagetable->name != KGSL_MMU_GLOBAL_PT &&
|
||||
|
||||
@@ -303,6 +303,14 @@ void kgsl_process_init_sysfs(struct kgsl_device *device,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef OPLUS_FEATURE_HEALTHINFO
|
||||
//Jiheng.Xie@TECH.BSP.Performance, 2019-07-22, add for gpu total used account
|
||||
unsigned long gpu_total(void)
|
||||
{
|
||||
return (unsigned long)atomic_long_read(&kgsl_driver.stats.page_alloc);
|
||||
}
|
||||
#endif /* OPLUS_FEATURE_HEALTHINFO */
|
||||
|
||||
static ssize_t kgsl_drv_memstat_show(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
|
||||
@@ -627,6 +627,48 @@ static void kgsl_free_snapshot(struct kgsl_snapshot *snapshot)
|
||||
KGSL_CORE_ERR("snapshot: objects released\n");
|
||||
}
|
||||
|
||||
#if defined(OPLUS_FEATURE_GPU_MINIDUMP)
|
||||
// MeiDongting@MULTIMEIDA.FEATURE.GPU.MINIDUMP, 2020/04/06, Add for OPPO gpu mini dump
|
||||
|
||||
/************************************************
|
||||
adreno.h
|
||||
#define ADRENO_SOFT_FAULT BIT(0)
|
||||
#define ADRENO_HARD_FAULT BIT(1)
|
||||
#define ADRENO_TIMEOUT_FAULT BIT(2)
|
||||
#define ADRENO_IOMMU_PAGE_FAULT BIT(3)
|
||||
#define ADRENO_PREEMPT_FAULT BIT(4)
|
||||
#define ADRENO_GMU_FAULT BIT(5)
|
||||
#define ADRENO_CTX_DETATCH_TIMEOUT_FAULT BIT(6)
|
||||
#define ADRENO_GMU_FAULT_SKIP_SNAPSHOT BIT(7)
|
||||
*************************************************/
|
||||
char* kgsl_get_reason(int faulttype, bool gmu_fault){
|
||||
if(gmu_fault){
|
||||
return "GMUFAULT";
|
||||
}else{
|
||||
switch(faulttype){
|
||||
case 0:
|
||||
return "SOFTFAULT";
|
||||
case 1:
|
||||
return "HANGFAULT";
|
||||
case 2:
|
||||
return "TIMEOUTFAULT";
|
||||
case 3:
|
||||
return "IOMMUPAGEFAULT";
|
||||
case 4:
|
||||
return "PREEMPTFAULT";
|
||||
case 5:
|
||||
return "GMUFAULT";
|
||||
case 6:
|
||||
return "CTXDETATCHFAULT";
|
||||
case 7:
|
||||
return "GMUSKIPFAULT";
|
||||
default:
|
||||
return "UNKNOW";
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /*OPLUS_FEATURE_GPU_MINIDUMP*/
|
||||
|
||||
/**
|
||||
* kgsl_snapshot() - construct a device snapshot
|
||||
* @device: device to snapshot
|
||||
@@ -740,6 +782,17 @@ void kgsl_device_snapshot(struct kgsl_device *device,
|
||||
pa = __pa(device->snapshot_memory.ptr);
|
||||
KGSL_DRV_ERR(device, "%s snapshot created at pa %pa++0x%zx\n",
|
||||
gmu_fault ? "GMU" : "GPU", &pa, snapshot->size);
|
||||
#if defined(OPLUS_FEATURE_GPU_MINIDUMP)
|
||||
// MeiDongting@MULTIMEIDA.FEATURE.GPU.MINIDUMP, 2020/04/06, Add for OPPO gpu mini dump
|
||||
if(context!= NULL){
|
||||
dev_err(device->dev, "falut=%s, pid=%d, processname=%s\n",
|
||||
kgsl_get_reason(device->snapshotfault, gmu_fault), context->proc_priv->pid, context->proc_priv->comm);
|
||||
|
||||
memset(snapshot->snapshot_hashid, '\0', sizeof(snapshot->snapshot_hashid));
|
||||
scnprintf(snapshot->snapshot_hashid, sizeof(snapshot->snapshot_hashid), "%d@%s@%s",
|
||||
context->proc_priv->pid, context->proc_priv->comm, kgsl_get_reason(device->snapshotfault, gmu_fault));
|
||||
}
|
||||
#endif /* OPLUS_FEATURE_GPU_MINIDUMP */
|
||||
|
||||
sysfs_notify(&device->snapshot_kobj, NULL, "timestamp");
|
||||
|
||||
@@ -817,6 +870,42 @@ static int snapshot_release(struct kgsl_device *device,
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if defined(OPLUS_FEATURE_GPU_MINIDUMP)
|
||||
// MeiDongting@MULTIMEIDA.FEATURE.GPU.MINIDUMP, 2020/04/06, Add for OPPO gpu mini dump
|
||||
static bool snapshot_ontrol_on = 0;
|
||||
|
||||
static ssize_t snapshot_control_show(struct kgsl_device *device, char *buf)
|
||||
{
|
||||
return snprintf(buf, PAGE_SIZE, "%d\n", device->snapshot_control);
|
||||
}
|
||||
|
||||
static ssize_t snapshot_control_store(struct kgsl_device *device, const char *buf,
|
||||
size_t count)
|
||||
{
|
||||
unsigned int val = 0;
|
||||
int ret;
|
||||
|
||||
if (device && count > 0)
|
||||
device->snapshot_control = 0;
|
||||
|
||||
ret = kgsl_sysfs_store(buf, &val);
|
||||
|
||||
if (!ret && device){
|
||||
device->snapshot_control = (bool)val;
|
||||
snapshot_ontrol_on = device->snapshot_control;
|
||||
}
|
||||
|
||||
return (ssize_t) ret < 0 ? ret : count;
|
||||
}
|
||||
|
||||
static ssize_t snapshot_hashid_show(struct kgsl_device *device, char *buf)
|
||||
{
|
||||
if(device->snapshot == NULL)
|
||||
return 0;
|
||||
return strlcpy(buf, device->snapshot->snapshot_hashid, PAGE_SIZE);
|
||||
}
|
||||
#endif /*OPLUS_FEATURE_GPU_MINIDUMP*/
|
||||
|
||||
/* Dump the sysfs binary data to the user */
|
||||
static ssize_t snapshot_show(struct file *filep, struct kobject *kobj,
|
||||
struct bin_attribute *attr, char *buf, loff_t off,
|
||||
@@ -831,6 +920,14 @@ static ssize_t snapshot_show(struct file *filep, struct kobject *kobj,
|
||||
if (device == NULL)
|
||||
return 0;
|
||||
|
||||
#if defined(OPLUS_FEATURE_GPU_MINIDUMP)
|
||||
// MeiDongting@MULTIMEIDA.FEATURE.GPU.MINIDUMP, 2020/04/06, Add for OPPO gpu mini dump
|
||||
if (snapshot_ontrol_on) {
|
||||
dev_err(device->dev, "snapshot: snapshot_ontrol_on is true, skip snapshot\n");
|
||||
return 0;
|
||||
}
|
||||
#endif /* OPLUS_FEATURE_GPU_MINIDUMP */
|
||||
|
||||
mutex_lock(&device->mutex);
|
||||
snapshot = device->snapshot;
|
||||
if (snapshot != NULL) {
|
||||
@@ -1058,6 +1155,12 @@ static SNAPSHOT_ATTR(snapshot_crashdumper, 0644, snapshot_crashdumper_show,
|
||||
static SNAPSHOT_ATTR(snapshot_legacy, 0644, snapshot_legacy_show,
|
||||
snapshot_legacy_store);
|
||||
|
||||
#if defined(OPLUS_FEATURE_GPU_MINIDUMP)
|
||||
// MeiDongting@MULTIMEIDA.FEATURE.GPU.MINIDUMP, 2020/04/06, Add for OPPO gpu mini dump
|
||||
static SNAPSHOT_ATTR(snapshot_hashid, 0666, snapshot_hashid_show, NULL);
|
||||
static SNAPSHOT_ATTR(snapshot_control, 0666, snapshot_control_show, snapshot_control_store);
|
||||
#endif /* OPLUS_FEATURE_GPU_MINIDUMP */
|
||||
|
||||
static ssize_t snapshot_sysfs_show(struct kobject *kobj,
|
||||
struct attribute *attr, char *buf)
|
||||
{
|
||||
@@ -1139,6 +1242,10 @@ int kgsl_device_snapshot_init(struct kgsl_device *device)
|
||||
device->force_panic = 0;
|
||||
device->snapshot_crashdumper = 1;
|
||||
device->snapshot_legacy = 0;
|
||||
#if defined(OPLUS_FEATURE_GPU_MINIDUMP)
|
||||
// MeiDongting@MULTIMEIDA.FEATURE.GPU.MINIDUMP, 2020/04/06, Add for OPPO gpu mini dump
|
||||
device->snapshot_control = 0;
|
||||
#endif /* OPLUS_FEATURE_GPU_MINIDUMP */
|
||||
|
||||
/*
|
||||
* Set this to false so that we only ever keep the first snapshot around
|
||||
@@ -1181,6 +1288,16 @@ int kgsl_device_snapshot_init(struct kgsl_device *device)
|
||||
|
||||
ret = sysfs_create_file(&device->snapshot_kobj,
|
||||
&attr_snapshot_legacy.attr);
|
||||
#if defined(OPLUS_FEATURE_GPU_MINIDUMP)
|
||||
// MeiDongting@MULTIMEIDA.FEATURE.GPU.MINIDUMP, 2020/04/06, Add for OPPO gpu mini dump
|
||||
ret = sysfs_create_file(&device->snapshot_kobj, &attr_snapshot_hashid.attr);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = sysfs_create_file(&device->snapshot_kobj, &attr_snapshot_control.attr);
|
||||
if (ret)
|
||||
return ret;
|
||||
#endif /* OPLUS_FEATURE_GPU_MINIDUMP */
|
||||
|
||||
done:
|
||||
return ret;
|
||||
@@ -1208,6 +1325,10 @@ void kgsl_device_snapshot_close(struct kgsl_device *device)
|
||||
device->snapshot_faultcount = 0;
|
||||
device->force_panic = 0;
|
||||
device->snapshot_crashdumper = 1;
|
||||
#if defined(OPLUS_FEATURE_GPU_MINIDUMP)
|
||||
// MeiDongting@MULTIMEIDA.FEATURE.GPU.MINIDUMP, 2020/04/06, Add for OPPO gpu mini dump
|
||||
device->snapshot_control = 0;
|
||||
#endif /* OPLUS_FEATURE_GPU_MINIDUMP */
|
||||
}
|
||||
EXPORT_SYMBOL(kgsl_device_snapshot_close);
|
||||
|
||||
|
||||
@@ -933,4 +933,9 @@ config XILINX_XADC
|
||||
The driver can also be build as a module. If so, the module will be called
|
||||
xilinx-xadc.
|
||||
|
||||
config OPLUS_SM8150R_CHARGER
|
||||
tristate "OPPO SM8150 charger driver"
|
||||
depends on MFD_SPMI_PMIC
|
||||
help
|
||||
Enables support for the oppo charging framework
|
||||
endmenu
|
||||
|
||||
@@ -735,24 +735,54 @@ static const struct adc_channels adc_chans_pmic5[ADC_MAX_CHANNEL] = {
|
||||
SCALE_HW_CALIB_DEFAULT)
|
||||
[ADC_MID_CHG_DIV6] = ADC_CHAN_VOLT("chg_mid_chg", 6,
|
||||
SCALE_HW_CALIB_DEFAULT)
|
||||
#ifdef CONFIG_OPLUS_SM8150R_CHARGER
|
||||
/* Charger ID detect */
|
||||
[ADC_GPIO3] = ADC_CHAN_VOLT("chgID_voltage_adc", 1,
|
||||
SCALE_HW_CALIB_DEFAULT)
|
||||
#endif
|
||||
[ADC_XO_THERM_PU2] = ADC_CHAN_TEMP("xo_therm", 1,
|
||||
SCALE_HW_CALIB_XOTHERM)
|
||||
#ifdef OPLUS_FEATURE_CHG_BASIC
|
||||
[ADC_BAT_THERM_PU2] = ADC_CHAN_TEMP("bat_therm_pu2", 1,
|
||||
SCALE_HW_CALIB_DEFAULT)
|
||||
[ADC_BAT_THERM_PU1] = ADC_CHAN_TEMP("bat_therm_pu1", 1,
|
||||
SCALE_HW_CALIB_DEFAULT)
|
||||
#else
|
||||
[ADC_BAT_THERM_PU2] = ADC_CHAN_TEMP("bat_therm_pu2", 1,
|
||||
SCALE_HW_CALIB_BATT_THERM_100K)
|
||||
[ADC_BAT_THERM_PU1] = ADC_CHAN_TEMP("bat_therm_pu1", 1,
|
||||
SCALE_HW_CALIB_BATT_THERM_30K)
|
||||
#endif /*OPLUS_FEATURE_CHG_BASIC*/
|
||||
[ADC_BAT_THERM_PU3] = ADC_CHAN_TEMP("bat_therm_pu3", 1,
|
||||
SCALE_HW_CALIB_BATT_THERM_400K)
|
||||
[ADC_BAT_ID_PU2] = ADC_CHAN_TEMP("bat_id", 1,
|
||||
SCALE_HW_CALIB_DEFAULT)
|
||||
[ADC_AMUX_THM1_PU2] = ADC_CHAN_TEMP("amux_thm1_pu2", 1,
|
||||
SCALE_HW_CALIB_THERM_100K_PULLUP)
|
||||
#ifdef VENDOR_EDIT
|
||||
/*lizhijie@BSP.CHG.Basic 2020/02/05 lzj add for usbtemp*/
|
||||
[ADC_AMUX_THM2_PU2] = ADC_CHAN_TEMP("amux_thm2_pu2", 1,
|
||||
SCALE_HW_CALIB_THERM_100K_PULLUP)
|
||||
#ifdef CONFIG_OPLUS_SM8150R_CHARGER /* tongfeng.huang@BSP.CHG.Basic, 2019/01/16, for pm8150b gpio1 adc */
|
||||
[ADC_AMUX_THM3_PU2] = ADC_CHAN_VOLT("amux_thm3_pu2", 1,
|
||||
SCALE_HW_CALIB_DEFAULT)
|
||||
#else
|
||||
[ADC_AMUX_THM3_PU2] = ADC_CHAN_TEMP("amux_thm3_pu2", 1,
|
||||
SCALE_HW_CALIB_THERM_100K_PULLUP)
|
||||
[ADC_AMUX_THM4_PU2] = ADC_CHAN_TEMP("amux_thm4_pu2", 1,
|
||||
#endif
|
||||
#else
|
||||
[ADC_AMUX_THM2_PU2] = ADC_CHAN_VOLT("amux_thm2_pu2", 1,
|
||||
SCALE_HW_CALIB_DEFAULT)
|
||||
[ADC_AMUX_THM3_PU2] = ADC_CHAN_VOLT("amux_thm3_pu2", 1,
|
||||
SCALE_HW_CALIB_DEFAULT)
|
||||
#endif /*VENDOR_EDIT*/
|
||||
#ifdef CONFIG_OPLUS_SM8150R_CHARGER /* tongfeng.huang@BSP.CHG.Basic, 2019/01/16, for pm8150b gpio1 adc */
|
||||
[ADC_AMUX_THM4_PU2] = ADC_CHAN_VOLT("amux_thm4_pu2", 1,
|
||||
SCALE_HW_CALIB_DEFAULT)
|
||||
#else
|
||||
[ADC_AMUX_THM4_PU2] = ADC_CHAN_TEMP("amux_thm4_pu2", 1,
|
||||
SCALE_HW_CALIB_THERM_100K_PULLUP)
|
||||
#endif
|
||||
[ADC_INT_EXT_ISENSE_VBAT_VDATA] = ADC_CHAN_POWER("int_ext_isense", 1,
|
||||
SCALE_HW_CALIB_CUR)
|
||||
[ADC_EXT_ISENSE_VBAT_VDATA] = ADC_CHAN_POWER("ext_isense", 1,
|
||||
@@ -765,12 +795,48 @@ static const struct adc_channels adc_chans_pmic5[ADC_MAX_CHANNEL] = {
|
||||
SCALE_HW_CALIB_PM5_SMB_TEMP)
|
||||
[ADC_GPIO1_PU2] = ADC_CHAN_TEMP("gpio1_pu2", 1,
|
||||
SCALE_HW_CALIB_THERM_100K_PULLUP)
|
||||
#ifdef CONFIG_OPLUS_SM8150R_CHARGER/*for usbtemp*/
|
||||
[ADC_GPIO2_PU2] = ADC_CHAN_VOLT("gpio2_pu2", 1,
|
||||
SCALE_HW_CALIB_DEFAULT)
|
||||
#else
|
||||
[ADC_GPIO2_PU2] = ADC_CHAN_TEMP("gpio2_pu2", 1,
|
||||
SCALE_HW_CALIB_THERM_100K_PULLUP)
|
||||
#endif
|
||||
[ADC_GPIO3_PU2] = ADC_CHAN_TEMP("gpio3_pu2", 1,
|
||||
SCALE_HW_CALIB_THERM_100K_PULLUP)
|
||||
[ADC_GPIO4_PU2] = ADC_CHAN_TEMP("gpio4_pu2", 1,
|
||||
SCALE_HW_CALIB_THERM_100K_PULLUP)
|
||||
|
||||
#ifdef CONFIG_OPLUS_SM7150R_CHARGER
|
||||
/* Yichun.Chen PSW.BSP.CHG 2019-04-13 for read chargerid */
|
||||
[ADC_GPIO4] = ADC_CHAN_VOLT("chgid_voltage", 1, SCALE_HW_CALIB_DEFAULT)
|
||||
[ADC_AMUX_THM1] = ADC_CHAN_VOLT("usb_temp1", 1, SCALE_HW_CALIB_DEFAULT)
|
||||
[ADC_AMUX_THM3] = ADC_CHAN_VOLT("usb_temp2", 1, SCALE_HW_CALIB_DEFAULT)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_OPLUS_SM7125R_CHARGER
|
||||
/*chenhongbin@BSP.CHG.usbtemp. 2020/11/14 add for project 19721 usbtemp read */
|
||||
[ADC_AMUX_THM3] = ADC_CHAN_VOLT("usb_temp_adc", 1, SCALE_HW_CALIB_DEFAULT)
|
||||
[ADC_AMUX_THM2] = ADC_CHAN_VOLT("usb_supplementary_temp_adc", 1, SCALE_HW_CALIB_DEFAULT)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef OPLUS_FEATURE_TP_BASIC
|
||||
/*xing.xiong@BSP.Kernel.Driver, 2019/09/10, Add for adc read for aboard */
|
||||
[ADC_GPIO4] = ADC_CHAN_VOLT("board_id_vdata", 1,
|
||||
SCALE_HW_CALIB_DEFAULT)
|
||||
#endif/*OPLUS_FEATURE_TP_BASIC*/
|
||||
#ifdef CONFIG_OPLUS_SM8150R_CHARGER
|
||||
[ADC_GPIO3] = ADC_CHAN_VOLT("gpio7_v", 1,
|
||||
SCALE_HW_CALIB_DEFAULT)
|
||||
[ADC_GPIO4_PU2] = ADC_CHAN_VOLT("gpio8_v", 1,
|
||||
SCALE_HW_CALIB_DEFAULT)
|
||||
|
||||
[ADC_AMUX_THM4] = ADC_CHAN_VOLT("usb_temp_adc", 1,
|
||||
SCALE_HW_CALIB_DEFAULT)
|
||||
[ADC_GPIO2] = ADC_CHAN_VOLT("usb_supplementary_temp_adc", 1,
|
||||
SCALE_HW_CALIB_DEFAULT)
|
||||
#endif
|
||||
};
|
||||
|
||||
static const struct adc_channels adc_chans_rev2[ADC_MAX_CHANNEL] = {
|
||||
|
||||
@@ -222,6 +222,10 @@ menu "Hardware I/O ports"
|
||||
source "drivers/input/serio/Kconfig"
|
||||
|
||||
source "drivers/input/gameport/Kconfig"
|
||||
#ifdef VENDOR_EDIT
|
||||
#zoulian@BSP.Fingerprint.Basic, 2020/08/04, add for fingerprint driver
|
||||
source "drivers/input/oppo_fp_drivers/Kconfig"
|
||||
#endif
|
||||
|
||||
endmenu
|
||||
|
||||
|
||||
@@ -32,3 +32,8 @@ obj-$(CONFIG_INPUT_KEYCOMBO) += keycombo.o
|
||||
|
||||
obj-$(CONFIG_RMI4_CORE) += rmi4/
|
||||
obj-$(CONFIG_SMI130) += sensors/smi130/
|
||||
#ifdef VENDOR_EDIT
|
||||
#zoulian@BSP.Fingerprint.Basic, 2020/08/04, add for fingerprint driver
|
||||
obj-$(CONFIG_OPPO_FINGERPRINT) += oppo_fp_drivers/
|
||||
obj-$(CONFIG_OPPO_FINGERPRINT) += oppo_secure_common/
|
||||
#endif
|
||||
|
||||
@@ -366,11 +366,20 @@ static int input_get_disposition(struct input_dev *dev,
|
||||
return disposition;
|
||||
}
|
||||
|
||||
#ifdef OPLUS_FEATURE_SAUPWK
|
||||
extern void __attribute__((weak)) oppo_sync_saupwk_event(unsigned int , unsigned int , int);
|
||||
#endif /* OPLUS_FEATURE_SAUPWK */
|
||||
|
||||
static void input_handle_event(struct input_dev *dev,
|
||||
unsigned int type, unsigned int code, int value)
|
||||
{
|
||||
int disposition = input_get_disposition(dev, type, code, &value);
|
||||
|
||||
#ifdef OPLUS_FEATURE_SAUPWK
|
||||
if(oppo_sync_saupwk_event)
|
||||
oppo_sync_saupwk_event(type, code, value);
|
||||
#endif /* OPLUS_FEATURE_SAUPWK */
|
||||
|
||||
if (disposition != INPUT_IGNORE_EVENT && type != EV_SYN)
|
||||
add_input_randomness(type, code, value);
|
||||
|
||||
|
||||
@@ -889,4 +889,14 @@ config INPUT_HISI_POWERKEY
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called hisi_powerkey.
|
||||
|
||||
config STMVL53L1
|
||||
tristate "STM VL53L1 Proximity support"
|
||||
depends on I2C=y
|
||||
default y
|
||||
help
|
||||
Say Y here if you want to use STMicroelectronics's vl53L1 TOF AF sensor
|
||||
through I2C interface.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called stmvl53l1.
|
||||
endif
|
||||
|
||||
@@ -85,3 +85,6 @@ obj-$(CONFIG_INPUT_WM831X_ON) += wm831x-on.o
|
||||
obj-$(CONFIG_INPUT_XEN_KBDDEV_FRONTEND) += xen-kbdfront.o
|
||||
obj-$(CONFIG_INPUT_YEALINK) += yealink.o
|
||||
obj-$(CONFIG_INPUT_IDEAPAD_SLIDEBAR) += ideapad_slidebar.o
|
||||
ifeq ($(TARGET_PRODUCT),msmnile)
|
||||
obj-$(CONFIG_STMVL53L1) += vl53L1/
|
||||
endif
|
||||
@@ -35,6 +35,9 @@
|
||||
#include <linux/qpnp/qpnp-pbs.h>
|
||||
#include <linux/qpnp/qpnp-misc.h>
|
||||
|
||||
#include <linux/io.h>
|
||||
|
||||
#define GPIO109_ADDR 0x3D77000
|
||||
#define PMIC_VER_8941 0x01
|
||||
#define PMIC_VERSION_REG 0x0105
|
||||
#define PMIC_VERSION_REV4_REG 0x0103
|
||||
@@ -201,6 +204,7 @@ struct pon_regulator {
|
||||
bool enabled;
|
||||
};
|
||||
|
||||
#ifndef OPLUS_FEATURE_QCOM_PMICWD
|
||||
struct qpnp_pon {
|
||||
struct device *dev;
|
||||
struct regmap *regmap;
|
||||
@@ -244,13 +248,17 @@ struct qpnp_pon {
|
||||
struct notifier_block pon_nb;
|
||||
bool legacy_hard_reset_offset;
|
||||
};
|
||||
#endif //OPLUS_FEATURE_QCOM_PMICWD
|
||||
|
||||
static int pon_ship_mode_en;
|
||||
module_param_named(
|
||||
ship_mode_en, pon_ship_mode_en, int, 0600
|
||||
);
|
||||
|
||||
#ifndef OPLUS_FEATURE_QCOM_PMICWD
|
||||
static struct qpnp_pon *sys_reset_dev;
|
||||
#endif //OPLUS_FEATURE_QCOM_PMICWD
|
||||
|
||||
static DEFINE_SPINLOCK(spon_list_slock);
|
||||
static LIST_HEAD(spon_dev_list);
|
||||
|
||||
@@ -356,8 +364,12 @@ done:
|
||||
return rc;
|
||||
}
|
||||
|
||||
#ifdef OPLUS_FEATURE_QCOM_PMICWD
|
||||
int qpnp_pon_masked_write(struct qpnp_pon *pon, u16 addr, u8 mask, u8 val)
|
||||
#else
|
||||
static int
|
||||
qpnp_pon_masked_write(struct qpnp_pon *pon, u16 addr, u8 mask, u8 val)
|
||||
#endif /* OPLUS_FEATURE_QCOM_PMICWD */
|
||||
{
|
||||
int rc;
|
||||
|
||||
@@ -1009,6 +1021,10 @@ static int qpnp_pon_input_dispatch(struct qpnp_pon *pon, u32 pon_type)
|
||||
input_sync(pon->pon_input);
|
||||
}
|
||||
|
||||
#ifdef OPLUS_FEATURE_QCOM_PMICWD
|
||||
pr_err("keycode = %d,key_st = %d\n",cfg->key_code, key_status);
|
||||
#endif //OPLUS_FEATURE_QCOM_PMICWD
|
||||
|
||||
input_report_key(pon->pon_input, cfg->key_code, key_status);
|
||||
input_sync(pon->pon_input);
|
||||
|
||||
@@ -1625,14 +1641,24 @@ static int qpnp_pon_config_init(struct qpnp_pon *pon,
|
||||
int rc = 0, i = 0, pmic_wd_bark_irq;
|
||||
struct device_node *cfg_node = NULL;
|
||||
struct qpnp_pon_config *cfg;
|
||||
|
||||
void __iomem *gpio_addr = NULL;
|
||||
u32 detect_gpio_status,detect_gpio_status_1;
|
||||
if (pon->num_pon_config) {
|
||||
pon->pon_cfg = devm_kcalloc(pon->dev, pon->num_pon_config,
|
||||
sizeof(*pon->pon_cfg), GFP_KERNEL);
|
||||
if (!pon->pon_cfg)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
gpio_addr = ioremap(GPIO109_ADDR , 4);
|
||||
if (!gpio_addr) {
|
||||
pr_err("GPIO109_ioremap_fail\n");
|
||||
} else {
|
||||
detect_gpio_status = __raw_readl(gpio_addr);
|
||||
printk("detect_gpio_status = 0x%x\n",detect_gpio_status);
|
||||
__raw_writel((~(1 << 20)) & detect_gpio_status, gpio_addr);
|
||||
detect_gpio_status_1 = __raw_readl(gpio_addr);
|
||||
printk("detect_gpio_status_1 = 0x%x\n",detect_gpio_status_1);
|
||||
}
|
||||
/* Iterate through the list of pon configs */
|
||||
for_each_available_child_of_node(pon->dev->of_node, cfg_node) {
|
||||
if (!of_find_property(cfg_node, "qcom,pon-type", NULL))
|
||||
@@ -2145,6 +2171,13 @@ static int qpnp_pon_configure_s3_reset(struct qpnp_pon *pon)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* fanhui@PhoneSW.BSP, 2016/05/16, interface to read PMIC reg PON_REASON and POFF_REASON */
|
||||
extern char pon_reason[];
|
||||
extern char poff_reason[];
|
||||
int preason_initialized;
|
||||
#endif /*OPLUS_BUG_STABILITY*/
|
||||
|
||||
static int qpnp_pon_read_hardware_info(struct qpnp_pon *pon, bool sys_reset)
|
||||
{
|
||||
struct device *dev = pon->dev;
|
||||
@@ -2190,25 +2223,49 @@ static int qpnp_pon_read_hardware_info(struct qpnp_pon *pon, bool sys_reset)
|
||||
|
||||
/* PON reason */
|
||||
rc = qpnp_pon_read(pon, QPNP_PON_REASON1(pon), &pon_sts);
|
||||
if (rc)
|
||||
if (rc){
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* fanhui@PhoneSW.BSP, 2016/05/16, interface to read PMIC reg PON_REASON and POFF_REASON */
|
||||
dev_err(dev,"Unable to read PON_RESASON1 reg rc: %d\n",rc);
|
||||
if (!preason_initialized) {
|
||||
snprintf(pon_reason, 128, "Unable to read PON_RESASON1 reg rc: %d\n", rc);
|
||||
preason_initialized = 1;
|
||||
}
|
||||
#endif /*OPLUS_BUG_STABILITY*/
|
||||
return rc;
|
||||
|
||||
}
|
||||
if (sys_reset)
|
||||
boot_reason = ffs(pon_sts);
|
||||
|
||||
index = ffs(pon_sts) - 1;
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* fanhui@PhoneSW.BSP, 2016/05/18, when KPDPWR_N is set it is PWK start*/
|
||||
if (pon_sts & 0x80)
|
||||
index = 7;
|
||||
#endif /*OPLUS_BUG_STABILITY*/
|
||||
cold_boot = sys_reset_dev ? !_qpnp_pon_is_warm_reset(sys_reset_dev)
|
||||
: !_qpnp_pon_is_warm_reset(pon);
|
||||
if (index >= ARRAY_SIZE(qpnp_pon_reason) || index < 0) {
|
||||
dev_info(dev, "PMIC@SID%d Power-on reason: Unknown and '%s' boot\n",
|
||||
to_spmi_device(dev->parent)->usid,
|
||||
cold_boot ? "cold" : "warm");
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* fanhui@PhoneSW.BSP, 2016/05/16, interface to read PMIC reg PON_REASON and POFF_REASON */
|
||||
if (!preason_initialized)
|
||||
snprintf(pon_reason, 128, "Unknown[0x%02X] and '%s' boot\n", pon_sts, cold_boot ? "cold" : "warm");
|
||||
#endif /*OPLUS_BUG_STABILITY*/
|
||||
} else {
|
||||
pon->pon_trigger_reason = index;
|
||||
dev_info(dev, "PMIC@SID%d Power-on reason: %s and '%s' boot\n",
|
||||
to_spmi_device(dev->parent)->usid,
|
||||
qpnp_pon_reason[index],
|
||||
cold_boot ? "cold" : "warm");
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* fanhui@PhoneSW.BSP, 2016/05/16, interface to read PMIC reg PON_REASON and POFF_REASON */
|
||||
if (!preason_initialized)
|
||||
snprintf(pon_reason, 128, "[0x%02X]%s and '%s' boot\n", pon_sts,
|
||||
qpnp_pon_reason[index], cold_boot ? "cold" : "warm");
|
||||
#endif /*OPLUS_BUG_STABILITY*/
|
||||
}
|
||||
|
||||
/* POFF reason */
|
||||
@@ -2223,6 +2280,13 @@ static int qpnp_pon_read_hardware_info(struct qpnp_pon *pon, bool sys_reset)
|
||||
if (rc) {
|
||||
dev_err(dev, "Register read failed, addr=0x%04X, rc=%d\n",
|
||||
QPNP_POFF_REASON1(pon), rc);
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* fanhui@PhoneSW.BSP, 2016/05/16, interface to read PMIC reg PON_REASON and POFF_REASON */
|
||||
if (!preason_initialized) {
|
||||
snprintf(poff_reason, 128, "Unable to read POFF_RESASON regs rc:%d\n", rc);
|
||||
preason_initialized = 1;
|
||||
}
|
||||
#endif /*OPLUS_BUG_STABILITY*/
|
||||
return rc;
|
||||
}
|
||||
poff_sts = buf[0] | (buf[1] << 8);
|
||||
@@ -2231,11 +2295,25 @@ static int qpnp_pon_read_hardware_info(struct qpnp_pon *pon, bool sys_reset)
|
||||
if (index >= ARRAY_SIZE(qpnp_poff_reason) || index < 0) {
|
||||
dev_info(dev, "PMIC@SID%d: Unknown power-off reason\n",
|
||||
to_spmi_device(dev->parent)->usid);
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* fanhui@PhoneSW.BSP, 2016/05/16, interface to read PMIC reg PON_REASON and POFF_REASON */
|
||||
if (!preason_initialized) {
|
||||
snprintf(poff_reason, 128, "Unknown[0x%4X]\n", poff_sts);
|
||||
preason_initialized = 1;
|
||||
}
|
||||
#endif /*OPLUS_BUG_STABILITY*/
|
||||
} else {
|
||||
pon->pon_power_off_reason = index;
|
||||
dev_info(dev, "PMIC@SID%d: Power-off reason: %s\n",
|
||||
to_spmi_device(dev->parent)->usid,
|
||||
qpnp_poff_reason[index]);
|
||||
#ifdef OPLUS_BUG_STABILITY
|
||||
/* fanhui@PhoneSW.BSP, 2016/05/16, interface to read PMIC reg PON_REASON and POFF_REASON */
|
||||
if (!preason_initialized) {
|
||||
snprintf(poff_reason, 128, "[0x%04X]%s\n", poff_sts, qpnp_poff_reason[index]);
|
||||
preason_initialized = 1;
|
||||
}
|
||||
#endif /*OPLUS_BUG_STABILITY*/
|
||||
}
|
||||
|
||||
if ((pon->pon_trigger_reason == PON_SMPL ||
|
||||
@@ -2460,8 +2538,13 @@ static int qpnp_pon_probe(struct platform_device *pdev)
|
||||
if (sys_reset)
|
||||
sys_reset_dev = pon;
|
||||
|
||||
qpnp_pon_debugfs_init(pon);
|
||||
qpnp_pon_debugfs_init(pon);
|
||||
|
||||
#ifdef OPLUS_FEATURE_QCOM_PMICWD
|
||||
pmicwd_init(pdev, pon, sys_reset);
|
||||
kpdpwr_init(pon, sys_reset);
|
||||
#endif /* OPLUS_FEATURE_QCOM_PMICWD */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2542,11 +2625,11 @@ static const struct of_device_id qpnp_pon_match_table[] = {
|
||||
|
||||
static struct platform_driver qpnp_pon_driver = {
|
||||
.driver = {
|
||||
#ifdef OPLUS_FEATURE_QCOM_PMICWD
|
||||
.pm = &qpnp_pm_ops,
|
||||
#endif //OPLUS_FEATURE_QCOM_PMICWD
|
||||
.name = "qcom,qpnp-power-on",
|
||||
.of_match_table = qpnp_pon_match_table,
|
||||
#ifdef CONFIG_PM
|
||||
.pm = &qpnp_pon_pm_ops,
|
||||
#endif
|
||||
},
|
||||
.probe = qpnp_pon_probe,
|
||||
.remove = qpnp_pon_remove,
|
||||
|
||||
@@ -1288,12 +1288,7 @@ config TOUCHSCREEN_SYNAPTICS_TCM
|
||||
|
||||
source "drivers/input/touchscreen/synaptics_tcm/Kconfig"
|
||||
|
||||
config TOUCHSCREEN_RAYDIUM_CHIPSET
|
||||
bool "Raydium WT030 touchpanel CHIPSET"
|
||||
depends on I2C
|
||||
help
|
||||
Say Y here if you have a Raydium WT030 CHIPSET touchscreen.
|
||||
|
||||
If unsure, say N.
|
||||
#Qicai.gu@Bsp.Group.Tp, 2020/02/26, Add for oppo project
|
||||
source "drivers/input/touchscreen/oppo_touchscreen/Kconfig"
|
||||
|
||||
endif
|
||||
|
||||
@@ -108,4 +108,7 @@ obj-$(CONFIG_TOUCHSCREEN_ROHM_BU21023) += rohm_bu21023.o
|
||||
obj-$(CONFIG_TOUCHSCREEN_ST) += st/
|
||||
obj-$(CONFIG_TOUCHSCREEN_HIMAX_CHIPSET) += hxchipset/
|
||||
obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_TCM) += synaptics_tcm/
|
||||
obj-$(CONFIG_TOUCHSCREEN_RAYDIUM_CHIPSET) += raydium_wt030/
|
||||
|
||||
#Qicai.gu@Bsp.Group.Tp, 2020/02/26, Add for oppo project
|
||||
obj-$(CONFIG_TOUCHPANEL_OPPO) += oppo_touchscreen/
|
||||
obj-$(CONFIG_TOUCHPANEL_OPPO) += touch.o
|
||||
|
||||
@@ -47,6 +47,19 @@
|
||||
|
||||
#include "irq-gic-common.h"
|
||||
|
||||
#ifdef OPLUS_FEATURE_POWERINFO_STANDBY
|
||||
//Nanwei.Deng@BSP.Power.Basic, 2020/07/27, add for wakelock profiler
|
||||
#include "../../drivers/soc/oplus/owakelock/oplus_wakelock_profiler_qcom.h"
|
||||
#endif /* OPLUS_FEATURE_POWERINFO_STANDBY */
|
||||
|
||||
#ifdef OPLUS_FEATURE_MODEM_DATA_NWPOWER
|
||||
/*
|
||||
*Ruansong@PSW.NW.DATA.2120730, 2019/07/11
|
||||
*Add for: print qrtr debug msg and fix QMI wakeup statistics for QCOM platforms using glink.
|
||||
*/
|
||||
int qrtr_first_msg = 0;
|
||||
#endif /* OPLUS_FEATURE_MODEM_DATA_NWPOWER */
|
||||
|
||||
struct redist_region {
|
||||
void __iomem *redist_base;
|
||||
phys_addr_t phys_base;
|
||||
@@ -452,6 +465,11 @@ static void gic_show_resume_irq(struct gic_chip_data *gic)
|
||||
if (!msm_show_resume_irq_mask)
|
||||
return;
|
||||
|
||||
#ifdef OPLUS_FEATURE_POWERINFO_STANDBY
|
||||
//Nanwei.Deng@BSP.Power.Basic, 2020/07/27, add for wakelock profiler
|
||||
wakeup_reasons_statics(IRQ_NAME_WAKE_SUM, WS_CNT_SUM);
|
||||
#endif /* OPLUS_FEATURE_POWERINFO_STANDBY */
|
||||
|
||||
for (i = 0; i * 32 < gic->irq_nr; i++) {
|
||||
enabled = readl_relaxed(base + GICD_ICENABLER + i * 4);
|
||||
pending[i] = readl_relaxed(base + GICD_ISPENDR + i * 4);
|
||||
@@ -471,6 +489,26 @@ static void gic_show_resume_irq(struct gic_chip_data *gic)
|
||||
name = desc->action->name;
|
||||
|
||||
pr_warn("%s: %d triggered %s\n", __func__, irq, name);
|
||||
|
||||
#ifdef OPLUS_FEATURE_MODEM_DATA_NWPOWER
|
||||
/*
|
||||
*Ruansong@PSW.NW.DATA.2120730, 2019/07/11
|
||||
*Add for: print qrtr debug msg and fix QMI wakeup statistics for QCOM platforms using glink
|
||||
*/
|
||||
if(name != NULL)
|
||||
{
|
||||
if (strncmp(name, IRQ_NAME_GLINK, strlen(IRQ_NAME_GLINK)) == 0) {
|
||||
qrtr_first_msg = 1;
|
||||
}
|
||||
}
|
||||
#endif /* OPLUS_FEATURE_MODEM_DATA_NWPOWER */
|
||||
|
||||
#ifdef OPLUS_FEATURE_POWERINFO_STANDBY
|
||||
//Nanwei.Deng@BSP.Power.Basic, 2020/07/27, add for wakelock profiler
|
||||
do {
|
||||
wakeup_reasons_statics(name, WS_CNT_MODEM|WS_CNT_WLAN|WS_CNT_ADSP|WS_CNT_CDSP|WS_CNT_SLPI);
|
||||
} while(0);
|
||||
#endif /* OPLUS_FEATURE_POWERINFO_STANDBY */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -698,10 +736,18 @@ static int __gic_populate_rdist(struct redist_region *region, void __iomem *ptr)
|
||||
gic_data_rdist_rd_base() = ptr;
|
||||
gic_data_rdist()->phys_base = region->phys_base + offset;
|
||||
|
||||
#ifndef OPLUS_FEATURE_POWERINFO_STANDBY_DEBUG
|
||||
//Nanwei.Deng@BSP.power.Basic 2018/05/01
|
||||
pr_info("CPU%d: found redistributor %lx region %d:%pa\n",
|
||||
smp_processor_id(), mpidr,
|
||||
(int)(region - gic_data.redist_regions),
|
||||
&gic_data_rdist()->phys_base);
|
||||
#else
|
||||
pr_debug("CPU%d: found redistributor %lx region %d:%pa\n",
|
||||
smp_processor_id(), mpidr,
|
||||
(int)(region - gic_data.redist_regions),
|
||||
&gic_data_rdist()->phys_base);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,12 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
#ifndef OPLUS_FEATURE_POWERINFO_STANDBY
|
||||
//Nanwei.Deng@BSP.Power.Basic, 2020/07/27, add for wakelock profiler
|
||||
int msm_show_resume_irq_mask;
|
||||
#else
|
||||
int msm_show_resume_irq_mask = 1;
|
||||
#endif /*OPLUS_FEATURE_POWERINFO_STANDBY*/
|
||||
|
||||
module_param_named(
|
||||
debug_mask, msm_show_resume_irq_mask, int, 0664);
|
||||
|
||||
@@ -41,7 +41,11 @@
|
||||
* Define vibration periods: default(5sec), min(50ms), max(15sec) and
|
||||
* overdrive(30ms).
|
||||
*/
|
||||
#define QPNP_VIB_MIN_PLAY_MS 50
|
||||
|
||||
#ifdef OPLUS_FEATURE_CHG_BASIC
|
||||
/*Murphy@BSP.Kernel.Driver, 2019/04/12, Modify for viber min*/
|
||||
#define QPNP_VIB_MIN_PLAY_MS 35
|
||||
#endif
|
||||
#define QPNP_VIB_PLAY_MS 5000
|
||||
#define QPNP_VIB_MAX_PLAY_MS 15000
|
||||
#define QPNP_VIB_OVERDRIVE_PLAY_MS 30
|
||||
@@ -207,7 +211,13 @@ static enum hrtimer_restart vib_stop_timer(struct hrtimer *timer)
|
||||
stop_timer);
|
||||
|
||||
chip->state = 0;
|
||||
|
||||
#ifdef OPLUS_FEATURE_CHG_BASIC
|
||||
//Murphy@BSP.Kernel.Driver, 2019/04/12, fix sometimes the vibrator shake long time issue
|
||||
queue_work(system_unbound_wq, &chip->vib_work);
|
||||
#else
|
||||
schedule_work(&chip->vib_work);
|
||||
#endif
|
||||
return HRTIMER_NORESTART;
|
||||
}
|
||||
|
||||
@@ -335,9 +345,17 @@ static ssize_t qpnp_vib_store_activate(struct device *dev,
|
||||
mutex_lock(&chip->lock);
|
||||
hrtimer_cancel(&chip->stop_timer);
|
||||
chip->state = val;
|
||||
pr_debug("state = %d, time = %llums\n", chip->state, chip->vib_play_ms);
|
||||
#ifdef OPLUS_FEATURE_CHG_BASIC
|
||||
/*Murphy@BSP.Kernel.Driver, 2019/04/12, Modify for viber log*/
|
||||
pr_info("state = %d, time = %llums\n", chip->state, chip->vib_play_ms);
|
||||
#endif
|
||||
mutex_unlock(&chip->lock);
|
||||
#ifdef OPLUS_FEATURE_CHG_BASIC
|
||||
//Murphy@BSP.Kernel.Driver, 2019/04/12, fix sometimes the vibrator shake long time issue
|
||||
queue_work(system_unbound_wq, &chip->vib_work);
|
||||
#else
|
||||
schedule_work(&chip->vib_work);
|
||||
#endif
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user