aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2019-10-14 22:18:02 -0700
committerLinux Build Service Account <lnxbuild@localhost>2019-10-14 22:18:02 -0700
commitfebebcff31a42bd8ce461a906571053380abe7c0 (patch)
tree4bb992b4a2a2914c60762fd1f7628cc4b2a74e91
parentbd75d8089b23abeae19bb60e2960b0ef8faa5696 (diff)
parent6eef70786defa4e80698bcb6d3d1d2dc2b320300 (diff)
Merge 6eef70786defa4e80698bcb6d3d1d2dc2b320300 on remote branchLA.UM.8.8.r1-05700-SDM710.0
Change-Id: I3f3eefe017872f074a8078c6754ca346e2b6298e
-rw-r--r--Documentation/devicetree/bindings/sound/qcom-audio-dev.txt9
-rw-r--r--arch/arm/boot/dts/qcom/Makefile1
-rw-r--r--arch/arm/boot/dts/qcom/sa415m-cdp.dts4
-rw-r--r--arch/arm/boot/dts/qcom/sa415m-mtp-256.dts4
-rw-r--r--arch/arm/boot/dts/qcom/sa415m-ttp-pcie-ep.dts65
-rw-r--r--arch/arm/boot/dts/qcom/sa415m-ttp.dtsi8
-rw-r--r--arch/arm/boot/dts/qcom/sa415m-v2-cdp.dts4
-rw-r--r--arch/arm/boot/dts/qcom/sa415m-v2-mtp.dts4
-rw-r--r--arch/arm/boot/dts/qcom/sdx-audio-lpass.dtsi5
-rw-r--r--arch/arm/boot/dts/qcom/sdxpoorwills-audio.dtsi4
-rw-r--r--arch/arm/boot/dts/qcom/sdxpoorwills-pinctrl.dtsi2
-rw-r--r--arch/arm/boot/dts/qcom/sdxpoorwills-regulator.dtsi6
-rw-r--r--arch/arm/boot/dts/qcom/sdxpoorwills.dtsi1
-rwxr-xr-xarch/arm/configs/msm8909-perf_defconfig7
-rw-r--r--[-rwxr-xr-x]arch/arm/configs/msm8909_defconfig7
-rwxr-xr-xarch/arm/configs/msm8937go-perf_defconfig3
-rwxr-xr-xarch/arm/configs/msm8937go_defconfig3
-rw-r--r--arch/arm64/boot/dts/qcom/Makefile6
-rw-r--r--arch/arm64/boot/dts/qcom/apq8009-robot-som-refboard.dts74
-rw-r--r--arch/arm64/boot/dts/qcom/dsi-panel-osd-disp-fwvga-video.dtsi4
-rw-r--r--arch/arm64/boot/dts/qcom/msm8909-pinctrl.dtsi18
-rw-r--r--arch/arm64/boot/dts/qcom/sda845-svr.dtsi10
-rw-r--r--arch/arm64/boot/dts/qcom/sdm845-v2-mtp.dts3
-rw-r--r--arch/arm64/boot/dts/qcom/sdm845-v2.1-mtp.dts25
-rw-r--r--arch/arm64/boot/dts/qcom/sdm845-v2.1-rb3.dtsi4
-rw-r--r--arch/arm64/boot/dts/qcom/sdw3300-bg-1gb-wtp.dts63
-rw-r--r--drivers/char/adsprpc.c31
-rw-r--r--drivers/char/adsprpc_shared.h5
-rw-r--r--drivers/char/diag/diag_masks.c3
-rw-r--r--drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c5
-rw-r--r--drivers/gpu/drm/msm/sde/sde_crtc.c69
-rw-r--r--drivers/gpu/drm/msm/sde/sde_crtc.h4
-rw-r--r--drivers/gpu/drm/msm/sde/sde_encoder_phys_cmd.c18
-rw-r--r--drivers/gpu/drm/msm/sde/sde_kms.c5
-rw-r--r--drivers/gpu/msm/kgsl.c26
-rw-r--r--drivers/gpu/msm/kgsl.h2
-rw-r--r--drivers/gpu/msm/kgsl_device.h3
-rw-r--r--drivers/gpu/msm/kgsl_events.c10
-rw-r--r--drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c50
-rw-r--r--drivers/media/platform/msm/camera_v2/sensor/msm_sensor.c5
-rw-r--r--drivers/media/platform/msm/camera_v3/cam_req_mgr/cam_req_mgr_util.c16
-rw-r--r--drivers/media/platform/msm/camera_v3/cam_req_mgr/cam_req_mgr_util.h2
-rw-r--r--drivers/misc/qseecom.c3
-rw-r--r--drivers/platform/msm/ipa/ipa_v3/ipa_flt.c8
-rw-r--r--drivers/platform/msm/ipa/ipa_v3/ipa_i.h1
-rw-r--r--drivers/platform/msm/ipa/ipa_v3/ipa_rt.c11
-rw-r--r--drivers/platform/msm/ipa/ipa_v3/ipa_utils.c16
-rw-r--r--drivers/power/supply/qcom/qg-reg.h3
-rw-r--r--drivers/power/supply/qcom/qg-sdam.c24
-rw-r--r--drivers/power/supply/qcom/qg-sdam.h6
-rw-r--r--drivers/power/supply/qcom/qpnp-qg.c39
-rw-r--r--drivers/soc/qcom/wcnss/wcnss_vreg.c5
-rw-r--r--drivers/usb/gadget/function/f_ecm.c2
-rw-r--r--drivers/usb/gadget/function/f_gsi.c26
-rw-r--r--drivers/usb/gadget/udc/core.c5
-rw-r--r--drivers/video/fbdev/msm/mdss_dsi_panel.c1
-rw-r--r--fs/f2fs/file.c15
-rwxr-xr-xfs/f2fs/segment.c29
-rw-r--r--include/linux/diagchar.h4
-rw-r--r--include/linux/usb/gadget.h2
-rw-r--r--include/uapi/linux/msm_ipa.h59
-rw-r--r--net/ipc_router/ipc_router_core.c11
62 files changed, 661 insertions, 207 deletions
diff --git a/Documentation/devicetree/bindings/sound/qcom-audio-dev.txt b/Documentation/devicetree/bindings/sound/qcom-audio-dev.txt
index e939e8ca9798..039f881d2a08 100644
--- a/Documentation/devicetree/bindings/sound/qcom-audio-dev.txt
+++ b/Documentation/devicetree/bindings/sound/qcom-audio-dev.txt
@@ -642,6 +642,11 @@ Example:
compatible = "qcom,msm-dai-q6-dev";
qcom,msm-dai-q6-dev-id = <32770>;
};
+
+ qcom,msm-dai-q6-incall-music-dl-rx {
+ compatible = "qcom,msm-dai-q6-dev";
+ qcom,msm-dai-q6-dev-id = <32774>;
+ };
};
qcom,msm-pri-auxpcm {
@@ -2642,7 +2647,7 @@ Example:
<&incall_record_tx>, <&incall_music_rx>,
<&dai_pri_tdm_rx_0>, <&dai_pri_tdm_tx_0>,
<&dai_sec_tdm_rx_0>, <&dai_sec_tdm_tx_0>,
- <&dai_sec_auxpcm>;
+ <&dai_sec_auxpcm>, <&incall_music_dl_rx>;
asoc-cpu-names = "msm-dai-q6-auxpcm.1",
"msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1",
"msm-dai-stub-dev.4", "msm-dai-stub-dev.5",
@@ -2653,7 +2658,7 @@ Example:
"msm-dai-q6-dev.32772", "msm-dai-q6-dev.32773",
"msm-dai-q6-tdm.36864", "msm-dai-q6-tdm.36865",
"msm-dai-q6-tdm.36880", "msm-dai-q6-tdm.36881",
- "msm-dai-q6-auxpcm.2";
+ "msm-dai-q6-auxpcm.2", "msm-dai-q6-dev.32774";
asoc-codec = <&tlv320aic3x_codec>, <&stub_codec>;
asoc-codec-names = "tlv320aic3x-codec", "msm-stub-codec.1";
};
diff --git a/arch/arm/boot/dts/qcom/Makefile b/arch/arm/boot/dts/qcom/Makefile
index d1edfd97372b..54f2ef677664 100644
--- a/arch/arm/boot/dts/qcom/Makefile
+++ b/arch/arm/boot/dts/qcom/Makefile
@@ -21,6 +21,7 @@ dtb-$(CONFIG_ARCH_SDXPOORWILLS) += sdxpoorwills-rumi.dtb \
sa415m-ccard.dtb \
sa415m-ccard-pcie-ep.dtb \
sa415m-ccard-usb-ep.dtb \
+ sa415m-ttp-pcie-ep.dtb \
sa415m-ttp-usb-ep.dtb \
sa415m-mtp-256.dtb \
sa415m-cdp.dtb \
diff --git a/arch/arm/boot/dts/qcom/sa415m-cdp.dts b/arch/arm/boot/dts/qcom/sa415m-cdp.dts
index b9e7d4947c6e..908eb8797ac7 100644
--- a/arch/arm/boot/dts/qcom/sa415m-cdp.dts
+++ b/arch/arm/boot/dts/qcom/sa415m-cdp.dts
@@ -30,3 +30,7 @@
&mss_mem {
reg = <0x86400000 0x9300000>;
};
+
+&smb138x {
+ status = "disabled";
+};
diff --git a/arch/arm/boot/dts/qcom/sa415m-mtp-256.dts b/arch/arm/boot/dts/qcom/sa415m-mtp-256.dts
index 09a8ea0a3b5c..39ed5c6f75fe 100644
--- a/arch/arm/boot/dts/qcom/sa415m-mtp-256.dts
+++ b/arch/arm/boot/dts/qcom/sa415m-mtp-256.dts
@@ -28,3 +28,7 @@
&mss_mem {
reg = <0x86400000 0x9300000>;
};
+
+&smb138x {
+ status = "disabled";
+};
diff --git a/arch/arm/boot/dts/qcom/sa415m-ttp-pcie-ep.dts b/arch/arm/boot/dts/qcom/sa415m-ttp-pcie-ep.dts
new file mode 100644
index 000000000000..0cbc9e3b71a2
--- /dev/null
+++ b/arch/arm/boot/dts/qcom/sa415m-ttp-pcie-ep.dts
@@ -0,0 +1,65 @@
+/* Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+/dts-v1/;
+
+#include "sa415m-ttp.dtsi"
+#include "sdxpoorwills-v2.dtsi"
+
+/ {
+ model = "Qualcomm Technologies, Inc. SA415M TTP PCIE-EP";
+ compatible = "qcom,sa415m-ttp",
+ "qcom,sdxpoorwills", "qcom,ttp";
+ qcom,board-id = <30 0x101>;
+};
+
+&mss_mem {
+ reg = <0x86400000 0x9300000>;
+};
+
+&usb {
+ /delete-property/ iommus;
+};
+
+&pcie_ep {
+ status = "okay";
+};
+
+&ipa_hw {
+ qcom,use-ipa-in-mhi-mode;
+ qcom,ipa-config-is-auto;
+ qcom,mhi-event-ring-id-limits = <7 11>; /* start and end */
+};
+
+&cnss_pcie {
+ status = "disabled";
+};
+
+&pcie0 {
+ status = "disabled";
+};
+
+&mhi_device {
+ status = "okay";
+};
+
+&restart_pshold {
+ qcom,force-warm-reboot;
+};
+
+&ipc_router_mhi_dev_xprt {
+ status = "okay";
+};
+
+&mhi_net_device {
+ status = "okay";
+};
diff --git a/arch/arm/boot/dts/qcom/sa415m-ttp.dtsi b/arch/arm/boot/dts/qcom/sa415m-ttp.dtsi
index b0d746a372ac..f91893508155 100644
--- a/arch/arm/boot/dts/qcom/sa415m-ttp.dtsi
+++ b/arch/arm/boot/dts/qcom/sa415m-ttp.dtsi
@@ -53,8 +53,8 @@
};
cnss_pcie: qcom,cnss {
compatible = "qcom,cnss";
- reg = <0x10000000 0x10000000>,
- <0x20000000 0x10000>;
+ reg = <0xa0000000 0x10000000>,
+ <0xb0000000 0x10000>;
reg-names = "smmu_iova_base", "smmu_iova_ipa";
wlan-en-gpio = <&tlmm 52 0>;
@@ -91,6 +91,10 @@
};
};
+&smb138x {
+ status = "disabled";
+};
+
&i2c_4 {
status = "okay";
diff --git a/arch/arm/boot/dts/qcom/sa415m-v2-cdp.dts b/arch/arm/boot/dts/qcom/sa415m-v2-cdp.dts
index c8b78915dac0..3a7b0722932b 100644
--- a/arch/arm/boot/dts/qcom/sa415m-v2-cdp.dts
+++ b/arch/arm/boot/dts/qcom/sa415m-v2-cdp.dts
@@ -31,3 +31,7 @@
&mss_mem {
reg = <0x86400000 0x9300000>;
};
+
+&smb138x {
+ status = "disabled";
+};
diff --git a/arch/arm/boot/dts/qcom/sa415m-v2-mtp.dts b/arch/arm/boot/dts/qcom/sa415m-v2-mtp.dts
index c7cbbd1ba1f5..fe59e058bde9 100644
--- a/arch/arm/boot/dts/qcom/sa415m-v2-mtp.dts
+++ b/arch/arm/boot/dts/qcom/sa415m-v2-mtp.dts
@@ -33,3 +33,7 @@
&mss_mem {
reg = <0x86400000 0x9300000>;
};
+
+&smb138x {
+ status = "disabled";
+};
diff --git a/arch/arm/boot/dts/qcom/sdx-audio-lpass.dtsi b/arch/arm/boot/dts/qcom/sdx-audio-lpass.dtsi
index 934335fc9a99..eade6b79160f 100644
--- a/arch/arm/boot/dts/qcom/sdx-audio-lpass.dtsi
+++ b/arch/arm/boot/dts/qcom/sdx-audio-lpass.dtsi
@@ -151,6 +151,11 @@
compatible = "qcom,msm-dai-q6-dev";
qcom,msm-dai-q6-dev-id = <32773>;
};
+
+ incall_music_dl_rx: qcom,msm-dai-q6-incall-music-dl-rx {
+ compatible = "qcom,msm-dai-q6-dev";
+ qcom,msm-dai-q6-dev-id = <32774>;
+ };
};
pcm_dtmf: qcom,msm-pcm-dtmf {
diff --git a/arch/arm/boot/dts/qcom/sdxpoorwills-audio.dtsi b/arch/arm/boot/dts/qcom/sdxpoorwills-audio.dtsi
index b45f8372189a..070478ab9654 100644
--- a/arch/arm/boot/dts/qcom/sdxpoorwills-audio.dtsi
+++ b/arch/arm/boot/dts/qcom/sdxpoorwills-audio.dtsi
@@ -39,7 +39,7 @@
<&incall_record_tx>, <&incall_music_rx>,
<&dai_pri_tdm_rx_0>, <&dai_pri_tdm_tx_0>,
<&dai_sec_tdm_rx_0>, <&dai_sec_tdm_tx_0>,
- <&dai_sec_auxpcm>;
+ <&dai_sec_auxpcm>, <&incall_music_dl_rx>;
asoc-cpu-names = "msm-dai-q6-auxpcm.1",
"msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1",
"msm-dai-stub-dev.4", "msm-dai-stub-dev.5",
@@ -50,6 +50,6 @@
"msm-dai-q6-dev.32772", "msm-dai-q6-dev.32773",
"msm-dai-q6-tdm.36864", "msm-dai-q6-tdm.36865",
"msm-dai-q6-tdm.36880", "msm-dai-q6-tdm.36881",
- "msm-dai-q6-auxpcm.2";
+ "msm-dai-q6-auxpcm.2", "msm-dai-q6-dev.32774";
};
};
diff --git a/arch/arm/boot/dts/qcom/sdxpoorwills-pinctrl.dtsi b/arch/arm/boot/dts/qcom/sdxpoorwills-pinctrl.dtsi
index 09a62190ba00..f441b3fc30cb 100644
--- a/arch/arm/boot/dts/qcom/sdxpoorwills-pinctrl.dtsi
+++ b/arch/arm/boot/dts/qcom/sdxpoorwills-pinctrl.dtsi
@@ -154,7 +154,7 @@
config {
pins = "gpio76", "gpio77";
drive-strength = <2>;
- bias-disable;
+ bias-pull-up;
};
};
diff --git a/arch/arm/boot/dts/qcom/sdxpoorwills-regulator.dtsi b/arch/arm/boot/dts/qcom/sdxpoorwills-regulator.dtsi
index 70dc3aecc750..f09e63d31d2a 100644
--- a/arch/arm/boot/dts/qcom/sdxpoorwills-regulator.dtsi
+++ b/arch/arm/boot/dts/qcom/sdxpoorwills-regulator.dtsi
@@ -25,7 +25,7 @@
regulator-name = "pmxpoorwills_s1_level";
qcom,set = <RPMH_REGULATOR_SET_ALL>;
regulator-min-microvolt =
- <RPMH_REGULATOR_LEVEL_MIN_SVS>;
+ <RPMH_REGULATOR_LEVEL_RETENTION>;
regulator-max-microvolt = <RPMH_REGULATOR_LEVEL_MAX>;
};
};
@@ -391,7 +391,7 @@
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-enable-ramp-delay = <100>;
- gpio = <&tlmm 96 GPIO_ACTIVE_HIGH>;
+ gpio = <&tlmm 83 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
@@ -401,7 +401,7 @@
regulator-min-microvolt = <2500000>;
regulator-max-microvolt = <2500000>;
regulator-enable-ramp-delay = <100>;
- gpio = <&tlmm 83 GPIO_ACTIVE_HIGH>;
+ gpio = <&tlmm 96 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
diff --git a/arch/arm/boot/dts/qcom/sdxpoorwills.dtsi b/arch/arm/boot/dts/qcom/sdxpoorwills.dtsi
index c74425344aa0..75716613f0e0 100644
--- a/arch/arm/boot/dts/qcom/sdxpoorwills.dtsi
+++ b/arch/arm/boot/dts/qcom/sdxpoorwills.dtsi
@@ -1389,6 +1389,7 @@
"eth_rgmii_clk", "eth_slave_ahb_clk";
qcom,phy-intr-redirect = <&tlmm 84 GPIO_ACTIVE_LOW>;
qcom,phy-reset = <&tlmm 85 GPIO_ACTIVE_LOW>;
+ qcom,phy-reset-delay-msecs = <10>;
vreg_rgmii-supply = <&vreg_rgmii>;
vreg_emac_phy-supply = <&vreg_emac_phy>;
vreg_rgmii_io_pads-supply = <&vreg_rgmii_io_pads>;
diff --git a/arch/arm/configs/msm8909-perf_defconfig b/arch/arm/configs/msm8909-perf_defconfig
index 5c68a44604ed..8e386d37862d 100755
--- a/arch/arm/configs/msm8909-perf_defconfig
+++ b/arch/arm/configs/msm8909-perf_defconfig
@@ -331,6 +331,11 @@ CONFIG_MSM_ISP_V1=y
CONFIG_MSM_ISPIF=y
CONFIG_QCOM_KGSL=y
CONFIG_FB=y
+CONFIG_FB_MSM=y
+CONFIG_FB_MSM_MDSS=y
+CONFIG_FB_MSM_MDSS_DSI_CTRL_STATUS=y
+CONFIG_FB_MSM_MDSS_MDP3=y
+CONFIG_FB_MSM_MDSS_XLOG_DEBUG=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_SOUND=y
@@ -382,7 +387,6 @@ CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_QPNP=y
CONFIG_DMADEVICES=y
CONFIG_QCOM_SPS_DMA=y
-CONFIG_SYNC_FILE=y
CONFIG_UIO=y
CONFIG_UIO_MSM_SHAREDMEM=y
CONFIG_STAGING=y
@@ -394,6 +398,7 @@ CONFIG_SPS=y
CONFIG_SPS_SUPPORT_NDP_BAM=y
CONFIG_QPNP_REVID=y
CONFIG_USB_BAM=y
+CONFIG_MSM_MDSS_PLL=y
CONFIG_REMOTE_SPINLOCK_MSM=y
CONFIG_MAILBOX=y
CONFIG_ARM_SMMU=y
diff --git a/arch/arm/configs/msm8909_defconfig b/arch/arm/configs/msm8909_defconfig
index 575cf5e649e6..5f698944ce6f 100755..100644
--- a/arch/arm/configs/msm8909_defconfig
+++ b/arch/arm/configs/msm8909_defconfig
@@ -355,6 +355,11 @@ CONFIG_MSM_ISPIF=y
CONFIG_QCOM_KGSL=y
CONFIG_FB=y
CONFIG_FB_VIRTUAL=y
+CONFIG_FB_MSM=y
+CONFIG_FB_MSM_MDSS=y
+CONFIG_FB_MSM_MDSS_DSI_CTRL_STATUS=y
+CONFIG_FB_MSM_MDSS_MDP3=y
+CONFIG_FB_MSM_MDSS_XLOG_DEBUG=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_LOGO=y
@@ -422,7 +427,6 @@ CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_QPNP=y
CONFIG_DMADEVICES=y
CONFIG_QCOM_SPS_DMA=y
-CONFIG_SYNC_FILE=y
CONFIG_UIO=y
CONFIG_UIO_MSM_SHAREDMEM=y
CONFIG_STAGING=y
@@ -436,6 +440,7 @@ CONFIG_SPS=y
CONFIG_SPS_SUPPORT_NDP_BAM=y
CONFIG_QPNP_REVID=y
CONFIG_USB_BAM=y
+CONFIG_MSM_MDSS_PLL=y
CONFIG_REMOTE_SPINLOCK_MSM=y
CONFIG_MAILBOX=y
CONFIG_ARM_SMMU=y
diff --git a/arch/arm/configs/msm8937go-perf_defconfig b/arch/arm/configs/msm8937go-perf_defconfig
index 8420285b9075..25f9edbc6524 100755
--- a/arch/arm/configs/msm8937go-perf_defconfig
+++ b/arch/arm/configs/msm8937go-perf_defconfig
@@ -73,6 +73,7 @@ CONFIG_ARM_MODULE_PLTS=y
CONFIG_CMA=y
CONFIG_CMA_DEBUGFS=y
CONFIG_ZSMALLOC=y
+CONFIG_BALANCE_ANON_FILE_RECLAIM=y
CONFIG_PROCESS_RECLAIM=y
CONFIG_SECCOMP=y
CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE=y
@@ -362,7 +363,6 @@ CONFIG_GPIO_QPNP_PIN=y
CONFIG_POWER_RESET=y
CONFIG_POWER_RESET_QCOM=y
CONFIG_QCOM_DLOAD_MODE=y
-CONFIG_POWER_SUPPLY=y
CONFIG_QPNP_FG=y
CONFIG_SMB135X_CHARGER=y
CONFIG_SMB1360_CHARGER_FG=y
@@ -460,6 +460,7 @@ CONFIG_HID_ELECOM=y
CONFIG_HID_MAGICMOUSE=y
CONFIG_HID_MICROSOFT=y
CONFIG_HID_MULTITOUCH=y
+CONFIG_HID_SONY=y
CONFIG_USB_HIDDEV=y
CONFIG_USB=y
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
diff --git a/arch/arm/configs/msm8937go_defconfig b/arch/arm/configs/msm8937go_defconfig
index b9cdd7ea3035..855494803f5c 100755
--- a/arch/arm/configs/msm8937go_defconfig
+++ b/arch/arm/configs/msm8937go_defconfig
@@ -75,6 +75,7 @@ CONFIG_ARM_MODULE_PLTS=y
CONFIG_CMA=y
CONFIG_CMA_DEBUGFS=y
CONFIG_ZSMALLOC=y
+CONFIG_BALANCE_ANON_FILE_RECLAIM=y
CONFIG_PROCESS_RECLAIM=y
CONFIG_SECCOMP=y
CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE=y
@@ -368,7 +369,6 @@ CONFIG_GPIO_QPNP_PIN=y
CONFIG_POWER_RESET=y
CONFIG_POWER_RESET_QCOM=y
CONFIG_QCOM_DLOAD_MODE=y
-CONFIG_POWER_SUPPLY=y
CONFIG_QPNP_FG=y
CONFIG_SMB135X_CHARGER=y
CONFIG_SMB1360_CHARGER_FG=y
@@ -467,6 +467,7 @@ CONFIG_HID_ELECOM=y
CONFIG_HID_MAGICMOUSE=y
CONFIG_HID_MICROSOFT=y
CONFIG_HID_MULTITOUCH=y
+CONFIG_HID_SONY=y
CONFIG_USB_HIDDEV=y
CONFIG_USB=y
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 06956b06410a..917fd5b982fe 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -111,7 +111,8 @@ dtb-$(CONFIG_ARCH_SDM845) += sdm845-sim.dtb \
sdm845-4k-panel-qrd.dtb \
sdm845-interposer-sdm670-mtp.dtb \
sdm845-interposer-sdm670-cdp.dtb \
- sdm845-v2.1-rb3.dtb
+ sdm845-v2.1-rb3.dtb \
+ sdm845-v2.1-mtp.dtb
endif
ifeq ($(CONFIG_BUILD_ARM64_DT_OVERLAY),y)
@@ -654,7 +655,8 @@ dtb-$(CONFIG_ARCH_SDM429) += sdm429-mtp.dtb \
sda429-cdp.dtb \
sdm429-spyro.dtb \
sdm429-spyro-dvt.dtb \
- sdm429-spyro-wdp.dtb
+ sdm429-spyro-wdp.dtb \
+ sdw3300-bg-1gb-wtp.dtb
endif
diff --git a/arch/arm64/boot/dts/qcom/apq8009-robot-som-refboard.dts b/arch/arm64/boot/dts/qcom/apq8009-robot-som-refboard.dts
index 8efa0c5401f7..103ef7fa3c71 100644
--- a/arch/arm64/boot/dts/qcom/apq8009-robot-som-refboard.dts
+++ b/arch/arm64/boot/dts/qcom/apq8009-robot-som-refboard.dts
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -19,6 +19,7 @@
#include "apq8009-audio-external_codec.dtsi"
#include "msm8909-pm8916-camera.dtsi"
#include "msm8909-pm8916-camera-sensor-robot-som.dtsi"
+#include "dsi-panel-osd-disp-fwvga-video.dtsi"
/ {
model = "Qualcomm Technologies, Inc. APQ8009 Robot SOM refboard";
@@ -192,10 +193,6 @@
vin-supply = <&otg_vreg_5p0>;
};
- mdss_mdp: qcom,mdss_mdp@1a00000 {
- status = "disabled";
- };
-
bluetooth: bt_qca9379 {
compatible = "qca,qca9379";
qca,bt-reset-gpio = <&msm_gpio 47 0>; /* BT_EN */
@@ -372,3 +369,70 @@
&ext_codec {
status = "okay";
};
+
+&rpm_bus {
+ rpm-regulator-ldoa4 {
+ status = "okay";
+ pm8916_l4: regulator-l4 {
+ regulator-min-microvolt = <2050000>;
+ regulator-max-microvolt = <2050000>;
+ qcom,init-voltage = <2050000>;
+ regulator-always-on;
+ status = "okay";
+ };
+ };
+};
+
+&mdss_dsi0_pll {
+ status = "okay";
+};
+
+&mdss_mdp {
+ qcom,mdss-pref-prim-intf = "dsi";
+ status = "okay";
+};
+
+&dsi_osd_disp_fwvga_video {
+ qcom,mdss-dsi-pwm-gpio = <&pm8916_mpps 4 0>;
+};
+
+&pmx_mdss {
+ mdss_dsi_active: mdss_dsi_active {
+ mux {
+ pins = "gpio28", "gpio37";
+ };
+ };
+
+ mdss_dsi_suspend: mdss_dsi_suspend {
+ mux {
+ pins = "gpio28", "gpio37";
+ };
+ };
+};
+
+&mdss_dsi0 {
+ qcom,dsi-pref-prim-pan = <&dsi_osd_disp_fwvga_video>;
+
+ pinctrl-names = "mdss_default", "mdss_sleep";
+ pinctrl-0 = <&mdss_dsi_active &mdss_dsi_select_gpio>;
+ pinctrl-1 = <&mdss_dsi_suspend &mdss_dsi_select_gpio>;
+
+ qcom,platform-reset-gpio = <&msm_gpio 28 0>;
+ qcom,platform-bklight-en-gpio = <&msm_gpio 37 0>;
+
+ vdd-supply = <&pm8916_l17>;
+ vddio-supply = <&pm8916_l6>;
+ status = "okay";
+};
+
+&pm8916_mpps {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ext_fep_wled_pwr_en_default>;
+ ext_fep_wled_pwr_en_default: ext_fep_wled_pwr_en_default {
+ pins = "mpp4"; /* MPP_4 */
+ function = "digital"; /* Digital */
+ output-high; /* Output */
+ power-source = <1>;
+ status = "okay";
+ };
+};
diff --git a/arch/arm64/boot/dts/qcom/dsi-panel-osd-disp-fwvga-video.dtsi b/arch/arm64/boot/dts/qcom/dsi-panel-osd-disp-fwvga-video.dtsi
index 0967a500746d..5692a6953a35 100644
--- a/arch/arm64/boot/dts/qcom/dsi-panel-osd-disp-fwvga-video.dtsi
+++ b/arch/arm64/boot/dts/qcom/dsi-panel-osd-disp-fwvga-video.dtsi
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2014-2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -28,7 +28,7 @@
qcom,mdss-dsi-h-sync-skew = <0>;
qcom,mdss-dsi-v-back-porch = <10>;
qcom,mdss-dsi-v-front-porch = <10>;
- qcom,mdss-dsi-v-pulse-width = <20>;
+ qcom,mdss-dsi-v-pulse-width = <5>;
qcom,mdss-dsi-h-left-border = <0>;
qcom,mdss-dsi-h-right-border = <0>;
qcom,mdss-dsi-v-top-border = <0>;
diff --git a/arch/arm64/boot/dts/qcom/msm8909-pinctrl.dtsi b/arch/arm64/boot/dts/qcom/msm8909-pinctrl.dtsi
index 656385d88850..f7746c1a3dc9 100644
--- a/arch/arm64/boot/dts/qcom/msm8909-pinctrl.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8909-pinctrl.dtsi
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2014-2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -289,7 +289,7 @@
};
};
- pmx_mdss {
+ pmx_mdss: pmx_mdss {
mdss_dsi_active: mdss_dsi_active {
mux {
pins = "gpio25", "gpio37";
@@ -343,6 +343,20 @@
};
};
+ mdss_dsi_select_gpio: mdss_dsi_select_gpio {
+ mux {
+ pins = "gpio70";
+ function = "gpio";
+ };
+
+ config {
+ pins = "gpio70";
+ drive-strength = <8>;
+ bias-pull-down;
+ output-low;
+ };
+ };
+
spi0 {
spi0_default: spi0_default {
mux {
diff --git a/arch/arm64/boot/dts/qcom/sda845-svr.dtsi b/arch/arm64/boot/dts/qcom/sda845-svr.dtsi
index 2426b472c382..ece1392514c2 100644
--- a/arch/arm64/boot/dts/qcom/sda845-svr.dtsi
+++ b/arch/arm64/boot/dts/qcom/sda845-svr.dtsi
@@ -1,4 +1,4 @@
-/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -80,7 +80,15 @@
qcom,disable-ctm;
};
+&ipa_hw {
+ status="disabled";
+};
+
&soc {
+ qcom,rmnet-ipa {
+ status="disabled";
+ };
+
qcom,qbt1000 {
status = "disabled";
};
diff --git a/arch/arm64/boot/dts/qcom/sdm845-v2-mtp.dts b/arch/arm64/boot/dts/qcom/sdm845-v2-mtp.dts
index cea38e6fe7fd..1b86ab1faec3 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-v2-mtp.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-v2-mtp.dts
@@ -1,4 +1,4 @@
-/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2017,2019 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -16,6 +16,7 @@
#include "sdm845-v2.dtsi"
#include "sdm845-sde-display.dtsi"
#include "sdm845-mtp.dtsi"
+#include "sdm845-audio-overlay.dtsi"
/ {
model = "Qualcomm Technologies, Inc. MSM sdm845 V2 MTP";
diff --git a/arch/arm64/boot/dts/qcom/sdm845-v2.1-mtp.dts b/arch/arm64/boot/dts/qcom/sdm845-v2.1-mtp.dts
new file mode 100644
index 000000000000..9b1ae80d6585
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sdm845-v2.1-mtp.dts
@@ -0,0 +1,25 @@
+/* Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+
+/dts-v1/;
+
+#include "sdm845-v2.1.dtsi"
+#include "sdm845-sde-display.dtsi"
+#include "sdm845-mtp.dtsi"
+#include "sdm845-audio-overlay.dtsi"
+
+/ {
+ model = "Qualcomm Technologies, Inc. MSM sdm845 V2.1 MTP";
+ compatible = "qcom,sdm845-mtp", "qcom,sdm845", "qcom,mtp";
+ qcom,board-id = <8 0>;
+};
diff --git a/arch/arm64/boot/dts/qcom/sdm845-v2.1-rb3.dtsi b/arch/arm64/boot/dts/qcom/sdm845-v2.1-rb3.dtsi
index 5e1291a54df3..103334c36c00 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-v2.1-rb3.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-v2.1-rb3.dtsi
@@ -332,3 +332,7 @@
};
};
};
+
+&qcom_seecom {
+ /delete-property/ qcom,commonlib64-loaded-by-uefi;
+};
diff --git a/arch/arm64/boot/dts/qcom/sdw3300-bg-1gb-wtp.dts b/arch/arm64/boot/dts/qcom/sdw3300-bg-1gb-wtp.dts
new file mode 100644
index 000000000000..cf24032a3c01
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sdw3300-bg-1gb-wtp.dts
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+/dts-v1/;
+
+#include "sdm429-spyro.dtsi"
+#include "sdm429-spyro-qrd-evt.dtsi"
+/ {
+ model = "Qualcomm Technologies, Inc. SDM429W BG 1GB WTP";
+ compatible = "qcom,sdm429w-qrd", "qcom,sdm429w", "qcom,qrd";
+ qcom,msm-id = <416 0x0>;
+ qcom,board-id = <0x00010b 8>;
+ qcom,pmic-id = <0x0002001b 0x0 0x0 0x0>;
+};
+
+&usb_otg {
+ HSUSB_3p3-supply = <&L16A>;
+};
+
+&msm_dig_codec {
+ cdc-vdd-digital-supply = <&pm660_l11>;
+};
+
+&ext_smart_pa {
+ dvdd-supply = <&pm660_l11>;
+};
+
+&blsp1_uart2 {
+ status = "okay";
+};
+
+&thermal_zones {
+ /delete-node/ emmc-therm-adc;
+ /delete-node/ aoss0-lowf;
+ /delete-node/ mdm-core-lowf;
+ /delete-node/ lpass-lowf;
+ /delete-node/ camera-lowf;
+ /delete-node/ cpuss1-lowf;
+ /delete-node/ apc1-cpu0-lowf;
+ /delete-node/ apc1-cpu1-lowf;
+ /delete-node/ apc1-cpu2-lowf;
+ /delete-node/ apc1-cpu3-lowf;
+ /delete-node/ cpuss0-lowf;
+ /delete-node/ gpu-lowf;
+};
+
+&firmware {
+ android {
+ fstab {
+ /delete-node/ system ;
+ };
+ };
+};
diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c
index f62d96dcf636..676ffe8072c9 100644
--- a/drivers/char/adsprpc.c
+++ b/drivers/char/adsprpc.c
@@ -2481,8 +2481,20 @@ static int fastrpc_munmap_on_dsp_rh(struct fastrpc_file *fl, uint64_t phys,
VERIFY(err, 0 == (err = fastrpc_internal_invoke(fl,
FASTRPC_MODE_PARALLEL, 1, &ioctl)));
+ if (err == AEE_EUNSUPPORTED) {
+ remote_arg_t ra[1];
+
+ pr_warn("ADSPRPC:Failed to get security key with updated remote call, falling back to older method");
+ ra[0].buf.pv = (void *)&routargs;
+ ra[0].buf.len = sizeof(routargs);
+ ioctl.inv.sc = REMOTE_SCALARS_MAKE(7, 0, 1);
+ ioctl.inv.pra = ra;
+ VERIFY(err, 0 == (err = fastrpc_internal_invoke(fl,
+ FASTRPC_MODE_PARALLEL, 1, &ioctl)));
+ }
if (err)
goto bail;
+
desc.args[0] = TZ_PIL_AUTH_QDSP6_PROC;
desc.args[1] = phys;
desc.args[2] = size;
@@ -2764,6 +2776,7 @@ static int fastrpc_internal_mmap(struct fastrpc_file *fl,
mutex_lock(&fl->fl_map_mutex);
if (!fastrpc_mmap_find(fl, ud->fd, (uintptr_t)ud->vaddrin,
ud->size, ud->flags, 1, &map)) {
+ ud->vaddrout = map->raddr;
mutex_unlock(&fl->fl_map_mutex);
mutex_unlock(&fl->map_mutex);
return 0;
@@ -2806,11 +2819,10 @@ static void fastrpc_channel_close(struct kref *kref)
ctx = container_of(kref, struct fastrpc_channel_ctx, kref);
cid = ctx - &gcinfo[0];
- if (!me->glink)
- smd_close(ctx->chan);
- else
+ if (me->glink) {
fastrpc_glink_close(ctx->chan, cid);
- ctx->chan = NULL;
+ ctx->chan = NULL;
+ }
mutex_unlock(&me->smd_mutex);
pr_info("'closed /dev/%s c %d %d'\n", gcinfo[cid].name,
MAJOR(me->dev_no), cid);
@@ -3423,16 +3435,23 @@ static int fastrpc_channel_open(struct fastrpc_file *fl)
if (err)
goto bail;
VERIFY(err, 0 == fastrpc_glink_open(cid));
+ VERIFY(err,
+ wait_for_completion_timeout(&me->channel[cid].workport,
+ RPC_TIMEOUT));
} else {
- VERIFY(err, !smd_named_open_on_edge(FASTRPC_SMD_GUID,
+ if (me->channel[cid].chan == NULL) {
+ VERIFY(err, !smd_named_open_on_edge(
+ FASTRPC_SMD_GUID,
gcinfo[cid].channel,
(smd_channel_t **)&me->channel[cid].chan,
(void *)(uintptr_t)cid,
smd_event_handler));
- }
VERIFY(err,
wait_for_completion_timeout(&me->channel[cid].workport,
RPC_TIMEOUT));
+
+ }
+ }
if (err) {
me->channel[cid].chan = NULL;
goto bail;
diff --git a/drivers/char/adsprpc_shared.h b/drivers/char/adsprpc_shared.h
index 9c171abfd2d3..24fad7664204 100644
--- a/drivers/char/adsprpc_shared.h
+++ b/drivers/char/adsprpc_shared.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -125,6 +125,9 @@ do {\
} while (0)
#endif
+/* Fall back to older APIS in case API is not supported */
+#define AEE_EUNSUPPORTED 20
+
#define remote_arg64_t union remote_arg64
struct remote_buf64 {
diff --git a/drivers/char/diag/diag_masks.c b/drivers/char/diag/diag_masks.c
index c67f0732a18a..4335ad47cc14 100644
--- a/drivers/char/diag/diag_masks.c
+++ b/drivers/char/diag/diag_masks.c
@@ -896,7 +896,8 @@ static int diag_cmd_set_msg_mask(unsigned char *src_buf, int src_len,
goto end;
if (mask_size + write_len > dest_len)
mask_size = dest_len - write_len;
- memcpy(dest_buf + write_len, src_buf + header_len, mask_size);
+ if (mask_size && src_len >= header_len + mask_size)
+ memcpy(dest_buf + write_len, src_buf + header_len, mask_size);
write_len += mask_size;
for (i = 0; i < NUM_MD_SESSIONS; i++) {
if (i == APPS_DATA)
diff --git a/drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c b/drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c
index 7e3021d20459..5899fcf4689a 100644
--- a/drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c
+++ b/drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c
@@ -121,6 +121,9 @@ static ssize_t debugfs_state_info_read(struct file *file,
dsi_ctrl->clk_freq.pix_clk_rate,
dsi_ctrl->clk_freq.esc_clk_rate);
+ if (len > count)
+ len = count;
+
/* TODO: make sure that this does not exceed 4K */
if (copy_to_user(buff, buf, len)) {
kfree(buf);
@@ -176,6 +179,8 @@ static ssize_t debugfs_reg_dump_read(struct file *file,
return rc;
}
+ if (len > count)
+ len = count;
/* TODO: make sure that this does not exceed 4K */
if (copy_to_user(buff, buf, len)) {
diff --git a/drivers/gpu/drm/msm/sde/sde_crtc.c b/drivers/gpu/drm/msm/sde/sde_crtc.c
index f8e3f23b6874..c0fdf7d44b36 100644
--- a/drivers/gpu/drm/msm/sde/sde_crtc.c
+++ b/drivers/gpu/drm/msm/sde/sde_crtc.c
@@ -2301,7 +2301,7 @@ void sde_crtc_prepare_commit(struct drm_crtc *crtc,
}
/**
- * _sde_crtc_complete_flip - signal pending page_flip events
+ * sde_crtc_complete_flip - signal pending page_flip events
* Any pending vblank events are added to the vblank_event_list
* so that the next vblank interrupt shall signal them.
* However PAGE_FLIP events are not handled through the vblank_event_list.
@@ -2311,7 +2311,7 @@ void sde_crtc_prepare_commit(struct drm_crtc *crtc,
* @crtc: Pointer to drm crtc structure
* @file: Pointer to drm file
*/
-static void _sde_crtc_complete_flip(struct drm_crtc *crtc,
+void sde_crtc_complete_flip(struct drm_crtc *crtc,
struct drm_file *file)
{
struct sde_crtc *sde_crtc = to_sde_crtc(crtc);
@@ -2321,19 +2321,23 @@ static void _sde_crtc_complete_flip(struct drm_crtc *crtc,
spin_lock_irqsave(&dev->event_lock, flags);
event = sde_crtc->event;
- if (event) {
- /* if regular vblank case (!file) or if cancel-flip from
- * preclose on file that requested flip, then send the
- * event:
- */
- if (!file || (event->base.file_priv == file)) {
- sde_crtc->event = NULL;
- DRM_DEBUG_VBL("%s: send event: %pK\n",
- sde_crtc->name, event);
- SDE_EVT32_VERBOSE(DRMID(crtc));
- drm_crtc_send_vblank_event(crtc, event);
- }
+ if (!event)
+ goto end;
+
+ /*
+ * if regular vblank case (!file) or if cancel-flip from
+ * preclose on file that requested flip, then send the
+ * event:
+ */
+ if (!file || (event->base.file_priv == file)) {
+ sde_crtc->event = NULL;
+ DRM_DEBUG_VBL("%s: send event: %pK\n",
+ sde_crtc->name, event);
+ SDE_EVT32_VERBOSE(DRMID(crtc));
+ drm_crtc_send_vblank_event(crtc, event);
}
+
+end:
spin_unlock_irqrestore(&dev->event_lock, flags);
}
@@ -2374,7 +2378,6 @@ static void sde_crtc_vblank_cb(void *data)
sde_crtc->vblank_last_cb_time = ktime_get();
sysfs_notify_dirent(sde_crtc->vsync_event_sf);
- _sde_crtc_complete_flip(crtc, NULL);
drm_crtc_handle_vblank(crtc);
DRM_DEBUG_VBL("crtc%d\n", crtc->base.id);
SDE_EVT32_VERBOSE(DRMID(crtc));
@@ -3145,7 +3148,6 @@ static void sde_crtc_atomic_begin(struct drm_crtc *crtc,
struct sde_crtc *sde_crtc;
struct drm_encoder *encoder;
struct drm_device *dev;
- unsigned long flags;
struct sde_kms *sde_kms;
if (!crtc) {
@@ -3179,14 +3181,6 @@ static void sde_crtc_atomic_begin(struct drm_crtc *crtc,
_sde_crtc_setup_lm_bounds(crtc, crtc->state);
}
- if (sde_crtc->event) {
- WARN_ON(sde_crtc->event);
- } else {
- spin_lock_irqsave(&dev->event_lock, flags);
- sde_crtc->event = crtc->state->event;
- spin_unlock_irqrestore(&dev->event_lock, flags);
- }
-
list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
if (encoder->crtc != crtc)
continue;
@@ -3245,7 +3239,6 @@ static void sde_crtc_atomic_flush(struct drm_crtc *crtc,
struct drm_plane *plane;
struct msm_drm_private *priv;
struct msm_drm_thread *event_thread;
- unsigned long flags;
struct sde_crtc_state *cstate;
struct sde_kms *sde_kms;
int idle_time = 0;
@@ -3287,14 +3280,6 @@ static void sde_crtc_atomic_flush(struct drm_crtc *crtc,
event_thread = &priv->event_thread[crtc->index];
idle_time = sde_crtc_get_property(cstate, CRTC_PROP_IDLE_TIMEOUT);
- if (sde_crtc->event) {
- SDE_DEBUG("already received sde_crtc->event\n");
- } else {
- spin_lock_irqsave(&dev->event_lock, flags);
- sde_crtc->event = crtc->state->event;
- spin_unlock_irqrestore(&dev->event_lock, flags);
- }
-
/*
* If no mixers has been allocated in sde_crtc_atomic_check(),
* it means we are trying to flush a CRTC whose state is disabled:
@@ -3740,6 +3725,7 @@ void sde_crtc_commit_kickoff(struct drm_crtc *crtc,
struct sde_crtc_state *cstate;
bool is_error, reset_req;
enum sde_crtc_idle_pc_state idle_pc_state;
+ unsigned long flags;
if (!crtc) {
SDE_ERROR("invalid argument\n");
@@ -3846,6 +3832,15 @@ void sde_crtc_commit_kickoff(struct drm_crtc *crtc,
sde_encoder_kickoff(encoder, false);
}
+ /* store the event after frame trigger */
+ if (sde_crtc->event) {
+ WARN_ON(sde_crtc->event);
+ } else {
+ spin_lock_irqsave(&dev->event_lock, flags);
+ sde_crtc->event = crtc->state->event;
+ spin_unlock_irqrestore(&dev->event_lock, flags);
+ }
+
SDE_ATRACE_END("crtc_commit");
return;
}
@@ -4967,14 +4962,6 @@ int sde_crtc_vblank(struct drm_crtc *crtc, bool en)
return 0;
}
-void sde_crtc_cancel_pending_flip(struct drm_crtc *crtc, struct drm_file *file)
-{
- struct sde_crtc *sde_crtc = to_sde_crtc(crtc);
-
- SDE_DEBUG("%s: cancel: %pK\n", sde_crtc->name, file);
- _sde_crtc_complete_flip(crtc, file);
-}
-
int sde_crtc_helper_reset_custom_properties(struct drm_crtc *crtc,
struct drm_crtc_state *crtc_state)
{
diff --git a/drivers/gpu/drm/msm/sde/sde_crtc.h b/drivers/gpu/drm/msm/sde/sde_crtc.h
index 6124ebf5f22d..4144fb4df912 100644
--- a/drivers/gpu/drm/msm/sde/sde_crtc.h
+++ b/drivers/gpu/drm/msm/sde/sde_crtc.h
@@ -566,11 +566,11 @@ struct drm_crtc *sde_crtc_init(struct drm_device *dev, struct drm_plane *plane);
int sde_crtc_post_init(struct drm_device *dev, struct drm_crtc *crtc);
/**
- * sde_crtc_cancel_pending_flip - complete flip for clients on lastclose
+ * sde_crtc_complete_flip - complete flip for clients
* @crtc: Pointer to drm crtc object
* @file: client to cancel's file handle
*/
-void sde_crtc_cancel_pending_flip(struct drm_crtc *crtc, struct drm_file *file);
+void sde_crtc_complete_flip(struct drm_crtc *crtc, struct drm_file *file);
/**
* sde_crtc_register_custom_event - api for enabling/disabling crtc event
diff --git a/drivers/gpu/drm/msm/sde/sde_encoder_phys_cmd.c b/drivers/gpu/drm/msm/sde/sde_encoder_phys_cmd.c
index d6e8fd34e051..9a0d9735bf07 100644
--- a/drivers/gpu/drm/msm/sde/sde_encoder_phys_cmd.c
+++ b/drivers/gpu/drm/msm/sde/sde_encoder_phys_cmd.c
@@ -1180,8 +1180,24 @@ static int _sde_encoder_phys_cmd_wait_for_ctl_start(
else
ret = 0;
- if (sde_encoder_phys_cmd_is_master(phys_enc))
+ if (sde_encoder_phys_cmd_is_master(phys_enc)) {
+ /*
+ * Signaling the retire fence at ctl start timeout
+ * to allow the next commit and avoid device freeze.
+ * As ctl start timeout can occurs due to no read ptr,
+ * updating pending_rd_ptr_cnt here may not cover all
+ * cases. Hence signaling the retire fence.
+ */
+ if (atomic_add_unless(
+ &phys_enc->pending_retire_fence_cnt, -1, 0))
+ phys_enc->parent_ops.handle_frame_done(
+ phys_enc->parent,
+ phys_enc,
+ SDE_ENCODER_FRAME_EVENT_SIGNAL_RETIRE_FENCE);
+ atomic_add_unless(
+ &phys_enc->pending_ctlstart_cnt, -1, 0);
atomic_inc_return(&phys_enc->ctlstart_timeout);
+ }
}
return ret;
diff --git a/drivers/gpu/drm/msm/sde/sde_kms.c b/drivers/gpu/drm/msm/sde/sde_kms.c
index 6cbd663bec09..dca2e095f8ca 100644
--- a/drivers/gpu/drm/msm/sde/sde_kms.c
+++ b/drivers/gpu/drm/msm/sde/sde_kms.c
@@ -1121,6 +1121,8 @@ static void sde_kms_wait_for_commit_done(struct msm_kms *kms,
SDE_ERROR("wait for commit done returned %d\n", ret);
break;
}
+
+ sde_crtc_complete_flip(crtc, NULL);
}
}
@@ -2295,8 +2297,9 @@ static void sde_kms_preclose(struct msm_kms *kms, struct drm_file *file)
struct drm_atomic_state *state = NULL;
int ret = 0;
+ /* cancel pending flip event */
for (i = 0; i < priv->num_crtcs; i++)
- sde_crtc_cancel_pending_flip(priv->crtcs[i], file);
+ sde_crtc_complete_flip(priv->crtcs[i], file);
drm_modeset_lock_all(dev);
state = drm_atomic_state_alloc(dev);
diff --git a/drivers/gpu/msm/kgsl.c b/drivers/gpu/msm/kgsl.c
index 2b83d44c2de4..66102af23356 100644
--- a/drivers/gpu/msm/kgsl.c
+++ b/drivers/gpu/msm/kgsl.c
@@ -3337,12 +3337,16 @@ long kgsl_ioctl_sparse_phys_alloc(struct kgsl_device_private *dev_priv,
unsigned int cmd, void *data)
{
struct kgsl_process_private *process = dev_priv->process_priv;
+ struct kgsl_device *device = dev_priv->device;
struct kgsl_sparse_phys_alloc *param = data;
struct kgsl_mem_entry *entry;
uint64_t flags;
int ret;
int id;
+ if (!(device->flags & KGSL_FLAG_SPARSE))
+ return -ENOTSUPP;
+
ret = _sparse_alloc_param_sanity_check(param->size, param->pagesize);
if (ret)
return ret;
@@ -3422,9 +3426,13 @@ long kgsl_ioctl_sparse_phys_free(struct kgsl_device_private *dev_priv,
unsigned int cmd, void *data)
{
struct kgsl_process_private *process = dev_priv->process_priv;
+ struct kgsl_device *device = dev_priv->device;
struct kgsl_sparse_phys_free *param = data;
struct kgsl_mem_entry *entry;
+ if (!(device->flags & KGSL_FLAG_SPARSE))
+ return -ENOTSUPP;
+
entry = kgsl_sharedmem_find_id_flags(process, param->id,
KGSL_MEMFLAGS_SPARSE_PHYS);
if (entry == NULL)
@@ -3454,10 +3462,14 @@ long kgsl_ioctl_sparse_virt_alloc(struct kgsl_device_private *dev_priv,
unsigned int cmd, void *data)
{
struct kgsl_process_private *private = dev_priv->process_priv;
+ struct kgsl_device *device = dev_priv->device;
struct kgsl_sparse_virt_alloc *param = data;
struct kgsl_mem_entry *entry;
int ret;
+ if (!(device->flags & KGSL_FLAG_SPARSE))
+ return -ENOTSUPP;
+
ret = _sparse_alloc_param_sanity_check(param->size, param->pagesize);
if (ret)
return ret;
@@ -3498,9 +3510,13 @@ long kgsl_ioctl_sparse_virt_free(struct kgsl_device_private *dev_priv,
unsigned int cmd, void *data)
{
struct kgsl_process_private *process = dev_priv->process_priv;
+ struct kgsl_device *device = dev_priv->device;
struct kgsl_sparse_virt_free *param = data;
struct kgsl_mem_entry *entry = NULL;
+ if (!(device->flags & KGSL_FLAG_SPARSE))
+ return -ENOTSUPP;
+
entry = kgsl_sharedmem_find_id_flags(process, param->id,
KGSL_MEMFLAGS_SPARSE_VIRT);
if (entry == NULL)
@@ -3847,6 +3863,7 @@ long kgsl_ioctl_sparse_bind(struct kgsl_device_private *dev_priv,
unsigned int cmd, void *data)
{
struct kgsl_process_private *private = dev_priv->process_priv;
+ struct kgsl_device *device = dev_priv->device;
struct kgsl_sparse_bind *param = data;
struct kgsl_sparse_binding_object obj;
struct kgsl_mem_entry *virt_entry;
@@ -3855,6 +3872,9 @@ long kgsl_ioctl_sparse_bind(struct kgsl_device_private *dev_priv,
int ret = 0;
int i = 0;
+ if (!(device->flags & KGSL_FLAG_SPARSE))
+ return -ENOTSUPP;
+
ptr = (void __user *) (uintptr_t) param->list;
if (param->size > sizeof(struct kgsl_sparse_binding_object) ||
@@ -3910,6 +3930,9 @@ long kgsl_ioctl_gpu_sparse_command(struct kgsl_device_private *dev_priv,
long result;
unsigned int i = 0;
+ if (!(device->flags & KGSL_FLAG_SPARSE))
+ return -ENOTSUPP;
+
/* Make sure sparse and syncpoint count isn't too big */
if (param->numsparse > KGSL_MAX_SPARSE ||
param->numsyncs > KGSL_MAX_SYNCPOINTS)
@@ -4665,6 +4688,9 @@ int kgsl_device_platform_probe(struct kgsl_device *device)
/* Initialize logging first, so that failures below actually print. */
kgsl_device_debugfs_init(device);
+ /* Disable the sparse ioctl invocation as they are not used */
+ device->flags &= ~KGSL_FLAG_SPARSE;
+
status = kgsl_pwrctrl_init(device);
if (status)
goto error;
diff --git a/drivers/gpu/msm/kgsl.h b/drivers/gpu/msm/kgsl.h
index b9f5017fac77..8456be78e78a 100644
--- a/drivers/gpu/msm/kgsl.h
+++ b/drivers/gpu/msm/kgsl.h
@@ -315,7 +315,7 @@ struct kgsl_event {
void *priv;
struct list_head node;
unsigned int created;
- struct kthread_work work;
+ struct work_struct work;
int result;
struct kgsl_event_group *group;
};
diff --git a/drivers/gpu/msm/kgsl_device.h b/drivers/gpu/msm/kgsl_device.h
index 6ae38a314e9e..229e206727ab 100644
--- a/drivers/gpu/msm/kgsl_device.h
+++ b/drivers/gpu/msm/kgsl_device.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2002,2007-2018, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2002,2007-2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -66,6 +66,7 @@ enum kgsl_event_results {
};
#define KGSL_FLAG_WAKE_ON_TOUCH BIT(0)
+#define KGSL_FLAG_SPARSE BIT(1)
/*
* "list" of event types for ftrace symbolic magic
diff --git a/drivers/gpu/msm/kgsl_events.c b/drivers/gpu/msm/kgsl_events.c
index 759a96601170..47582daf87d7 100644
--- a/drivers/gpu/msm/kgsl_events.c
+++ b/drivers/gpu/msm/kgsl_events.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-2017, 2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -32,7 +32,7 @@ static inline void signal_event(struct kgsl_device *device,
{
list_del(&event->node);
event->result = result;
- kthread_queue_work(&kgsl_driver.worker, &event->work);
+ queue_work(device->events_wq, &event->work);
}
/**
@@ -42,7 +42,7 @@ static inline void signal_event(struct kgsl_device *device,
* Each event callback has its own work struct and is run on a event specific
* workqeuue. This is the worker that queues up the event callback function.
*/
-static void _kgsl_event_worker(struct kthread_work *work)
+static void _kgsl_event_worker(struct work_struct *work)
{
struct kgsl_event *event = container_of(work, struct kgsl_event, work);
int id = KGSL_CONTEXT_ID(event->context);
@@ -286,7 +286,7 @@ int kgsl_add_event(struct kgsl_device *device, struct kgsl_event_group *group,
event->created = jiffies;
event->group = group;
- kthread_init_work(&event->work, _kgsl_event_worker);
+ INIT_WORK(&event->work, _kgsl_event_worker);
trace_kgsl_register_event(KGSL_CONTEXT_ID(context), timestamp, func);
@@ -301,7 +301,7 @@ int kgsl_add_event(struct kgsl_device *device, struct kgsl_event_group *group,
if (timestamp_cmp(retired, timestamp) >= 0) {
event->result = KGSL_EVENT_RETIRED;
- kthread_queue_work(&kgsl_driver.worker, &event->work);
+ queue_work(device->events_wq, &event->work);
spin_unlock(&group->lock);
return 0;
}
diff --git a/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c b/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c
index e63c79abcdbb..d58dc78f6c06 100644
--- a/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c
+++ b/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c
@@ -1490,8 +1490,6 @@ static int cpp_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
{
uint32_t i;
int rc = -1;
- int counter = 0;
- u32 result = 0;
struct cpp_device *cpp_dev = NULL;
struct msm_device_queue *processing_q = NULL;
struct msm_device_queue *eventData_q = NULL;
@@ -1571,54 +1569,6 @@ static int cpp_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
pr_debug("DEBUG_R1: 0x%x\n",
msm_camera_io_r(cpp_dev->cpp_hw_base + 0x8C));
- /* mask IRQ status */
- msm_camera_io_w(0xB, cpp_dev->cpp_hw_base + 0xC);
-
- /* clear IRQ status */
- msm_camera_io_w(0xFFFFF, cpp_dev->cpp_hw_base + 0x14);
-
- /* MMSS_A_CPP_AXI_CMD = 0x16C, reset 0x1*/
- msm_camera_io_w(0x1, cpp_dev->cpp_hw_base + 0x16C);
-
- while (counter < MSM_CPP_POLL_RETRIES) {
- result = msm_camera_io_r(cpp_dev->cpp_hw_base + 0x10);
- if (result & 0x2)
- break;
- /*
- * Below usleep values are chosen based on experiments
- * and this was the smallest number which works. This
- * sleep is needed to leave enough time for hardware
- * to update status register.
- */
- usleep_range(200, 250);
- counter++;
- }
-
- pr_debug("CPP AXI done counter %d result 0x%x\n",
- counter, result);
-
- /* clear IRQ status */
- msm_camera_io_w(0xFFFFF, cpp_dev->cpp_hw_base + 0x14);
- counter = 0;
- /* MMSS_A_CPP_RST_CMD_0 = 0x8, firmware reset = 0x3DF77 */
- msm_camera_io_w(0x3DF77, cpp_dev->cpp_hw_base + 0x8);
-
- while (counter < MSM_CPP_POLL_RETRIES) {
- result = msm_camera_io_r(cpp_dev->cpp_hw_base + 0x10);
- if (result & 0x1)
- break;
- /*
- * Below usleep values are chosen based on experiments
- * and this was the smallest number which works. This
- * sleep is needed to leave enough time for hardware
- * to update status register.
- */
- usleep_range(200, 250);
- counter++;
- }
- pr_debug("CPP reset done counter %d result 0x%x\n",
- counter, result);
-
msm_camera_io_w(0x0, cpp_dev->base + MSM_CPP_MICRO_CLKEN_CTL);
msm_cpp_clear_timer(cpp_dev);
cpp_release_hardware(cpp_dev);
diff --git a/drivers/media/platform/msm/camera_v2/sensor/msm_sensor.c b/drivers/media/platform/msm/camera_v2/sensor/msm_sensor.c
index cdc67d29ebf1..a9939827cde2 100644
--- a/drivers/media/platform/msm/camera_v2/sensor/msm_sensor.c
+++ b/drivers/media/platform/msm/camera_v2/sensor/msm_sensor.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2018, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -205,6 +205,9 @@ int msm_sensor_power_up(struct msm_sensor_ctrl_t *s_ctrl)
&msm_sensor_secure_func_tbl;
}
}
+#if IS_ENABLED(CONFIG_ARCH_QM215)
+ msleep(60);
+#endif
rc = msm_camera_power_up(power_info, s_ctrl->sensor_device_type,
sensor_i2c_client);
if (rc < 0)
diff --git a/drivers/media/platform/msm/camera_v3/cam_req_mgr/cam_req_mgr_util.c b/drivers/media/platform/msm/camera_v3/cam_req_mgr/cam_req_mgr_util.c
index d531fdcf388b..feee331287d4 100644
--- a/drivers/media/platform/msm/camera_v3/cam_req_mgr/cam_req_mgr_util.c
+++ b/drivers/media/platform/msm/camera_v3/cam_req_mgr/cam_req_mgr_util.c
@@ -52,7 +52,7 @@ int cam_req_mgr_util_init(void)
hdl_tbl = hdl_tbl_local;
spin_unlock_bh(&hdl_tbl_lock);
- bitmap_size = BITS_TO_LONGS(CAM_REQ_MGR_MAX_HANDLES) * sizeof(long);
+ bitmap_size = BITS_TO_LONGS(CAM_REQ_MGR_MAX_HANDLES_V2) * sizeof(long);
hdl_tbl->bitmap = kzalloc(bitmap_size, GFP_KERNEL);
if (!hdl_tbl->bitmap) {
rc = -ENOMEM;
@@ -99,7 +99,7 @@ int cam_req_mgr_util_free_hdls(void)
return -EINVAL;
}
- for (i = 0; i < CAM_REQ_MGR_MAX_HANDLES; i++) {
+ for (i = 0; i < CAM_REQ_MGR_MAX_HANDLES_V2; i++) {
if (hdl_tbl->hdl[i].state == HDL_ACTIVE) {
CAM_ERR(CAM_CRM, "Dev handle = %x session_handle = %x",
hdl_tbl->hdl[i].hdl_value,
@@ -108,7 +108,7 @@ int cam_req_mgr_util_free_hdls(void)
clear_bit(i, hdl_tbl->bitmap);
}
}
- bitmap_zero(hdl_tbl->bitmap, CAM_REQ_MGR_MAX_HANDLES);
+ bitmap_zero(hdl_tbl->bitmap, CAM_REQ_MGR_MAX_HANDLES_V2);
spin_unlock_bh(&hdl_tbl_lock);
return 0;
@@ -120,7 +120,7 @@ static int32_t cam_get_free_handle_index(void)
idx = find_first_zero_bit(hdl_tbl->bitmap, hdl_tbl->bits);
- if (idx >= CAM_REQ_MGR_MAX_HANDLES || idx < 0)
+ if (idx >= CAM_REQ_MGR_MAX_HANDLES_V2 || idx < 0)
return -ENOSR;
set_bit(idx, hdl_tbl->bitmap);
@@ -132,7 +132,7 @@ void cam_dump_tbl_info(void)
{
int i;
- for (i = 0; i < CAM_REQ_MGR_MAX_HANDLES; i++)
+ for (i = 0; i < CAM_REQ_MGR_MAX_HANDLES_V2; i++)
CAM_INFO(CAM_CRM, "session_hdl=%x hdl_value=%x\n"
"type=%d state=%d dev_id=%lld",
hdl_tbl->hdl[i].session_hdl,
@@ -226,7 +226,7 @@ void *cam_get_device_priv(int32_t dev_hdl)
}
idx = CAM_REQ_MGR_GET_HDL_IDX(dev_hdl);
- if (idx >= CAM_REQ_MGR_MAX_HANDLES) {
+ if (idx >= CAM_REQ_MGR_MAX_HANDLES_V2) {
CAM_ERR_RATE_LIMIT(CAM_CRM, "Invalid idx");
goto device_priv_fail;
}
@@ -270,7 +270,7 @@ void *cam_get_device_ops(int32_t dev_hdl)
}
idx = CAM_REQ_MGR_GET_HDL_IDX(dev_hdl);
- if (idx >= CAM_REQ_MGR_MAX_HANDLES) {
+ if (idx >= CAM_REQ_MGR_MAX_HANDLES_V2) {
CAM_ERR(CAM_CRM, "Invalid idx");
goto device_ops_fail;
}
@@ -313,7 +313,7 @@ static int cam_destroy_hdl(int32_t dev_hdl, int dev_hdl_type)
}
idx = CAM_REQ_MGR_GET_HDL_IDX(dev_hdl);
- if (idx >= CAM_REQ_MGR_MAX_HANDLES) {
+ if (idx >= CAM_REQ_MGR_MAX_HANDLES_V2) {
CAM_ERR(CAM_CRM, "Invalid idx %d", idx);
goto destroy_hdl_fail;
}
diff --git a/drivers/media/platform/msm/camera_v3/cam_req_mgr/cam_req_mgr_util.h b/drivers/media/platform/msm/camera_v3/cam_req_mgr/cam_req_mgr_util.h
index 50d6f309da15..5d9b6c07a752 100644
--- a/drivers/media/platform/msm/camera_v3/cam_req_mgr/cam_req_mgr_util.h
+++ b/drivers/media/platform/msm/camera_v3/cam_req_mgr/cam_req_mgr_util.h
@@ -62,7 +62,7 @@ struct handle {
* @bits: size of bit map in bits
*/
struct cam_req_mgr_util_hdl_tbl {
- struct handle hdl[CAM_REQ_MGR_MAX_HANDLES];
+ struct handle hdl[CAM_REQ_MGR_MAX_HANDLES_V2];
void *bitmap;
size_t bits;
};
diff --git a/drivers/misc/qseecom.c b/drivers/misc/qseecom.c
index 14a355401c60..7c5321fbc8a8 100644
--- a/drivers/misc/qseecom.c
+++ b/drivers/misc/qseecom.c
@@ -2676,7 +2676,8 @@ static int qseecom_unmap_ion_allocated_memory(struct qseecom_dev_handle *data)
if (!IS_ERR_OR_NULL(data->client.ihandle)) {
ion_unmap_kernel(qseecom.ion_clnt, data->client.ihandle);
ion_free(qseecom.ion_clnt, data->client.ihandle);
- data->client.ihandle = NULL;
+ memset((void *)&data->client,
+ 0, sizeof(struct qseecom_client_handle));
}
return ret;
}
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_flt.c b/drivers/platform/msm/ipa/ipa_v3/ipa_flt.c
index b0901515b47e..2272f5a8186b 100644
--- a/drivers/platform/msm/ipa/ipa_v3/ipa_flt.c
+++ b/drivers/platform/msm/ipa/ipa_v3/ipa_flt.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -51,7 +51,7 @@ static int ipa3_generate_flt_hw_rule(enum ipa_ip_type ip,
memset(&gen_params, 0, sizeof(gen_params));
gen_params.ipt = ip;
- if (entry->rt_tbl)
+ if (entry->rt_tbl && (!ipa3_check_idr_if_freed(entry->rt_tbl)))
gen_params.rt_tbl_idx = entry->rt_tbl->idx;
else
gen_params.rt_tbl_idx = entry->rule.rt_tbl_idx;
@@ -1400,7 +1400,9 @@ int ipa3_reset_flt(enum ipa_ip_type ip, bool user_only)
entry->ipacm_installed) {
list_del(&entry->link);
entry->tbl->rule_cnt--;
- if (entry->rt_tbl)
+ if (entry->rt_tbl &&
+ (!ipa3_check_idr_if_freed(
+ entry->rt_tbl)))
entry->rt_tbl->ref_cnt--;
/* if rule id was allocated from idr, remove */
rule_id = entry->rule_id;
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_i.h b/drivers/platform/msm/ipa/ipa_v3/ipa_i.h
index 2caa54eae538..511acf39c4ba 100644
--- a/drivers/platform/msm/ipa/ipa_v3/ipa_i.h
+++ b/drivers/platform/msm/ipa/ipa_v3/ipa_i.h
@@ -2586,6 +2586,7 @@ void ipa3_enable_dcd(void);
void ipa3_disable_prefetch(enum ipa_client_type client);
int ipa3_alloc_common_event_ring(void);
int ipa3_allocate_dma_task_for_gsi(void);
+bool ipa3_check_idr_if_freed(void *ptr);
void ipa3_free_dma_task_for_gsi(void);
int ipa3_set_clock_plan_from_pm(int idx);
void __ipa_gsi_irq_rx_scedule_poll(struct ipa3_sys_context *sys);
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_rt.c b/drivers/platform/msm/ipa/ipa_v3/ipa_rt.c
index ed2a43d03f2a..fc039528c89a 100644
--- a/drivers/platform/msm/ipa/ipa_v3/ipa_rt.c
+++ b/drivers/platform/msm/ipa/ipa_v3/ipa_rt.c
@@ -97,6 +97,7 @@ static int ipa_generate_rt_hw_rule(enum ipa_ip_type ip,
proc_ctx = (entry->proc_ctx) ? : entry->hdr->proc_ctx;
if ((proc_ctx == NULL) ||
+ ipa3_check_idr_if_freed(proc_ctx) ||
(proc_ctx->cookie != IPA_PROC_HDR_COOKIE)) {
gen_params.hdr_type = IPAHAL_RT_RULE_HDR_NONE;
gen_params.hdr_ofst = 0;
@@ -730,7 +731,8 @@ struct ipa3_rt_tbl *__ipa3_find_rt_tbl(enum ipa_ip_type ip, const char *name)
set = &ipa3_ctx->rt_tbl_set[ip];
list_for_each_entry(entry, &set->head_rt_tbl_list, link) {
- if (!strcmp(name, entry->name))
+ if (!ipa3_check_idr_if_freed(entry) &&
+ !strcmp(name, entry->name))
return entry;
}
@@ -1367,7 +1369,8 @@ int __ipa3_del_rt_rule(u32 rule_hdl)
if (entry->hdr)
__ipa3_release_hdr(entry->hdr->id);
- else if (entry->proc_ctx)
+ else if (entry->proc_ctx &&
+ (!ipa3_check_idr_if_freed(entry->proc_ctx)))
__ipa3_release_hdr_proc_ctx(entry->proc_ctx->id);
list_del(&entry->link);
entry->tbl->rule_cnt--;
@@ -1568,7 +1571,9 @@ int ipa3_reset_rt(enum ipa_ip_type ip, bool user_only)
tbl->rule_cnt--;
if (rule->hdr)
__ipa3_release_hdr(rule->hdr->id);
- else if (rule->proc_ctx)
+ else if (rule->proc_ctx &&
+ (!ipa3_check_idr_if_freed(
+ rule->proc_ctx)))
__ipa3_release_hdr_proc_ctx(
rule->proc_ctx->id);
rule->cookie = 0;
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c b/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c
index 60af28dc1805..234e7a9fea67 100644
--- a/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c
+++ b/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c
@@ -6272,6 +6272,22 @@ void ipa3_enable_dcd(void)
&idle_indication_cfg);
}
+bool ipa3_check_idr_if_freed(void *ptr)
+{
+ int id;
+ void *iter_ptr;
+
+ spin_lock(&ipa3_ctx->idr_lock);
+ idr_for_each_entry(&ipa3_ctx->ipa_idr, iter_ptr, id) {
+ if ((uintptr_t)ptr == (uintptr_t)iter_ptr) {
+ spin_unlock(&ipa3_ctx->idr_lock);
+ return false;
+ }
+ }
+ spin_unlock(&ipa3_ctx->idr_lock);
+ return true;
+}
+
void ipa3_init_imm_cmd_desc(struct ipa3_desc *desc,
struct ipahal_imm_cmd_pyld *cmd_pyld)
{
diff --git a/drivers/power/supply/qcom/qg-reg.h b/drivers/power/supply/qcom/qg-reg.h
index 69f2e1ed4354..dddc7b0c7998 100644
--- a/drivers/power/supply/qcom/qg-reg.h
+++ b/drivers/power/supply/qcom/qg-reg.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2018 The Linux Foundation. All rights reserved.
+/* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -118,6 +118,7 @@
#define QG_SDAM_ESR_DISCHARGE_DELTA_OFFSET 0x6E /* 4-byte 0x6E-0x71 */
#define QG_SDAM_ESR_CHARGE_SF_OFFSET 0x72 /* 2-byte 0x72-0x73 */
#define QG_SDAM_ESR_DISCHARGE_SF_OFFSET 0x74 /* 2-byte 0x74-0x75 */
+#define QG_SDAM_MAGIC_OFFSET 0x80 /* 4-byte 0x80-0x83 */
#define QG_SDAM_MAX_OFFSET 0xA4
/* Below offset is used by PBS */
diff --git a/drivers/power/supply/qcom/qg-sdam.c b/drivers/power/supply/qcom/qg-sdam.c
index a7cb97e0e53d..95ac8ecc61c9 100644
--- a/drivers/power/supply/qcom/qg-sdam.c
+++ b/drivers/power/supply/qcom/qg-sdam.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2018 The Linux Foundation. All rights reserved.
+/* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -88,6 +88,11 @@ static struct qg_sdam_info sdam_info[] = {
.offset = QG_SDAM_ESR_DISCHARGE_SF_OFFSET,
.length = 2,
},
+ [SDAM_MAGIC] = {
+ .name = "SDAM_MAGIC_OFFSET",
+ .offset = QG_SDAM_MAGIC_OFFSET,
+ .length = 4,
+ },
};
int qg_sdam_write(u8 param, u32 data)
@@ -242,6 +247,23 @@ int qg_sdam_write_all(u32 *sdam_data)
return 0;
}
+int qg_sdam_clear(void)
+{
+ int i, rc = 0;
+ struct qg_sdam *chip = the_chip;
+ u8 data = 0;
+
+ if (!chip) {
+ pr_err("Invalid sdam-chip pointer\n");
+ return -EINVAL;
+ }
+
+ for (i = SDAM_MIN_OFFSET; i <= SDAM_MAX_OFFSET; i++)
+ rc |= qg_sdam_multibyte_write(i, &data, 1);
+
+ return rc;
+}
+
int qg_sdam_init(struct device *dev)
{
int rc;
diff --git a/drivers/power/supply/qcom/qg-sdam.h b/drivers/power/supply/qcom/qg-sdam.h
index 45218a83776e..d365f25def7b 100644
--- a/drivers/power/supply/qcom/qg-sdam.h
+++ b/drivers/power/supply/qcom/qg-sdam.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2018 The Linux Foundation. All rights reserved.
+/* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -14,6 +14,8 @@
#define __QG_SDAM_H__
#define SDAM_TYPE 0x2E
+#define SDAM_MIN_OFFSET 0x45
+#define SDAM_MAX_OFFSET 0xB3
enum qg_sdam_param {
SDAM_VALID,
@@ -28,6 +30,7 @@ enum qg_sdam_param {
SDAM_ESR_DISCHARGE_DELTA,
SDAM_ESR_CHARGE_SF,
SDAM_ESR_DISCHARGE_SF,
+ SDAM_MAGIC,
SDAM_MAX,
};
@@ -43,5 +46,6 @@ int qg_sdam_write_all(u32 *sdam_data);
int qg_sdam_read_all(u32 *sdam_data);
int qg_sdam_multibyte_write(u32 offset, u8 *sdam_data, u32 length);
int qg_sdam_multibyte_read(u32 offset, u8 *sdam_data, u32 length);
+int qg_sdam_clear(void);
#endif
diff --git a/drivers/power/supply/qcom/qpnp-qg.c b/drivers/power/supply/qcom/qpnp-qg.c
index f84e072b21cf..e3ebe66dd425 100644
--- a/drivers/power/supply/qcom/qpnp-qg.c
+++ b/drivers/power/supply/qcom/qpnp-qg.c
@@ -2767,6 +2767,39 @@ static int qg_set_wa_flags(struct qpnp_qg *chip)
return 0;
}
+#define SDAM_MAGIC_NUMBER 0x12345678
+static int qg_sanitize_sdam(struct qpnp_qg *chip)
+{
+ int rc = 0;
+ u32 data = 0;
+
+ rc = qg_sdam_read(SDAM_MAGIC, &data);
+ if (rc < 0) {
+ pr_err("Failed to read SDAM rc=%d\n", rc);
+ return rc;
+ }
+
+ if (data == SDAM_MAGIC_NUMBER) {
+ qg_dbg(chip, QG_DEBUG_PON, "SDAM valid\n");
+ } else if (data == 0) {
+ rc = qg_sdam_write(SDAM_MAGIC, SDAM_MAGIC_NUMBER);
+ if (!rc)
+ qg_dbg(chip, QG_DEBUG_PON, "First boot. SDAM initilized\n");
+ } else {
+ /* SDAM has invalid value */
+ rc = qg_sdam_clear();
+ if (!rc) {
+ pr_err("SDAM uninitialized, SDAM reset\n");
+ rc = qg_sdam_write(SDAM_MAGIC, SDAM_MAGIC_NUMBER);
+ }
+ }
+
+ if (rc < 0)
+ pr_err("Failed in SDAM operation, rc=%d\n", rc);
+
+ return rc;
+}
+
#define ADC_CONV_DLY_512MS 0xA
static int qg_hw_init(struct qpnp_qg *chip)
{
@@ -3794,6 +3827,12 @@ static int qpnp_qg_probe(struct platform_device *pdev)
return rc;
}
+ rc = qg_sanitize_sdam(chip);
+ if (rc < 0) {
+ pr_err("Failed to sanitize SDAM, rc=%d\n", rc);
+ return rc;
+ }
+
rc = qg_soc_init(chip);
if (rc < 0) {
pr_err("Failed to initialize SOC scaling init rc=%d\n", rc);
diff --git a/drivers/soc/qcom/wcnss/wcnss_vreg.c b/drivers/soc/qcom/wcnss/wcnss_vreg.c
index 476ff6070e5b..d4d9a7590943 100644
--- a/drivers/soc/qcom/wcnss/wcnss_vreg.c
+++ b/drivers/soc/qcom/wcnss/wcnss_vreg.c
@@ -585,6 +585,11 @@ static void wcnss_vregs_off(struct vregs_info regulators[], uint size,
wcnss_log(ERR, "vreg %s disable failed (%d)\n",
regulators[i].name, rc);
}
+ /* Free the regulator source */
+ if (regulators[i].state & VREG_GET_REGULATOR_MASK)
+ regulator_put(regulators[i].regulator);
+
+ regulators[i].state = VREG_NULL_CONFIG;
}
}
diff --git a/drivers/usb/gadget/function/f_ecm.c b/drivers/usb/gadget/function/f_ecm.c
index 6b94c39a0ac8..6207b572cee6 100644
--- a/drivers/usb/gadget/function/f_ecm.c
+++ b/drivers/usb/gadget/function/f_ecm.c
@@ -701,7 +701,7 @@ ecm_bind(struct usb_configuration *c, struct usb_function *f)
*/
if (!ecm_opts->bound) {
mutex_lock(&ecm_opts->lock);
- ecm_opts->net = gether_setup_default();
+ ecm_opts->net = gether_setup_name_default("ecm");
if (IS_ERR(ecm_opts->net)) {
status = PTR_ERR(ecm_opts->net);
mutex_unlock(&ecm_opts->lock);
diff --git a/drivers/usb/gadget/function/f_gsi.c b/drivers/usb/gadget/function/f_gsi.c
index 1cd612a13491..51413dc97b84 100644
--- a/drivers/usb/gadget/function/f_gsi.c
+++ b/drivers/usb/gadget/function/f_gsi.c
@@ -535,7 +535,6 @@ static int ipa_connect_channels(struct gsi_data_port *d_port)
{
int ret;
struct f_gsi *gsi = d_port_to_gsi(d_port);
- struct f_gsi *gsi_rmnet_v2x = __gsi[USB_PROT_RMNET_V2X_IPA];
struct ipa_usb_xdci_chan_params *in_params =
&d_port->ipa_in_channel_params;
struct ipa_usb_xdci_chan_params *out_params =
@@ -665,19 +664,16 @@ static int ipa_connect_channels(struct gsi_data_port *d_port)
}
/*
- * When both RmNet LTE and V2X instances are enabled in a composition,
- * set 'is_sw_path' flag to true for LTE, so that IPA can ignore the
- * dummy address for GEVENTCOUNT register.
+ * Set 'is_sw_path' flag to true for functions using normal EPs so that
+ * IPA can ignore the dummy address for GEVENTCOUNT register.
*/
in_params->is_sw_path = false;
- if (gsi->prot_id == USB_PROT_RMNET_IPA &&
- gsi_rmnet_v2x->function.fs_descriptors)
+ if (!d_port->in_ep->ep_intr_num)
in_params->is_sw_path = true;
if (d_port->out_ep) {
out_params->is_sw_path = false;
- if (gsi->prot_id == USB_PROT_RMNET_IPA &&
- gsi_rmnet_v2x->function.fs_descriptors)
+ if (!d_port->out_ep->ep_intr_num)
out_params->is_sw_path = true;
}
@@ -2509,15 +2505,16 @@ static int gsi_set_alt(struct usb_function *f, unsigned int intf,
/*
* Configure EPs for GSI. Note that when both RmNet LTE
- * and V2X instances are enabled in a composition,
- * configure HW accelerated EPs for V2X instance and
- * normal EPs for LTE.
+ * (or ECM) and RmNet V2X instances are enabled in a
+ * composition, configure HW accelerated EPs for V2X
+ * instance and normal EPs for LTE (or ECM).
*/
if (gsi->d_port.in_ep &&
gsi->prot_id <= USB_PROT_RMNET_V2X_IPA) {
if (gsi->prot_id == USB_PROT_DIAG_IPA)
gsi->d_port.in_ep->ep_intr_num = 3;
- else if (gsi->prot_id == USB_PROT_RMNET_IPA &&
+ else if ((gsi->prot_id == USB_PROT_RMNET_IPA ||
+ gsi->prot_id == USB_PROT_ECM_IPA) &&
gsi_rmnet_v2x->function.fs_descriptors)
gsi->d_port.in_ep->ep_intr_num = 0;
else
@@ -2529,8 +2526,9 @@ static int gsi_set_alt(struct usb_function *f, unsigned int intf,
if (gsi->d_port.out_ep &&
gsi->prot_id <= USB_PROT_RMNET_V2X_IPA) {
- if (gsi->prot_id == USB_PROT_RMNET_IPA &&
- gsi_rmnet_v2x->function.fs_descriptors)
+ if ((gsi->prot_id == USB_PROT_RMNET_IPA ||
+ gsi->prot_id == USB_PROT_ECM_IPA) &&
+ gsi_rmnet_v2x->function.fs_descriptors)
gsi->d_port.out_ep->ep_intr_num = 0;
else
gsi->d_port.out_ep->ep_intr_num = 1;
diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c
index 0c71938d837a..53f9beab6bd6 100644
--- a/drivers/usb/gadget/udc/core.c
+++ b/drivers/usb/gadget/udc/core.c
@@ -857,6 +857,8 @@ int usb_gadget_map_request_by_dev(struct device *dev,
dev_err(dev, "failed to map buffer\n");
return -EFAULT;
}
+
+ req->dma_mapped = 1;
}
return 0;
@@ -881,9 +883,10 @@ void usb_gadget_unmap_request_by_dev(struct device *dev,
is_in ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
req->num_mapped_sgs = 0;
- } else if (req->dma != DMA_ERROR_CODE) {
+ } else if (req->dma_mapped) {
dma_unmap_single(dev, req->dma, req->length,
is_in ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
+ req->dma_mapped = 0;
}
}
EXPORT_SYMBOL_GPL(usb_gadget_unmap_request_by_dev);
diff --git a/drivers/video/fbdev/msm/mdss_dsi_panel.c b/drivers/video/fbdev/msm/mdss_dsi_panel.c
index 19de5dabdd3d..4f8015dcd25d 100644
--- a/drivers/video/fbdev/msm/mdss_dsi_panel.c
+++ b/drivers/video/fbdev/msm/mdss_dsi_panel.c
@@ -46,6 +46,7 @@ void mdss_dsi_panel_pwm_cfg(struct mdss_dsi_ctrl_pdata *ctrl)
if (ctrl->pwm_bl == NULL || IS_ERR(ctrl->pwm_bl)) {
pr_err("%s: Error: lpg_chan=%d pwm request failed",
__func__, ctrl->pwm_lpg_chan);
+ ctrl->pwm_bl = NULL;
}
ctrl->pwm_enabled = 0;
}
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 0c76bd1348d6..e67a338b7e2c 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -1741,6 +1741,8 @@ static int f2fs_ioc_getversion(struct file *filp, unsigned long arg)
static int f2fs_ioc_start_atomic_write(struct file *filp)
{
struct inode *inode = file_inode(filp);
+ struct f2fs_inode_info *fi = F2FS_I(inode);
+ struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
int ret;
if (!inode_owner_or_capable(inode))
@@ -1781,6 +1783,12 @@ static int f2fs_ioc_start_atomic_write(struct file *filp)
goto out;
}
+ spin_lock(&sbi->inode_lock[ATOMIC_FILE]);
+ if (list_empty(&fi->inmem_ilist))
+ list_add_tail(&fi->inmem_ilist, &sbi->inode_list[ATOMIC_FILE]);
+ spin_unlock(&sbi->inode_lock[ATOMIC_FILE]);
+
+ /* add inode in inmem_list first and set atomic_file */
set_inode_flag(inode, FI_ATOMIC_FILE);
clear_inode_flag(inode, FI_ATOMIC_REVOKE_REQUEST);
up_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
@@ -1822,11 +1830,8 @@ static int f2fs_ioc_commit_atomic_write(struct file *filp)
goto err_out;
ret = f2fs_do_sync_file(filp, 0, LLONG_MAX, 0, true);
- if (!ret) {
- clear_inode_flag(inode, FI_ATOMIC_FILE);
- F2FS_I(inode)->i_gc_failures[GC_FAILURE_ATOMIC] = 0;
- stat_dec_atomic_write(inode);
- }
+ if (!ret)
+ f2fs_drop_inmem_pages(inode);
} else {
ret = f2fs_do_sync_file(filp, 0, LLONG_MAX, 1, false);
}
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 2a8dc33ed2bc..d45a18c886cf 100755
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -185,8 +185,6 @@ bool f2fs_need_SSR(struct f2fs_sb_info *sbi)
void f2fs_register_inmem_page(struct inode *inode, struct page *page)
{
- struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
- struct f2fs_inode_info *fi = F2FS_I(inode);
struct inmem_pages *new;
f2fs_trace_pid(page);
@@ -200,15 +198,11 @@ void f2fs_register_inmem_page(struct inode *inode, struct page *page)
INIT_LIST_HEAD(&new->list);
/* increase reference count with clean state */
- mutex_lock(&fi->inmem_lock);
get_page(page);
- list_add_tail(&new->list, &fi->inmem_pages);
- spin_lock(&sbi->inode_lock[ATOMIC_FILE]);
- if (list_empty(&fi->inmem_ilist))
- list_add_tail(&fi->inmem_ilist, &sbi->inode_list[ATOMIC_FILE]);
- spin_unlock(&sbi->inode_lock[ATOMIC_FILE]);
+ mutex_lock(&F2FS_I(inode)->inmem_lock);
+ list_add_tail(&new->list, &F2FS_I(inode)->inmem_pages);
inc_page_count(F2FS_I_SB(inode), F2FS_INMEM_PAGES);
- mutex_unlock(&fi->inmem_lock);
+ mutex_unlock(&F2FS_I(inode)->inmem_lock);
trace_f2fs_register_inmem_page(page, INMEM);
}
@@ -330,19 +324,17 @@ void f2fs_drop_inmem_pages(struct inode *inode)
mutex_lock(&fi->inmem_lock);
__revoke_inmem_pages(inode, &fi->inmem_pages,
true, false, true);
-
- if (list_empty(&fi->inmem_pages)) {
- spin_lock(&sbi->inode_lock[ATOMIC_FILE]);
- if (!list_empty(&fi->inmem_ilist))
- list_del_init(&fi->inmem_ilist);
- spin_unlock(&sbi->inode_lock[ATOMIC_FILE]);
- }
mutex_unlock(&fi->inmem_lock);
}
clear_inode_flag(inode, FI_ATOMIC_FILE);
fi->i_gc_failures[GC_FAILURE_ATOMIC] = 0;
stat_dec_atomic_write(inode);
+
+ spin_lock(&sbi->inode_lock[ATOMIC_FILE]);
+ if (!list_empty(&fi->inmem_ilist))
+ list_del_init(&fi->inmem_ilist);
+ spin_unlock(&sbi->inode_lock[ATOMIC_FILE]);
}
void f2fs_drop_inmem_page(struct inode *inode, struct page *page)
@@ -471,11 +463,6 @@ int f2fs_commit_inmem_pages(struct inode *inode)
mutex_lock(&fi->inmem_lock);
err = __f2fs_commit_inmem_pages(inode);
-
- spin_lock(&sbi->inode_lock[ATOMIC_FILE]);
- if (!list_empty(&fi->inmem_ilist))
- list_del_init(&fi->inmem_ilist);
- spin_unlock(&sbi->inode_lock[ATOMIC_FILE]);
mutex_unlock(&fi->inmem_lock);
clear_inode_flag(inode, FI_ATOMIC_COMMIT);
diff --git a/include/linux/diagchar.h b/include/linux/diagchar.h
index d33071c320b1..e04e291d4471 100644
--- a/include/linux/diagchar.h
+++ b/include/linux/diagchar.h
@@ -148,7 +148,7 @@
* a new RANGE of SSIDs to the msg_mask_tbl.
*/
#define MSG_MASK_TBL_CNT 26
-#define APPS_EVENT_LAST_ID 0xCAA
+#define APPS_EVENT_LAST_ID 0xCB4
#define MSG_SSID_0 0
#define MSG_SSID_0_LAST 130
@@ -922,7 +922,7 @@ static const uint32_t msg_bld_masks_25[] = {
/* LOG CODES */
static const uint32_t log_code_last_tbl[] = {
0x0, /* EQUIP ID 0 */
- 0x1C9A, /* EQUIP ID 1 */
+ 0x1CB2, /* EQUIP ID 1 */
0x0, /* EQUIP ID 2 */
0x0, /* EQUIP ID 3 */
0x4910, /* EQUIP ID 4 */
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 418978e5ad98..3aad8b533355 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -148,6 +148,7 @@ struct gsi_channel_info {
* by adding a zero length packet as needed;
* @short_not_ok: When reading data, makes short packets be
* treated as errors (queue stops advancing till cleanup).
+ * @dma_mapped: Indicates if request has been mapped to DMA (internal)
* @complete: Function called when request completes, so this request and
* its buffer may be re-used. The function will always be called with
* interrupts disabled, and it must not sleep.
@@ -204,6 +205,7 @@ struct usb_request {
unsigned no_interrupt:1;
unsigned zero:1;
unsigned short_not_ok:1;
+ unsigned dma_mapped:1;
void (*complete)(struct usb_ep *ep,
struct usb_request *req);
diff --git a/include/uapi/linux/msm_ipa.h b/include/uapi/linux/msm_ipa.h
index 73d65a6718ba..60a5725ff828 100644
--- a/include/uapi/linux/msm_ipa.h
+++ b/include/uapi/linux/msm_ipa.h
@@ -2,6 +2,7 @@
#define _UAPI_MSM_IPA_H_
#ifndef __KERNEL__
+#include <stdio.h>
#include <stdint.h>
#include <stddef.h>
#include <sys/stat.h>
@@ -30,7 +31,7 @@
*/
#define IPA_IPV6CT_DEV_NAME "ipaIpv6CTTable"
- /**
+/**
* name of the default routing tables for v4 and v6
*/
#define IPA_DFLT_RT_TBL_NAME "ipa_dflt_rt"
@@ -108,7 +109,7 @@
#define IPA_IOCTL_GSB_CONNECT 61
#define IPA_IOCTL_GSB_DISCONNECT 62
#define IPA_IOCTL_GET_PHERIPHERAL_EP_INFO 63
-
+#define IPA_IOCTL_GET_NAT_IN_SRAM_INFO 64
/**
* max size of the header to be inserted
@@ -440,7 +441,27 @@ enum ipa_client_type {
(IPA_CLIENT_IS_TEST_PROD(client) || IPA_CLIENT_IS_TEST_CONS(client))
/**
+ * The following is used to describe the types of memory NAT can
+ * reside in.
+ *
+ * PLEASE KEEP THE FOLLOWING IN SYNC WITH ipa3_nat_mem_in_as_str()
+ * BELOW.
+ */
+enum ipa3_nat_mem_in {
+ IPA_NAT_MEM_IN_DDR = 0,
+ IPA_NAT_MEM_IN_SRAM = 1,
+
+ IPA_NAT_MEM_IN_MAX
+};
+
+#define IPA_VALID_NAT_MEM_IN(t) \
+ ((t) >= IPA_NAT_MEM_IN_DDR && (t) < IPA_NAT_MEM_IN_MAX)
+
+/**
* enum ipa_ip_type - Address family: IPv4 or IPv6
+ *
+ * PLEASE KEEP THE FOLLOWING IN SYNC WITH ipa_ip_type_as_str()
+ * BELOW.
*/
enum ipa_ip_type {
IPA_IP_v4,
@@ -448,6 +469,9 @@ enum ipa_ip_type {
IPA_IP_MAX
};
+#define VALID_IPA_IP_TYPE(t) \
+ ((t) >= IPA_IP_v4 && (t) < IPA_IP_MAX)
+
/**
* enum ipa_rule_type - Type of routing or filtering rule
* Hashable: Rule will be located at the hashable tables
@@ -1636,9 +1660,11 @@ struct ipa_ioc_nat_ipv6ct_table_alloc {
* @expn_table_entries: input parameter, ipv4 expansion rules table number of
* entries
* @ip_addr: input parameter, public ip address
+ * @mem_type: input parameter, type of memory the table resides in
+ * @focus_change: input parameter, are we moving to/from sram or ddr
*/
struct ipa_ioc_v4_nat_init {
- uint8_t tbl_index;
+ uint8_t tbl_index;
uint32_t ipv4_rules_offset;
uint32_t expn_rules_offset;
@@ -1648,6 +1674,9 @@ struct ipa_ioc_v4_nat_init {
uint16_t table_entries;
uint16_t expn_table_entries;
uint32_t ip_addr;
+
+ uint8_t mem_type;
+ uint8_t focus_change;
};
/**
@@ -1680,9 +1709,11 @@ struct ipa_ioc_v4_nat_del {
/**
* struct ipa_ioc_nat_ipv6ct_table_del - NAT/IPv6CT table delete parameter
* @table_index: input parameter, index of the table
+ * @mem_type: input parameter, type of memory the table resides in
*/
struct ipa_ioc_nat_ipv6ct_table_del {
uint8_t table_index;
+ uint8_t mem_type;
};
/**
@@ -1706,11 +1737,12 @@ struct ipa_ioc_nat_dma_one {
* struct ipa_ioc_nat_dma_cmd - To hold multiple nat/ipv6ct dma commands
* @entries: number of dma commands in use
* @dma: data pointer to the dma commands
+ * @mem_type: input parameter, type of memory the table resides in
*/
struct ipa_ioc_nat_dma_cmd {
uint8_t entries;
+ uint8_t mem_type;
struct ipa_ioc_nat_dma_one dma[0];
-
};
/**
@@ -2244,6 +2276,10 @@ struct ipa_ioc_bridge_vlan_mapping_info {
IPA_IOCTL_GET_PHERIPHERAL_EP_INFO, \
struct ipa_ioc_get_ep_info)
+#define IPA_IOC_GET_NAT_IN_SRAM_INFO _IOWR(IPA_IOC_MAGIC, \
+ IPA_IOCTL_GET_NAT_IN_SRAM_INFO, \
+ struct ipa_nat_in_sram_info)
+
/*
* unique magic number of the Tethering bridge ioctls
*/
@@ -2333,6 +2369,21 @@ struct teth_ioc_aggr_params {
uint16_t lcid;
};
+/**
+ * struct ipa_nat_in_sram_info - query for nat in sram particulars
+ * @sram_mem_available_for_nat: Amount SRAM available to fit nat table
+ * @nat_table_offset_into_mmap: Offset into mmap'd vm where table will be
+ * @best_nat_in_sram_size_rqst: The size to request for mmap
+ *
+ * The last two elements above are required to deal with situations
+ * where the SRAM's physical address and size don't play nice with
+ * mmap'ings page size and boundary attributes.
+ */
+struct ipa_nat_in_sram_info {
+ uint32_t sram_mem_available_for_nat;
+ uint32_t nat_table_offset_into_mmap;
+ uint32_t best_nat_in_sram_size_rqst;
+};
#define TETH_BRIDGE_IOC_SET_BRIDGE_MODE _IOW(TETH_BRIDGE_IOC_MAGIC, \
TETH_BRIDGE_IOCTL_SET_BRIDGE_MODE, \
diff --git a/net/ipc_router/ipc_router_core.c b/net/ipc_router/ipc_router_core.c
index d62b58250aff..0e5571d4a87a 100644
--- a/net/ipc_router/ipc_router_core.c
+++ b/net/ipc_router/ipc_router_core.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2018, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -430,12 +430,19 @@ static void ipc_router_log_msg(void *log_ctx, u32 xchng_type,
(xchng_type == IPC_ROUTER_LOG_EVENT_RX ? "RX" :
(xchng_type == IPC_ROUTER_LOG_EVENT_TX ? "TX" : "ERR")),
msg->cmd, msg->cli.node_id, msg->cli.port_id);
- else if (msg->cmd == IPC_ROUTER_CTRL_CMD_HELLO && hdr)
+ else if (msg->cmd == IPC_ROUTER_CTRL_CMD_HELLO && hdr) {
IPC_RTR_INFO(log_ctx,
"CTL MSG %s cmd:0x%x ADDR:0x%x",
(xchng_type == IPC_ROUTER_LOG_EVENT_RX ? "RX" :
(xchng_type == IPC_ROUTER_LOG_EVENT_TX ? "TX" : "ERR")),
msg->cmd, hdr->src_node_id);
+ if (hdr->src_node_id == 0 || hdr->src_node_id == 3)
+ pr_err("%s: Modem QMI Readiness %s cmd:0x%x ADDR:0x%x\n",
+ __func__,
+ (xchng_type == IPC_ROUTER_LOG_EVENT_RX ? "RX" :
+ (xchng_type == IPC_ROUTER_LOG_EVENT_TX ? "TX" :
+ "ERR")), msg->cmd, hdr->src_node_id);
+ }
else
IPC_RTR_INFO(log_ctx,
"%s UNKNOWN cmd:0x%x",