From a00ce1c8cbd80275ff14d8616b3f94851056bb0e Mon Sep 17 00:00:00 2001 From: Padmanabhan Komanduru Date: Tue, 7 Aug 2018 18:09:07 +0530 Subject: [PATCH 01/18] clk: qcom: check for change in RCG configuration during set_rate For DSI byte clock RCG, check if there is a change in existing settings before updating RCG configuration. This is needed to avoid glitch on the display panel when there is a change in the DSI byte clock frequency with display enabled. Change-Id: I8ef0331cbb466b399cd12199b4d335ed44997dbc Signed-off-by: Padmanabhan Komanduru --- drivers/clk/qcom/clk-rcg2.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/drivers/clk/qcom/clk-rcg2.c b/drivers/clk/qcom/clk-rcg2.c index 3c3cf8e04eea..f22e07e87967 100644 --- a/drivers/clk/qcom/clk-rcg2.c +++ b/drivers/clk/qcom/clk-rcg2.c @@ -313,6 +313,39 @@ static int clk_rcg2_determine_rate(struct clk_hw *hw, return _freq_tbl_determine_rate(hw, rcg->freq_tbl, req); } +static bool clk_rcg2_current_config(struct clk_rcg2 *rcg, + const struct freq_tbl *f) +{ + struct clk_hw *hw = &rcg->clkr.hw; + u32 cfg, mask, new_cfg; + int index; + + if (rcg->mnd_width) { + mask = BIT(rcg->mnd_width) - 1; + regmap_read(rcg->clkr.regmap, rcg->cmd_rcgr + M_REG, &cfg); + if ((cfg & mask) != (f->m & mask)) + return false; + + regmap_read(rcg->clkr.regmap, rcg->cmd_rcgr + N_REG, &cfg); + if ((cfg & mask) != (~(f->n - f->m) & mask)) + return false; + } + + mask = (BIT(rcg->hid_width) - 1) | CFG_SRC_SEL_MASK; + + index = qcom_find_src_index(hw, rcg->parent_map, f->src); + + new_cfg = ((f->pre_div << CFG_SRC_DIV_SHIFT) | + (rcg->parent_map[index].cfg << CFG_SRC_SEL_SHIFT)) & mask; + + regmap_read(rcg->clkr.regmap, rcg->cmd_rcgr + CFG_REG, &cfg); + + if (new_cfg != (cfg & mask)) + return false; + + return true; +} + static int clk_rcg2_configure(struct clk_rcg2 *rcg, const struct freq_tbl *f) { u32 cfg, mask, old_cfg; @@ -984,6 +1017,8 @@ static int clk_byte2_set_rate(struct clk_hw *hw, unsigned long rate, for (i = 0; i < num_parents; i++) { if (cfg == rcg->parent_map[i].cfg) { f.src = rcg->parent_map[i].src; + if (clk_rcg2_current_config(rcg, &f)) + return 0; return clk_rcg2_configure(rcg, &f); } } From 153e3048f9cb3d1d90c48e329f1dca1133d50d0f Mon Sep 17 00:00:00 2001 From: Naitik Bharadiya Date: Mon, 10 Sep 2018 11:01:08 +0530 Subject: [PATCH 02/18] defconfig: msm8998: align with android config requirement Align with android-base.cfg which is android kernel config requirement for msm8998_defconfig. Change-Id: I69cbca16705d25b5505792b11ae4f054be09457f Signed-off-by: Naitik Bharadiya --- arch/arm64/configs/msmcortex_defconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/configs/msmcortex_defconfig b/arch/arm64/configs/msmcortex_defconfig index c11c1756bc27..7015528d0a3c 100644 --- a/arch/arm64/configs/msmcortex_defconfig +++ b/arch/arm64/configs/msmcortex_defconfig @@ -1,4 +1,5 @@ # CONFIG_LOCALVERSION_AUTO is not set +# CONFIG_USELIB is not set CONFIG_AUDIT=y # CONFIG_AUDITSYSCALL is not set CONFIG_NO_HZ=y @@ -104,6 +105,7 @@ CONFIG_NET_IPVTI=y CONFIG_INET_AH=y CONFIG_INET_ESP=y CONFIG_INET_IPCOMP=y +# CONFIG_INET_LRO is not set CONFIG_INET_UDP_DIAG=y CONFIG_INET_DIAG_DESTROY=y CONFIG_IPV6_ROUTER_PREF=y @@ -322,6 +324,8 @@ CONFIG_INPUT_STMVL53L0=y # CONFIG_SERIO_SERPORT is not set # CONFIG_VT is not set # CONFIG_LEGACY_PTYS is not set +# CONFIG_DEVMEM is not set +# CONFIG_DEVKMEM is not set CONFIG_SERIAL_MSM=y CONFIG_SERIAL_MSM_CONSOLE=y CONFIG_SERIAL_MSM_HS=y From 4bb119b248562c17a3789ed7357478dc0bee35ed Mon Sep 17 00:00:00 2001 From: Yue Ma Date: Mon, 10 Sep 2018 17:27:01 -0700 Subject: [PATCH 03/18] cnss2: Clear CNSS_DEV_ERR_NOTIFY after collecting firmware dump CNSS_DEV_ERR_NOTIFY should not be cleared before collecting firmware dump as device is still in asserted state. Clear it after collecting firmware dump. Change-Id: Ic57c65d8ffa1806a0af83e653d6573f19ab1e705 Signed-off-by: Yue Ma --- drivers/net/wireless/cnss2/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/cnss2/main.c b/drivers/net/wireless/cnss2/main.c index 10bcad10bb20..acf65e4904d6 100644 --- a/drivers/net/wireless/cnss2/main.c +++ b/drivers/net/wireless/cnss2/main.c @@ -952,8 +952,8 @@ static int cnss_do_recovery(struct cnss_plat_data *plat_priv, goto self_recovery; break; case CNSS_REASON_RDDM: - clear_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state); cnss_bus_collect_dump_info(plat_priv); + clear_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state); break; case CNSS_REASON_DEFAULT: case CNSS_REASON_TIMEOUT: From e21205e3338798a0e9a557d9cbf69c225c5d0f5e Mon Sep 17 00:00:00 2001 From: Teng Fei Fan Date: Mon, 3 Sep 2018 10:39:20 +0800 Subject: [PATCH 04/18] ARM: dts: msm: add initial dts support for SDM455 MTP devices Add initial device trees for SDM455 MTP devices Change-Id: I8b8f3038ae435db9ea87c7e6a72d79e82f72806f Signed-off-by: Teng Fei Fan --- arch/arm/boot/dts/qcom/Makefile | 3 ++- arch/arm/boot/dts/qcom/sdm455-mtp.dts | 31 ++++++++++++++++++++++++++ arch/arm/boot/dts/qcom/sdm455-mtp.dtsi | 13 +++++++++++ arch/arm/boot/dts/qcom/sdm455.dtsi | 20 +++++++++++++++++ 4 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/qcom/sdm455-mtp.dts create mode 100644 arch/arm/boot/dts/qcom/sdm455-mtp.dtsi create mode 100644 arch/arm/boot/dts/qcom/sdm455.dtsi diff --git a/arch/arm/boot/dts/qcom/Makefile b/arch/arm/boot/dts/qcom/Makefile index c4aab713cb67..63caa04f1a98 100644 --- a/arch/arm/boot/dts/qcom/Makefile +++ b/arch/arm/boot/dts/qcom/Makefile @@ -289,7 +289,8 @@ dtb-$(CONFIG_ARCH_SDM630) += sdm630-rumi.dtb \ sdm630-headset-jacktype-no-cdp.dtb \ sdm630-headset-jacktype-no-rcm.dtb \ sdm630-pm660a-headset-jacktype-no-cdp.dtb \ - sdm630-pm660a-headset-jacktype-no-rcm.dtb + sdm630-pm660a-headset-jacktype-no-rcm.dtb \ + sdm455-mtp.dtb ifeq ($(CONFIG_ARM64),y) always := $(dtb-y) diff --git a/arch/arm/boot/dts/qcom/sdm455-mtp.dts b/arch/arm/boot/dts/qcom/sdm455-mtp.dts new file mode 100644 index 000000000000..87d5834be01a --- /dev/null +++ b/arch/arm/boot/dts/qcom/sdm455-mtp.dts @@ -0,0 +1,31 @@ +/* Copyright (c) 2018, 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 "sdm455.dtsi" +#include "sdm630-mtp.dtsi" +#include "sdm660-external-codec.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. SDM 455 PM660 + PM660L MTP"; + compatible = "qcom,sdm455-mtp", "qcom,sdm455", "qcom,mtp"; + qcom,board-id = <8 0>; + qcom,pmic-id = <0x0001001b 0x0101011a 0x0 0x0>, + <0x0001001b 0x0201011a 0x0 0x0>, + <0x0001001b 0x0102001a 0x0 0x0>; +}; + +&tavil_snd { + qcom,msm-mbhc-moist-cfg = <0>, <0>, <3>; +}; diff --git a/arch/arm/boot/dts/qcom/sdm455-mtp.dtsi b/arch/arm/boot/dts/qcom/sdm455-mtp.dtsi new file mode 100644 index 000000000000..c141ffbb7049 --- /dev/null +++ b/arch/arm/boot/dts/qcom/sdm455-mtp.dtsi @@ -0,0 +1,13 @@ +/* Copyright (c) 2018, 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. + */ + +#include "sdm630-mtp.dtsi" diff --git a/arch/arm/boot/dts/qcom/sdm455.dtsi b/arch/arm/boot/dts/qcom/sdm455.dtsi new file mode 100644 index 000000000000..8ea1e6e3122c --- /dev/null +++ b/arch/arm/boot/dts/qcom/sdm455.dtsi @@ -0,0 +1,20 @@ +/* Copyright (c) 2018, 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. + */ + +#include "sdm630.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. SDM455"; + compatible = "qcom,sdm455"; + qcom,msm-id = <385 0x0>; + qcom,msm-name = "SDM455"; +}; From dda18951cb01e9bb351b8f49ba95e73fdf20a386 Mon Sep 17 00:00:00 2001 From: Teng Fei Fan Date: Mon, 3 Sep 2018 11:46:00 +0800 Subject: [PATCH 05/18] ARM: dts: msm: add initial dts support for SDM455 QRD devices Add initial devices trees for SDM455 QRD devices Change-Id: I7107029ac33f47f1866d7907ff9086d98c466039 Signed-off-by: Teng Fei Fan --- arch/arm/boot/dts/qcom/Makefile | 3 +- arch/arm/boot/dts/qcom/sdm455-qrd.dts | 87 ++++++++++++++++++++++++++ arch/arm/boot/dts/qcom/sdm455-qrd.dtsi | 13 ++++ 3 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/qcom/sdm455-qrd.dts create mode 100644 arch/arm/boot/dts/qcom/sdm455-qrd.dtsi diff --git a/arch/arm/boot/dts/qcom/Makefile b/arch/arm/boot/dts/qcom/Makefile index 63caa04f1a98..39996c82c3ed 100644 --- a/arch/arm/boot/dts/qcom/Makefile +++ b/arch/arm/boot/dts/qcom/Makefile @@ -290,7 +290,8 @@ dtb-$(CONFIG_ARCH_SDM630) += sdm630-rumi.dtb \ sdm630-headset-jacktype-no-rcm.dtb \ sdm630-pm660a-headset-jacktype-no-cdp.dtb \ sdm630-pm660a-headset-jacktype-no-rcm.dtb \ - sdm455-mtp.dtb + sdm455-mtp.dtb \ + sdm455-qrd.dtb ifeq ($(CONFIG_ARM64),y) always := $(dtb-y) diff --git a/arch/arm/boot/dts/qcom/sdm455-qrd.dts b/arch/arm/boot/dts/qcom/sdm455-qrd.dts new file mode 100644 index 000000000000..b1ba032f4dcb --- /dev/null +++ b/arch/arm/boot/dts/qcom/sdm455-qrd.dts @@ -0,0 +1,87 @@ +/* Copyright (c) 2018, 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 "sdm455.dtsi" +#include "sdm455-qrd.dtsi" +#include "msm-pm660a.dtsi" +#include "sdm660-internal-codec.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. SDM 455 PM660 + PM660A QRD"; + compatible = "qcom,sdm455-qrd", "qcom,sdm455", "qcom,qrd"; + qcom,board-id = <0x0002000b 0x00>; + qcom,pmic-id = <0x0001001b 0x0001011a 0x0 0x0>, + <0x0001001b 0x0002001a 0x0 0x0>, + <0x0001001b 0x0202001a 0x0 0x0>; +}; + +&int_codec { + qcom,model = "sdm660-snd-card-skush"; + /delete-property/ qcom,us-euro-gpios; + qcom,audio-routing = + "RX_BIAS", "INT_MCLK0", + "SPK_RX_BIAS", "INT_MCLK0", + "INT_LDO_H", "INT_MCLK0", + "MIC BIAS External2", "Headset Mic", + "AMIC2", "MIC BIAS External2", + "MIC BIAS External", "Digital Mic1", + "DMIC1", "MIC BIAS External", + "MIC BIAS External", "Digital Mic3", + "DMIC3", "MIC BIAS External", + "MIC BIAS External", "Digital Mic4", + "DMIC4", "MIC BIAS External", + "SpkrLeft IN", "SPK1 OUT", + "PDM_IN_RX1", "PDM_OUT_RX1", + "PDM_IN_RX2", "PDM_OUT_RX2", + "PDM_IN_RX3", "PDM_OUT_RX3", + "ADC1_IN", "ADC1_OUT", + "ADC2_IN", "ADC2_OUT", + "ADC3_IN", "ADC3_OUT"; + qcom,wsa-max-devs = <1>; + qcom,wsa-devs = <&wsa881x_211_en>, <&wsa881x_213_en>; + qcom,wsa-aux-dev-prefix = "SpkrLeft", "SpkrLeft"; +}; + +&pm660a_oledb { + status = "okay"; + qcom,oledb-default-voltage-mv = <6400>; +}; + +&mdss_mdp { + qcom,mdss-pref-prim-intf = "dsi"; +}; + +&mdss_dsi { + hw-config = "single_dsi"; +}; + +&mdss_dsi0 { + qcom,dsi-pref-prim-pan = <&dsi_rm67195_amoled_fhd_cmd>; + pinctrl-names = "mdss_default", "mdss_sleep"; + pinctrl-0 = <&mdss_dsi_active &mdss_te_active>; + pinctrl-1 = <&mdss_dsi_suspend &mdss_te_suspend>; + oledb-supply = <&pm660a_oledb>; + lab-supply = <&lab_regulator>; + ibb-supply = <&ibb_regulator>; + qcom,platform-reset-gpio = <&tlmm 53 0>; + qcom,platform-te-gpio = <&tlmm 59 0>; +}; + +&dsi_rm67195_amoled_fhd_cmd { + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs"; + qcom,mdss-dsi-bl-min-level = <1>; + qcom,mdss-dsi-bl-max-level = <255>; + qcom,panel-supply-entries = <&dsi_panel_pwr_supply_labibb_amoled>; +}; diff --git a/arch/arm/boot/dts/qcom/sdm455-qrd.dtsi b/arch/arm/boot/dts/qcom/sdm455-qrd.dtsi new file mode 100644 index 000000000000..2ac3f654f311 --- /dev/null +++ b/arch/arm/boot/dts/qcom/sdm455-qrd.dtsi @@ -0,0 +1,13 @@ +/* Copyright (c) 2018, 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. + */ + +#include "sdm630-qrd.dtsi" From 203e97867dedc5220f558ed262f44c95f2f7ad64 Mon Sep 17 00:00:00 2001 From: Teng Fei Fan Date: Tue, 4 Sep 2018 11:53:15 +0800 Subject: [PATCH 06/18] ARM: dts: msm: add initial dts support for SDM455 CDP devices Add initial devices trees for SDM455 CDP devices Change-Id: I33bf922baf1dcd5c214f0be81affba25eab0c70c Signed-off-by: Teng Fei Fan --- arch/arm/boot/dts/qcom/Makefile | 3 ++- arch/arm/boot/dts/qcom/sdm455-cdp.dts | 37 ++++++++++++++++++++++++++ arch/arm/boot/dts/qcom/sdm455-cdp.dtsi | 13 +++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/qcom/sdm455-cdp.dts create mode 100644 arch/arm/boot/dts/qcom/sdm455-cdp.dtsi diff --git a/arch/arm/boot/dts/qcom/Makefile b/arch/arm/boot/dts/qcom/Makefile index 39996c82c3ed..0bd48399205b 100644 --- a/arch/arm/boot/dts/qcom/Makefile +++ b/arch/arm/boot/dts/qcom/Makefile @@ -291,7 +291,8 @@ dtb-$(CONFIG_ARCH_SDM630) += sdm630-rumi.dtb \ sdm630-pm660a-headset-jacktype-no-cdp.dtb \ sdm630-pm660a-headset-jacktype-no-rcm.dtb \ sdm455-mtp.dtb \ - sdm455-qrd.dtb + sdm455-qrd.dtb \ + sdm455-cdp.dtb ifeq ($(CONFIG_ARM64),y) always := $(dtb-y) diff --git a/arch/arm/boot/dts/qcom/sdm455-cdp.dts b/arch/arm/boot/dts/qcom/sdm455-cdp.dts new file mode 100644 index 000000000000..4ea17f6b508d --- /dev/null +++ b/arch/arm/boot/dts/qcom/sdm455-cdp.dts @@ -0,0 +1,37 @@ +/* Copyright (c) 2018, 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 "sdm455.dtsi" +#include "sdm455-cdp.dtsi" +#include "sdm660-external-codec.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. SDM 455 PM660 + PM660L CDP"; + compatible = "qcom,sdm455-cdp", "qcom,sdm455", "qcom,cdp"; + qcom,board-id = <1 0>; + qcom,pmic-id = <0x0001001b 0x0101011a 0x0 0x0>, + <0x0001001b 0x0201011a 0x0 0x0>, + <0x0001001b 0x0102001a 0x0 0x0>; +}; + +&tavil_snd { + qcom,msm-mbhc-hphl-swh = <0>; + qcom,msm-mbhc-gnd-swh = <0>; +}; + +&tasha_snd { + qcom,msm-mbhc-hphl-swh = <0>; + qcom,msm-mbhc-gnd-swh = <0>; +}; diff --git a/arch/arm/boot/dts/qcom/sdm455-cdp.dtsi b/arch/arm/boot/dts/qcom/sdm455-cdp.dtsi new file mode 100644 index 000000000000..bc54d29450e1 --- /dev/null +++ b/arch/arm/boot/dts/qcom/sdm455-cdp.dtsi @@ -0,0 +1,13 @@ +/* Copyright (c) 2018, 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. + */ + +#include "sdm630-cdp.dtsi" From faf465d7133aeb465ac1afae65e4fee1a2e558b5 Mon Sep 17 00:00:00 2001 From: Yimin Peng Date: Tue, 11 Sep 2018 14:52:09 +0800 Subject: [PATCH 07/18] soc: qcom: hab: add IRQF_NO_SUSPEND to irq flags. The virtclk can disable clocks by hab in suspend flow. If hab irq is disabled then, the power manage task will stick in uninterruptable hab receive function. Change-Id: I780ecede7494346953f5f77d665dd77c2cc6d28a Signed-off-by: Yimin Peng --- drivers/soc/qcom/hab/hab_qvm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/soc/qcom/hab/hab_qvm.c b/drivers/soc/qcom/hab/hab_qvm.c index df60e5c1b07d..f9f72fc1beb4 100644 --- a/drivers/soc/qcom/hab/hab_qvm.c +++ b/drivers/soc/qcom/hab/hab_qvm.c @@ -147,9 +147,8 @@ static int create_dispatcher(struct physical_channel *pchan) pr_debug("request_irq: irq = %d, pchan name = %s", dev->irq, pchan->name); - ret = request_irq(dev->irq, shm_irq_handler, IRQF_SHARED, - pchan->name, pchan); - + ret = request_irq(dev->irq, shm_irq_handler, IRQF_SHARED | + IRQF_NO_SUSPEND, pchan->name, pchan); if (ret) pr_err("request_irq for %s failed: %d\n", pchan->name, ret); From c29b12e26d1a60b310f2a594f1af187852fc4097 Mon Sep 17 00:00:00 2001 From: Soumya Managoli Date: Thu, 6 Sep 2018 15:55:58 +0530 Subject: [PATCH 08/18] ASoC: msm: qdsp6v2: Handle invalid session for dtmf enable If session id is invalid then dtmf voice info will also be invalid. Add check to return error if session id is invalid. CRs-Fixed: 2306771 Change-Id: I362340f9f666c95949eaa94d0ced4cb3a1b9abab Signed-off-by: Soumya Managoli --- sound/soc/msm/qdsp6v2/msm-pcm-voice-v2.c | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/sound/soc/msm/qdsp6v2/msm-pcm-voice-v2.c b/sound/soc/msm/qdsp6v2/msm-pcm-voice-v2.c index 1b8150e5a30f..2615ee61db21 100644 --- a/sound/soc/msm/qdsp6v2/msm-pcm-voice-v2.c +++ b/sound/soc/msm/qdsp6v2/msm-pcm-voice-v2.c @@ -60,6 +60,28 @@ static struct snd_pcm_hardware msm_pcm_hardware = { .fifo_size = 0, }; +static int is_valid_session_id(uint32_t session_id) +{ + int idx = 0; + + switch (session_id) { + case VOICE_SESSION_VSID: + case VOICE2_SESSION_VSID: + case VOLTE_SESSION_VSID: + case QCHAT_SESSION_VSID: + case VOWLAN_SESSION_VSID: + case VOICEMMODE1_VSID: + case VOICEMMODE2_VSID: + case ALL_SESSION_VSID: + idx = 1; + break; + default: + pr_debug("%s: Invalid session_id : %x\n", __func__, session_id); + break; + } + return idx; +} + static int get_idx_for_session(uint32_t session_id) { int idx = 0; @@ -684,6 +706,11 @@ static int msm_dtmf_detect_rx_vsid_cb_put(struct snd_kcontrol *kcontrol, uint32_t session_id = ucontrol->value.integer.value[0]; uint32_t enable = ucontrol->value.integer.value[1]; + if (!is_valid_session_id(session_id)) { + pr_err(" %s Invalid session_id : %x\n", __func__, session_id); + return -EINVAL; + } + if (enable) enable = 1; From 5a586db95cbf78cad11c00651700a98fb37032a7 Mon Sep 17 00:00:00 2001 From: Amit Blay Date: Sun, 16 Sep 2018 10:23:19 +0300 Subject: [PATCH 09/18] drivers: soc: qcom: qcpe: Fix return values In some of the SCM APIs implememnted by the QCPE front end, some return values were not propagated correctly. Change-Id: I2b0aa7f5511eac384db82a65b380a5d964514e57 Signed-off-by: Amit Blay --- drivers/soc/qcom/scm_qcpe.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/soc/qcom/scm_qcpe.c b/drivers/soc/qcom/scm_qcpe.c index 614670888aac..f9a593ceefc7 100644 --- a/drivers/soc/qcom/scm_qcpe.c +++ b/drivers/soc/qcom/scm_qcpe.c @@ -723,7 +723,7 @@ bool is_scm_armv8(void) ret = scm_call_qcpe(x0 | SMC64_MASK, &desc); - ret1 = desc.arginfo; + ret1 = desc.ret[0]; if (ret || !ret1) { /* Try SMC32 call */ @@ -1009,7 +1009,7 @@ s32 scm_call_atomic1_1(u32 svc, u32 cmd, u32 arg1, u32 *ret1) if (ret < 0) return scm_remap_error(ret); - *ret1 = desc.arginfo; + *ret1 = desc.ret[0]; return 0; } @@ -1117,8 +1117,8 @@ s32 scm_call_atomic4_3(u32 svc, u32 cmd, u32 arg1, u32 arg2, if (ret < 0) return scm_remap_error(ret); - *ret1 = desc.arginfo; - *ret2 = desc.args[0]; + *ret1 = desc.ret[0]; + *ret2 = desc.ret[1]; return 0; } @@ -1169,9 +1169,9 @@ s32 scm_call_atomic5_3(u32 svc, u32 cmd, u32 arg1, u32 arg2, if (ret < 0) return scm_remap_error(ret); - *ret1 = desc.arginfo; - *ret2 = desc.args[0]; - *ret3 = desc.args[1]; + *ret1 = desc.ret[0]; + *ret2 = desc.ret[1]; + *ret3 = desc.ret[2]; return 0; } @@ -1201,7 +1201,7 @@ u32 scm_get_version(void) ret = scm_call_qcpe(x0, &desc); - version = desc.arginfo; + version = desc.ret[0]; mutex_unlock(&scm_lock); From 57efc49c752eaa294b457c8b0d4f647ac29448db Mon Sep 17 00:00:00 2001 From: Arun Kumar Neelakantam Date: Thu, 8 Feb 2018 16:26:16 +0530 Subject: [PATCH 10/18] soc: qcom: glink: Fix not sending READ_NOTIF command issue The "tx_blocked_signal_sent" flag is not reset correctly after receiving the interrupt from the remote side. Hence further READ_NOTIF commands are not written into FIFO in FIFO full case. Reset the "tx_blocked_signal_sent" correctly after write space available in FIFO. CRs-Fixed: 2175526 Change-Id: I236da2a2b984b3f3cce8400b50f72ce1016d7e40 Signed-off-by: Arun Kumar Neelakantam --- drivers/soc/qcom/glink_smem_native_xprt.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/soc/qcom/glink_smem_native_xprt.c b/drivers/soc/qcom/glink_smem_native_xprt.c index 6cf4c7b6dd8a..c78c8a00aa21 100644 --- a/drivers/soc/qcom/glink_smem_native_xprt.c +++ b/drivers/soc/qcom/glink_smem_native_xprt.c @@ -831,24 +831,31 @@ static bool get_rx_fifo(struct edge_info *einfo) */ static void tx_wakeup_worker(struct edge_info *einfo) { + struct glink_transport_if xprt_if = einfo->xprt_if; bool trigger_wakeup = false; + bool trigger_resume = false; unsigned long flags; if (einfo->in_ssr) return; - if (einfo->tx_resume_needed && fifo_write_avail(einfo)) { - einfo->tx_resume_needed = false; - einfo->xprt_if.glink_core_if_ptr->tx_resume( - &einfo->xprt_if); - } + spin_lock_irqsave(&einfo->write_lock, flags); + if (fifo_write_avail(einfo)) { + if (einfo->tx_blocked_signal_sent) + einfo->tx_blocked_signal_sent = false; + if (einfo->tx_resume_needed) { + einfo->tx_resume_needed = false; + trigger_resume = true; + } + } if (waitqueue_active(&einfo->tx_blocked_queue)) { /* tx waiting ?*/ - einfo->tx_blocked_signal_sent = false; trigger_wakeup = true; } spin_unlock_irqrestore(&einfo->write_lock, flags); if (trigger_wakeup) wake_up_all(&einfo->tx_blocked_queue); + if (trigger_resume) + xprt_if.glink_core_if_ptr->tx_resume(&xprt_if); } /** From 7fa0962396d0d6dc0be6ef6bced61c951a0452cc Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Thu, 27 Apr 2017 11:19:02 -0700 Subject: [PATCH 11/18] arm64: Silence first allocation with CONFIG_ARM64_MODULE_PLTS=y When CONFIG_ARM64_MODULE_PLTS is enabled, the first allocation using the module space fails, because the module is too big, and then the module allocation is attempted from vmalloc space. Silence the first allocation failure in that case by setting __GFP_NOWARN. Change-Id: I15999e9fb0405dbd76e74dde5b2f94025899d875 Reviewed-by: Ard Biesheuvel Acked-by: Will Deacon Signed-off-by: Florian Fainelli Signed-off-by: Catalin Marinas Git-Repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git Git-commit: 0c2cf6d9487cb90be6ad7fac66044dfa8e8e5243 Signed-off-by: Vinayak Menon --- arch/arm64/kernel/module.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/module.c b/arch/arm64/kernel/module.c index 7f316982ce00..093c13541efb 100644 --- a/arch/arm64/kernel/module.c +++ b/arch/arm64/kernel/module.c @@ -32,11 +32,16 @@ void *module_alloc(unsigned long size) { + gfp_t gfp_mask = GFP_KERNEL; void *p; + /* Silence the initial allocation */ + if (IS_ENABLED(CONFIG_ARM64_MODULE_PLTS)) + gfp_mask |= __GFP_NOWARN; + p = __vmalloc_node_range(size, MODULE_ALIGN, module_alloc_base, module_alloc_base + MODULES_VSIZE, - GFP_KERNEL, PAGE_KERNEL_EXEC, 0, + gfp_mask, PAGE_KERNEL_EXEC, 0, NUMA_NO_NODE, __builtin_return_address(0)); if (!p && IS_ENABLED(CONFIG_ARM64_MODULE_PLTS) && From 25535b0409c31fccd9e626d6146e29d13a343261 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Thu, 27 Apr 2017 11:19:01 -0700 Subject: [PATCH 12/18] ARM: Silence first allocation with CONFIG_ARM_MODULE_PLTS=y When CONFIG_ARM_MODULE_PLTS is enabled, the first allocation using the module space fails, because the module is too big, and then the module allocation is attempted from vmalloc space. Silence the first allocation failure in that case by setting __GFP_NOWARN. Change-Id: I94ed69d0cb42b16f68b08354f6f62dc22851d84a Acked-by: Russell King Signed-off-by: Florian Fainelli Signed-off-by: Catalin Marinas Git-commit: 75d24d968af8913f641c612930c96acc5399e427 Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git Signed-off-by: Vinayak Menon --- arch/arm/kernel/module.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index efdddcb97dd1..953f4619a6d2 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c @@ -40,8 +40,15 @@ #ifdef CONFIG_MMU void *module_alloc(unsigned long size) { - void *p = __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END, - GFP_KERNEL, PAGE_KERNEL_EXEC, 0, NUMA_NO_NODE, + gfp_t gfp_mask = GFP_KERNEL; + void *p; + + /* Silence the initial allocation */ + if (IS_ENABLED(CONFIG_ARM_MODULE_PLTS)) + gfp_mask |= __GFP_NOWARN; + + p = __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END, + gfp_mask, PAGE_KERNEL_EXEC, 0, NUMA_NO_NODE, __builtin_return_address(0)); if (!IS_ENABLED(CONFIG_ARM_MODULE_PLTS) || p) return p; From 542f97a260456f584d0030a3a7e0a125a266a5e9 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Thu, 27 Apr 2017 11:19:00 -0700 Subject: [PATCH 13/18] mm: Silence vmap() allocation failures based on caller gfp_flags If the caller has set __GFP_NOWARN don't print the following message: vmap allocation for size 15736832 failed: use vmalloc= to increase size. This can happen with the ARM/Linux or ARM64/Linux module loader built with CONFIG_ARM{,64}_MODULE_PLTS=y which does a first attempt at loading a large module from module space, then falls back to vmalloc space. Change-Id: Ib907156055959e22a419b79fb424772baea556d0 Acked-by: Michal Hocko Signed-off-by: Florian Fainelli Signed-off-by: Catalin Marinas Git-Commit: 03497d761c55438144fd63534d4223418fdfd345 Git-Repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git Signed-off-by: Vinayak Menon --- mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index ceb7d0d6db35..0db25c1bf4ee 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -521,7 +521,7 @@ overflow: purged = 1; goto retry; } - if (printk_ratelimit()) + if (!(gfp_mask & __GFP_NOWARN) && printk_ratelimit()) pr_warn("vmap allocation for size %lu failed: use vmalloc= to increase size\n", size); kfree(va); From 30f7e5cd6cc7e8ea0926c2c16969c1c165876d55 Mon Sep 17 00:00:00 2001 From: Vara Prasad A V S G Date: Wed, 8 Aug 2018 23:01:00 +0530 Subject: [PATCH 14/18] defconfig: Disable CONFIG_INET_LRO to avoid pop up Disable CONFIG_INET_LRO in sdm660_defconfig and sdm660-perf_defconfig to avoid pop up. Change-Id: I62069b3f8df27812f714e9875a0e7b7e20e31d4c Signed-off-by: Vara Prasad A V S G Signed-off-by: Naitik Bharadiya --- arch/arm64/configs/sdm660-perf_defconfig | 1 + arch/arm64/configs/sdm660_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm64/configs/sdm660-perf_defconfig b/arch/arm64/configs/sdm660-perf_defconfig index b314ef047386..f792baff7bb7 100644 --- a/arch/arm64/configs/sdm660-perf_defconfig +++ b/arch/arm64/configs/sdm660-perf_defconfig @@ -106,6 +106,7 @@ CONFIG_NET_IPVTI=y CONFIG_INET_AH=y CONFIG_INET_ESP=y CONFIG_INET_IPCOMP=y +# CONFIG_INET_LRO is not set CONFIG_INET_UDP_DIAG=y CONFIG_INET_DIAG_DESTROY=y CONFIG_IPV6_ROUTER_PREF=y diff --git a/arch/arm64/configs/sdm660_defconfig b/arch/arm64/configs/sdm660_defconfig index 5e47428bbd5c..6c6f56ed52f3 100644 --- a/arch/arm64/configs/sdm660_defconfig +++ b/arch/arm64/configs/sdm660_defconfig @@ -106,6 +106,7 @@ CONFIG_NET_IPVTI=y CONFIG_INET_AH=y CONFIG_INET_ESP=y CONFIG_INET_IPCOMP=y +# CONFIG_INET_LRO is not set CONFIG_INET_UDP_DIAG=y CONFIG_INET_DIAG_DESTROY=y CONFIG_IPV6_ROUTER_PREF=y From 70c285e0b1742f4f344d8548e917361368f48388 Mon Sep 17 00:00:00 2001 From: Manoj Prabhu B Date: Mon, 17 Sep 2018 15:58:25 +0530 Subject: [PATCH 15/18] diag: Update the logging codes of events, logs and msgs New msg SSIDs, log and event mask codes for different subsystems are added as a new requirement for enable logging. Change-Id: I31e784307e6de388e1de0806baacf00116360c30 Signed-off-by: Manoj Prabhu B --- include/linux/diagchar.h | 200 +++++++++++++++++++++------------------ 1 file changed, 110 insertions(+), 90 deletions(-) diff --git a/include/linux/diagchar.h b/include/linux/diagchar.h index b5ed9b114317..e724a4195170 100644 --- a/include/linux/diagchar.h +++ b/include/linux/diagchar.h @@ -145,10 +145,10 @@ the appropriate macros. */ /* This needs to be modified manually now, when we add a new RANGE of SSIDs to the msg_mask_tbl */ #define MSG_MASK_TBL_CNT 26 -#define APPS_EVENT_LAST_ID 0xC7A +#define APPS_EVENT_LAST_ID 0xC85 #define MSG_SSID_0 0 -#define MSG_SSID_0_LAST 125 +#define MSG_SSID_0_LAST 129 #define MSG_SSID_1 500 #define MSG_SSID_1_LAST 506 #define MSG_SSID_2 1000 @@ -164,7 +164,7 @@ the appropriate macros. */ #define MSG_SSID_7 4600 #define MSG_SSID_7_LAST 4616 #define MSG_SSID_8 5000 -#define MSG_SSID_8_LAST 5034 +#define MSG_SSID_8_LAST 5036 #define MSG_SSID_9 5500 #define MSG_SSID_9_LAST 5516 #define MSG_SSID_10 6000 @@ -218,7 +218,7 @@ static const uint32_t msg_bld_masks_0[] = { MSG_LVL_MED, MSG_LVL_HIGH, MSG_LVL_HIGH, - MSG_LVL_LOW|MSG_MASK_5|MSG_MASK_6|MSG_MASK_7|MSG_MASK_8, + MSG_LVL_MED | MSG_MASK_5 | MSG_MASK_6 | MSG_MASK_7 | MSG_MASK_8, MSG_LVL_LOW, MSG_LVL_ERROR, MSG_LVL_LOW, @@ -342,6 +342,10 @@ static const uint32_t msg_bld_masks_0[] = { MSG_LVL_HIGH, MSG_LVL_LOW, MSG_LVL_LOW|MSG_LVL_MED|MSG_LVL_HIGH|MSG_LVL_ERROR|MSG_LVL_FATAL, + MSG_LVL_HIGH, + MSG_LVL_LOW, + MSG_LVL_MED, + MSG_LVL_MED, MSG_LVL_HIGH }; @@ -413,81 +417,91 @@ static const uint32_t msg_bld_masks_5[] = { }; static const uint32_t msg_bld_masks_6[] = { - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW, - MSG_LVL_LOW + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, + MSG_LVL_LOW | MSG_MASK_5, }; static const uint32_t msg_bld_masks_7[] = { @@ -545,7 +559,9 @@ static const uint32_t msg_bld_masks_8[] = { MSG_LVL_MED, MSG_LVL_MED, MSG_LVL_MED, - MSG_LVL_HIGH, + MSG_LVL_MED, + MSG_LVL_MED, + MSG_LVL_MED, MSG_LVL_HIGH }; @@ -771,18 +787,22 @@ static const uint32_t msg_bld_masks_17[] = { static const uint32_t msg_bld_masks_18[] = { MSG_LVL_LOW, - MSG_LVL_LOW | MSG_MASK_8 | MSG_MASK_9 | MSG_MASK_10 | \ - MSG_MASK_11|MSG_MASK_12|MSG_MASK_13|MSG_MASK_14|MSG_MASK_15 | \ - MSG_MASK_16|MSG_MASK_17|MSG_MASK_18|MSG_MASK_19|MSG_MASK_20, - MSG_LVL_LOW | MSG_MASK_5 | MSG_MASK_6, - MSG_LVL_LOW | MSG_MASK_5, - MSG_LVL_LOW | MSG_MASK_5 | MSG_MASK_6, - MSG_LVL_LOW, - MSG_LVL_LOW | MSG_MASK_5 | \ - MSG_MASK_6 | MSG_MASK_7 | MSG_MASK_8 | MSG_MASK_9, + MSG_LVL_MED | MSG_MASK_8 | MSG_MASK_9 | MSG_MASK_10 | MSG_MASK_11 | + MSG_MASK_12 | MSG_MASK_13 | MSG_MASK_14 | MSG_MASK_15 | + MSG_MASK_16 | MSG_MASK_17 | MSG_MASK_18 | MSG_MASK_19 | + MSG_MASK_20, + MSG_LVL_MED | MSG_MASK_5 | MSG_MASK_6, + MSG_LVL_MED | MSG_MASK_5, + MSG_LVL_MED | MSG_MASK_5 | MSG_MASK_6, MSG_LVL_LOW, + MSG_LVL_MED | MSG_MASK_5 | MSG_MASK_6 | MSG_MASK_7 | MSG_MASK_8 | + MSG_MASK_9, MSG_LVL_LOW, MSG_LVL_LOW, + MSG_LVL_MED | MSG_MASK_5 | MSG_MASK_6 | MSG_MASK_7 | MSG_MASK_8 | + MSG_MASK_9 | MSG_MASK_10 | MSG_MASK_11 | MSG_MASK_12 | + MSG_MASK_13 | MSG_MASK_14 | MSG_MASK_15 | MSG_MASK_16 | + MSG_MASK_20 | MSG_MASK_21 | MSG_MASK_22, MSG_LVL_LOW }; @@ -881,7 +901,7 @@ static const uint32_t msg_bld_masks_25[] = { /* LOG CODES */ static const uint32_t log_code_last_tbl[] = { 0x0, /* EQUIP ID 0 */ - 0x1C6A, /* EQUIP ID 1 */ + 0x1C7B, /* EQUIP ID 1 */ 0x0, /* EQUIP ID 2 */ 0x0, /* EQUIP ID 3 */ 0x4910, /* EQUIP ID 4 */ From 6523651f7d08b4456d15c702ef2285f021362b74 Mon Sep 17 00:00:00 2001 From: Ramandeep Trehan Date: Tue, 4 Sep 2018 18:40:23 +0530 Subject: [PATCH 16/18] wqcrypto: qcedev: Add null pointer check on sg_src Add a null pointer check on sg_src to avoid a possible null pointer dereference in qcedev driver. Change-Id: I9d4f9147ae6c340064110381c98d064f29fd9444 Signed-off-by: Ramandeep Trehan --- drivers/crypto/msm/qce50.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/msm/qce50.c b/drivers/crypto/msm/qce50.c index b44f926a6ba0..598b1aa0f4d7 100644 --- a/drivers/crypto/msm/qce50.c +++ b/drivers/crypto/msm/qce50.c @@ -1,6 +1,6 @@ /* Qualcomm Crypto Engine driver. * - * Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2018, 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 @@ -2440,6 +2440,9 @@ static int _qce_sps_add_sg_data(struct qce_device *pce_dev, struct sps_iovec *iovec = sps_bam_pipe->iovec + sps_bam_pipe->iovec_count; + if (!sg_src) + return -ENOENT; + while (nbytes > 0) { len = min(nbytes, sg_dma_len(sg_src)); nbytes -= len; From 058a10e330cd73476f5a26c40f05e49176a9f793 Mon Sep 17 00:00:00 2001 From: Zhen Kong Date: Fri, 13 Jul 2018 12:02:32 -0700 Subject: [PATCH 17/18] qseecom: fix kclient free issue in qseecom_remove Remove kzfree() after kclient list iteration to avoid invalid pointer deference. Change-Id: I78922269e219fcb16d3cff05f8b168a75a3c05ae Signed-off-by: Zhen Kong --- drivers/misc/qseecom.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/misc/qseecom.c b/drivers/misc/qseecom.c index f0140e8bbe68..e85b2b8972c9 100644 --- a/drivers/misc/qseecom.c +++ b/drivers/misc/qseecom.c @@ -8743,11 +8743,11 @@ static int qseecom_remove(struct platform_device *pdev) &qseecom.registered_kclient_list_head, list) { /* Break the loop if client handle is NULL */ - if (!kclient->handle) - goto exit_free_kclient; - - if (list_empty(&kclient->list)) - goto exit_free_kc_handle; + if (!kclient->handle) { + list_del(&kclient->list); + kzfree(kclient); + break; + } list_del(&kclient->list); mutex_lock(&app_access_lock); @@ -8760,11 +8760,6 @@ static int qseecom_remove(struct platform_device *pdev) } } -exit_free_kc_handle: - kzfree(kclient->handle); -exit_free_kclient: - kzfree(kclient); - spin_unlock_irqrestore(&qseecom.registered_kclient_list_lock, flags); if (qseecom.qseos_version > QSEEE_VERSION_00) From ec05268f4c86a23a558c1caba3840a72dbbaadd1 Mon Sep 17 00:00:00 2001 From: Nirmal Abraham Date: Tue, 18 Sep 2018 18:17:52 +0530 Subject: [PATCH 18/18] ARM: dts: msm: Display changes for SDM455 Disable 'assertive display', 'destination scaler' and 'display port' support for SDM455. Change-Id: I4de89658a6c5b20c97e9fc0f611aaa81f701a9d7 Signed-off-by: Nirmal Abraham --- arch/arm/boot/dts/qcom/sdm455.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/arch/arm/boot/dts/qcom/sdm455.dtsi b/arch/arm/boot/dts/qcom/sdm455.dtsi index 8ea1e6e3122c..e37416783b30 100644 --- a/arch/arm/boot/dts/qcom/sdm455.dtsi +++ b/arch/arm/boot/dts/qcom/sdm455.dtsi @@ -18,3 +18,28 @@ qcom,msm-id = <385 0x0>; qcom,msm-name = "SDM455"; }; + +&soc { + mdss_dp_ctrl: qcom,dp_ctrl@c990000 { + status = "disabled"; + }; + + mdss_dp_pll: qcom,mdss_dp_pll@c011000 { + status = "disabled"; + }; +}; + +&mdss_mdp { + + /delete-property/ qcom,mdss-ad-off; + /delete-property/ qcom,max-dest-scaler-input-width; + /delete-property/ qcom,max-dest-scaler-output-width; + qcom,mdss-scaler-offsets { + qcom,mdss-vig-scaler-off = <0xa00>; + qcom,mdss-vig-scaler-lut-off = <0xb00>; + /delete-property/ qcom,mdss-has-dest-scaler; + /delete-property/ qcom,mdss-dest-block-off; + /delete-property/ qcom,mdss-dest-scaler-off; + /delete-property/ qcom,mdss-dest-scaler-lut-off; + }; +};