summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Bestas <mkbestas@lineageos.org>2020-12-30 23:44:20 +0200
committerMichael Bestas <mkbestas@lineageos.org>2020-12-30 23:44:37 +0200
commit96d93de231c6f2e261efe1307c0e9d23d62f3075 (patch)
tree5ba844e61b10f800a3731beaebf22d86a0438e3e
parent1b938ff9f5f6ea7a746267a2dbdc3ffea872ff5a (diff)
parent0427be586cf9a32339c8a851a1802f7d897cfb06 (diff)
Merge tag 'LA.UM.9.2.r1-01800-SDMxx0.0' of https://source.codeaurora.org/quic/la/kernel/msm-4.4 into lineage-18.1-caf-msm8998
* tag 'LA.UM.9.2.r1-01800-SDMxx0.0' of https://source.codeaurora.org/quic/la/kernel/msm-4.4: sdm660-perf_defconfig changes defconfig: msm8998: enable LEDS_QPNP_HAPTICS HID: sony: Support PS4 BT defconfig: msm8998: enable LEDS_QPNP_HAPTICS ARM: dts: msm: Enable vibrator in msm8998 defconfig: Enable CONFIG_HID_NINTENDO for SDM660 FROMLIST: HID: nintendo: add nintendo switch controller driver defconfig: Enable UTS_NS for sdm660 ANDROID: selinux: modify RTM_GETLINK permission defconfig: Enable CONFIG_HID_NINTENDO for msm8998 defconfig: sdm660: enable LEDS_QPNP_HAPTICS ARM: dts: msm: Enable vibrator in sdm660 defconfig: Enable CONFIG_UTS_NS for msm8998 RM: dts: msm: add CPU dai for additional proxy ports msm: mdss: hdmi: parse physical screen dimensions from EDID msm: kgsl: Compare pid pointer instead of TGID for a new process binder: fix UAF when releasing todo list crypto: Fix possible stack out of bound error mdss_hdmi_tx: reset HDR flags on disconnect soc: add proxy ports for call screening in machine driver msm: isp2: fix close sequence of isp stats stream usb: dwc3: ep0: Return from handle_status if ep0_delegate_req succeeds Revert "include: Fix for compilation issue" msm: kgsl: Mark the scratch buffer as privileged include: Fix for compilation issue Conflicts: drivers/hid/Makefile security/selinux/ss/services.c Change-Id: Ia1f388435462703697ec52f6702b47f6653791df
-rw-r--r--arch/arm/boot/dts/qcom/msm-audio-lpass.dtsi12
-rw-r--r--arch/arm/boot/dts/qcom/msm-pm660.dtsi20
-rw-r--r--arch/arm/boot/dts/qcom/msm-pmi8998.dtsi19
-rw-r--r--arch/arm/boot/dts/qcom/msm8998-audio.dtsi14
-rw-r--r--arch/arm64/configs/msmcortex-perf_defconfig3
-rw-r--r--arch/arm64/configs/msmcortex_defconfig3
-rw-r--r--arch/arm64/configs/sdm660-perf_defconfig3
-rw-r--r--arch/arm64/configs/sdm660_defconfig3
-rw-r--r--drivers/crypto/msm/qce.c7
-rw-r--r--drivers/gpu/msm/adreno_debugfs.c4
-rw-r--r--drivers/gpu/msm/adreno_dispatch.c2
-rw-r--r--drivers/gpu/msm/adreno_profile.c4
-rw-r--r--drivers/gpu/msm/kgsl.c30
-rw-r--r--drivers/gpu/msm/kgsl_debugfs.c9
-rw-r--r--drivers/gpu/msm/kgsl_device.h8
-rw-r--r--drivers/gpu/msm/kgsl_iommu.c4
-rw-r--r--drivers/gpu/msm/kgsl_sharedmem.c4
-rw-r--r--drivers/gpu/msm/kgsl_trace.h10
-rw-r--r--drivers/hid/hid-core.c11
-rw-r--r--drivers/media/platform/msm/camera_v2/isp/msm_isp_stats_util.c4
-rw-r--r--drivers/video/fbdev/msm/mdss_hdmi_edid.c128
-rw-r--r--drivers/video/fbdev/msm/mdss_hdmi_edid.h2
-rw-r--r--drivers/video/fbdev/msm/mdss_hdmi_tx.c8
-rw-r--r--sound/soc/msm/msm8998.c27
24 files changed, 271 insertions, 68 deletions
diff --git a/arch/arm/boot/dts/qcom/msm-audio-lpass.dtsi b/arch/arm/boot/dts/qcom/msm-audio-lpass.dtsi
index aef9200f5d22..51c4c8c5be22 100644
--- a/arch/arm/boot/dts/qcom/msm-audio-lpass.dtsi
+++ b/arch/arm/boot/dts/qcom/msm-audio-lpass.dtsi
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2017, 2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2017, 2019-2020 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
@@ -293,6 +293,16 @@
qcom,msm-dai-q6-dev-id = <32770>;
};
+ proxy_rx: qcom,msm-dai-q6-proxy-rx {
+ compatible = "qcom,msm-dai-q6-dev";
+ qcom,msm-dai-q6-dev-id = <8194>;
+ };
+
+ proxy_tx: qcom,msm-dai-q6-proxy-tx {
+ compatible = "qcom,msm-dai-q6-dev";
+ qcom,msm-dai-q6-dev-id = <8195>;
+ };
+
usb_audio_rx: qcom,msm-dai-q6-usb-audio-rx {
compatible = "qcom,msm-dai-q6-dev";
qcom,msm-dai-q6-dev-id = <28672>;
diff --git a/arch/arm/boot/dts/qcom/msm-pm660.dtsi b/arch/arm/boot/dts/qcom/msm-pm660.dtsi
index 460e7e76ac4d..2082934112a0 100644
--- a/arch/arm/boot/dts/qcom/msm-pm660.dtsi
+++ b/arch/arm/boot/dts/qcom/msm-pm660.dtsi
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2016-2017, 2020, 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
@@ -629,29 +629,25 @@
#address-cells = <2>;
#size-cells = <0>;
- pm660_haptics: qcom,haptic@c000 {
- compatible = "qcom,qpnp-haptic";
+ pm660_haptics: qcom,haptics@c000 {
+ compatible = "qcom,qpnp-haptics";
reg = <0xc000 0x100>;
interrupts = <0x1 0xc0 0x0 IRQ_TYPE_EDGE_BOTH>,
- <0x1 0xc0 0x1 IRQ_TYPE_EDGE_BOTH>;
- interrupt-names = "sc-irq", "play-irq";
+ <0x1 0xc0 0x1 IRQ_TYPE_EDGE_BOTH>;
+ interrupt-names = "hap-sc-irq", "hap-play-irq";
qcom,pmic-revid = <&pm660_revid>;
qcom,pmic-misc = <&pm660_misc>;
qcom,misc-clk-trim-error-reg = <0xf3>;
- qcom,actuator-type = "lra";
+ qcom,actuator-type = <0>;
qcom,play-mode = "direct";
qcom,vmax-mv = <3200>;
qcom,ilim-ma = <800>;
- qcom,wave-shape = "square";
+ qcom,sc-dbc-cycles = <8>;
qcom,wave-play-rate-us = <6667>;
- qcom,int-pwm-freq-khz = <505>;
- qcom,sc-deb-cycles = <8>;
qcom,en-brake;
- qcom,brake-pattern = [03 03 00 00];
qcom,lra-high-z = "opt0";
qcom,lra-auto-res-mode = "qwd";
- qcom,lra-calibrate-at-eop = <0>;
- qcom,correct-lra-drive-freq;
+ qcom,lra-res-cal-period = <4>;
};
};
};
diff --git a/arch/arm/boot/dts/qcom/msm-pmi8998.dtsi b/arch/arm/boot/dts/qcom/msm-pmi8998.dtsi
index 4c049c8007cc..b710d5451bde 100644
--- a/arch/arm/boot/dts/qcom/msm-pmi8998.dtsi
+++ b/arch/arm/boot/dts/qcom/msm-pmi8998.dtsi
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2016-2017, 2020, 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
@@ -638,26 +638,25 @@
status = "okay";
};
- pmi8998_haptics: qcom,haptic@c000 {
- status = "disabled";
- compatible = "qcom,qpnp-haptic";
+ pmi8998_haptics: qcom,haptics@c000 {
+ compatible = "qcom,qpnp-haptics";
reg = <0xc000 0x100>;
interrupts = <0x3 0xc0 0x0 IRQ_TYPE_EDGE_BOTH>,
<0x3 0xc0 0x1 IRQ_TYPE_EDGE_BOTH>;
- interrupt-names = "sc-irq", "play-irq";
+ interrupt-names = "hap-sc-irq", "hap-play-irq";
qcom,pmic-revid = <&pmi8998_revid>;
qcom,pmic-misc = <&pmi8998_misc>;
qcom,misc-clk-trim-error-reg = <0xf3>;
- qcom,actuator-type = "lra";
+ qcom,int-pwm-freq-khz = <505>;
qcom,play-mode = "direct";
+ qcom,wave-play-rate-us = <6667>;
+ qcom,actuator-type = <0>;
+ qcom,wave-shape = "square";
qcom,vmax-mv = <3200>;
qcom,ilim-ma = <800>;
- qcom,wave-shape = "square";
- qcom,wave-play-rate-us = <6667>;
- qcom,int-pwm-freq-khz = <505>;
qcom,sc-deb-cycles = <8>;
qcom,en-brake;
- qcom,brake-pattern = [03 03 00 00];
+ qcom,brake-pattern = <0x3 0x3 0x0 0x0>;
qcom,lra-high-z = "opt1";
qcom,lra-auto-res-mode = "qwd";
qcom,lra-res-cal-period = <4>;
diff --git a/arch/arm/boot/dts/qcom/msm8998-audio.dtsi b/arch/arm/boot/dts/qcom/msm8998-audio.dtsi
index 2e37ff6fe953..0481f8a6941c 100644
--- a/arch/arm/boot/dts/qcom/msm8998-audio.dtsi
+++ b/arch/arm/boot/dts/qcom/msm8998-audio.dtsi
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2017, 2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2017, 2019-2020 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
@@ -122,7 +122,8 @@
<&dai_pri_tdm_rx_0>, <&dai_pri_tdm_tx_0>,
<&dai_sec_tdm_rx_0>, <&dai_sec_tdm_tx_0>,
<&dai_tert_tdm_rx_0>, <&dai_tert_tdm_tx_0>,
- <&dai_quat_tdm_rx_0>, <&dai_quat_tdm_tx_0>;
+ <&dai_quat_tdm_rx_0>, <&dai_quat_tdm_tx_0>,
+ <&proxy_rx>, <&proxy_tx>;
asoc-cpu-names = "msm-dai-q6-hdmi.8", "msm-dai-q6-dp.24608",
"msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1",
"msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3",
@@ -144,7 +145,8 @@
"msm-dai-q6-tdm.36864", "msm-dai-q6-tdm.36865",
"msm-dai-q6-tdm.36880", "msm-dai-q6-tdm.36881",
"msm-dai-q6-tdm.36896", "msm-dai-q6-tdm.36897",
- "msm-dai-q6-tdm.36912", "msm-dai-q6-tdm.36913";
+ "msm-dai-q6-tdm.36912", "msm-dai-q6-tdm.36913",
+ "msm-dai-q6-dev.8194", "msm-dai-q6-dev.8195";
asoc-codec = <&stub_codec>, <&ext_disp_audio_codec>;
asoc-codec-names = "msm-stub-codec.1",
"msm-ext-disp-audio-codec-rx";
@@ -255,7 +257,8 @@
<&dai_pri_tdm_rx_0>, <&dai_pri_tdm_tx_0>,
<&dai_sec_tdm_rx_0>, <&dai_sec_tdm_tx_0>,
<&dai_tert_tdm_rx_0>, <&dai_tert_tdm_tx_0>,
- <&dai_quat_tdm_rx_0>, <&dai_quat_tdm_tx_0>;
+ <&dai_quat_tdm_rx_0>, <&dai_quat_tdm_tx_0>,
+ <&proxy_rx>, <&proxy_tx>;
asoc-cpu-names = "msm-dai-q6-hdmi.8", "msm-dai-q6-dp.24608",
"msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1",
"msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3",
@@ -277,7 +280,8 @@
"msm-dai-q6-tdm.36864", "msm-dai-q6-tdm.36865",
"msm-dai-q6-tdm.36880", "msm-dai-q6-tdm.36881",
"msm-dai-q6-tdm.36896", "msm-dai-q6-tdm.36897",
- "msm-dai-q6-tdm.36912", "msm-dai-q6-tdm.36913";
+ "msm-dai-q6-tdm.36912", "msm-dai-q6-tdm.36913",
+ "msm-dai-q6-dev.8194", "msm-dai-q6-dev.8195";
asoc-codec = <&stub_codec>, <&ext_disp_audio_codec>;
asoc-codec-names = "msm-stub-codec.1",
"msm-ext-disp-audio-codec-rx";
diff --git a/arch/arm64/configs/msmcortex-perf_defconfig b/arch/arm64/configs/msmcortex-perf_defconfig
index 6e3cbeff1576..7bd9ddba5f49 100644
--- a/arch/arm64/configs/msmcortex-perf_defconfig
+++ b/arch/arm64/configs/msmcortex-perf_defconfig
@@ -26,7 +26,6 @@ CONFIG_SCHED_HMP=y
CONFIG_SCHED_HMP_CSTATE_AWARE=y
CONFIG_SCHED_CORE_CTL=y
CONFIG_NAMESPACES=y
-# CONFIG_UTS_NS is not set
# CONFIG_PID_NS is not set
CONFIG_SCHED_AUTOGROUP=y
CONFIG_SCHED_TUNE=y
@@ -450,6 +449,7 @@ CONFIG_HID_ELECOM=y
CONFIG_HID_MAGICMOUSE=y
CONFIG_HID_MICROSOFT=y
CONFIG_HID_MULTITOUCH=y
+CONFIG_HID_NINTENDO=y
CONFIG_HID_PLANTRONICS=y
CONFIG_HID_SONY=y
CONFIG_USB=y
@@ -501,6 +501,7 @@ CONFIG_LEDS_QPNP=y
CONFIG_LEDS_QPNP_FLASH_V2=y
CONFIG_LEDS_QPNP_WLED=y
CONFIG_LEDS_SYSCON=y
+CONFIG_LEDS_QPNP_HAPTICS=y
CONFIG_LEDS_TRIGGERS=y
CONFIG_SWITCH=y
CONFIG_RTC_CLASS=y
diff --git a/arch/arm64/configs/msmcortex_defconfig b/arch/arm64/configs/msmcortex_defconfig
index 51d31bc72348..a37953ad33c5 100644
--- a/arch/arm64/configs/msmcortex_defconfig
+++ b/arch/arm64/configs/msmcortex_defconfig
@@ -25,7 +25,6 @@ CONFIG_SCHED_HMP=y
CONFIG_SCHED_HMP_CSTATE_AWARE=y
CONFIG_SCHED_CORE_CTL=y
CONFIG_NAMESPACES=y
-# CONFIG_UTS_NS is not set
# CONFIG_PID_NS is not set
CONFIG_SCHED_AUTOGROUP=y
CONFIG_SCHED_TUNE=y
@@ -457,6 +456,7 @@ CONFIG_HID_ELECOM=y
CONFIG_HID_MAGICMOUSE=y
CONFIG_HID_MICROSOFT=y
CONFIG_HID_MULTITOUCH=y
+CONFIG_HID_NINTENDO=y
CONFIG_HID_PLANTRONICS=y
CONFIG_HID_SONY=y
CONFIG_USB=y
@@ -509,6 +509,7 @@ CONFIG_LEDS_QPNP=y
CONFIG_LEDS_QPNP_FLASH_V2=y
CONFIG_LEDS_QPNP_WLED=y
CONFIG_LEDS_SYSCON=y
+CONFIG_LEDS_QPNP_HAPTICS=y
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_LEDS_TRIGGER_CPU=y
diff --git a/arch/arm64/configs/sdm660-perf_defconfig b/arch/arm64/configs/sdm660-perf_defconfig
index 2f7ac222b446..104138449323 100644
--- a/arch/arm64/configs/sdm660-perf_defconfig
+++ b/arch/arm64/configs/sdm660-perf_defconfig
@@ -26,7 +26,6 @@ CONFIG_SCHED_HMP=y
CONFIG_SCHED_HMP_CSTATE_AWARE=y
CONFIG_SCHED_CORE_CTL=y
CONFIG_NAMESPACES=y
-# CONFIG_UTS_NS is not set
# CONFIG_PID_NS is not set
CONFIG_SCHED_AUTOGROUP=y
CONFIG_SCHED_TUNE=y
@@ -453,6 +452,7 @@ CONFIG_HID_ELECOM=y
CONFIG_HID_MAGICMOUSE=y
CONFIG_HID_MICROSOFT=y
CONFIG_HID_MULTITOUCH=y
+CONFIG_HID_NINTENDO=y
CONFIG_HID_PLANTRONICS=y
CONFIG_HID_SONY=y
CONFIG_USB=y
@@ -507,6 +507,7 @@ CONFIG_LEDS_QPNP=y
CONFIG_LEDS_QPNP_FLASH_V2=y
CONFIG_LEDS_QPNP_WLED=y
CONFIG_LEDS_SYSCON=y
+CONFIG_LEDS_QPNP_HAPTICS=y
CONFIG_LEDS_TRIGGERS=y
CONFIG_SWITCH=y
CONFIG_RTC_CLASS=y
diff --git a/arch/arm64/configs/sdm660_defconfig b/arch/arm64/configs/sdm660_defconfig
index 724d77234000..a6433cbb8fc0 100644
--- a/arch/arm64/configs/sdm660_defconfig
+++ b/arch/arm64/configs/sdm660_defconfig
@@ -25,7 +25,6 @@ CONFIG_SCHED_HMP=y
CONFIG_SCHED_HMP_CSTATE_AWARE=y
CONFIG_SCHED_CORE_CTL=y
CONFIG_NAMESPACES=y
-# CONFIG_UTS_NS is not set
# CONFIG_PID_NS is not set
CONFIG_SCHED_AUTOGROUP=y
CONFIG_SCHED_TUNE=y
@@ -458,6 +457,7 @@ CONFIG_HID_ELECOM=y
CONFIG_HID_MAGICMOUSE=y
CONFIG_HID_MICROSOFT=y
CONFIG_HID_MULTITOUCH=y
+CONFIG_HID_NINTENDO=y
CONFIG_HID_PLANTRONICS=y
CONFIG_HID_SONY=y
CONFIG_USB=y
@@ -513,6 +513,7 @@ CONFIG_LEDS_QPNP=y
CONFIG_LEDS_QPNP_FLASH_V2=y
CONFIG_LEDS_QPNP_WLED=y
CONFIG_LEDS_SYSCON=y
+CONFIG_LEDS_QPNP_HAPTICS=y
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_LEDS_TRIGGER_CPU=y
diff --git a/drivers/crypto/msm/qce.c b/drivers/crypto/msm/qce.c
index 4cf95b90a2df..53c07aacc145 100644
--- a/drivers/crypto/msm/qce.c
+++ b/drivers/crypto/msm/qce.c
@@ -1,6 +1,6 @@
/* Qualcomm Crypto Engine driver.
*
- * Copyright (c) 2010-2016, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2010-2016, 2020 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
@@ -768,6 +768,11 @@ static int _ce_setup(struct qce_device *pce_dev, struct qce_req *q_req,
switch (q_req->alg) {
case CIPHER_ALG_DES:
if (q_req->mode != QCE_MODE_ECB) {
+ if (ivsize > MAX_IV_LENGTH) {
+ pr_err("%s: error: Invalid length parameter\n",
+ __func__);
+ return -EINVAL;
+ }
_byte_stream_to_net_words(enciv32, q_req->iv, ivsize);
writel_relaxed(enciv32[0], pce_dev->iobase +
CRYPTO_CNTR0_IV0_REG);
diff --git a/drivers/gpu/msm/adreno_debugfs.c b/drivers/gpu/msm/adreno_debugfs.c
index 2027ac66f737..201e63f5e9dc 100644
--- a/drivers/gpu/msm/adreno_debugfs.c
+++ b/drivers/gpu/msm/adreno_debugfs.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2002,2008-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2002,2008-2017,2020, 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
@@ -281,7 +281,7 @@ static int ctx_print(struct seq_file *s, void *unused)
ctx_type_str(drawctxt->type),
drawctxt->base.priority,
drawctxt->base.proc_priv->comm,
- drawctxt->base.proc_priv->pid,
+ pid_nr(drawctxt->base.proc_priv->pid),
drawctxt->base.tid);
seq_puts(s, "flags: ");
diff --git a/drivers/gpu/msm/adreno_dispatch.c b/drivers/gpu/msm/adreno_dispatch.c
index 1a6d53b777d7..5209f1b2a2e6 100644
--- a/drivers/gpu/msm/adreno_dispatch.c
+++ b/drivers/gpu/msm/adreno_dispatch.c
@@ -1694,7 +1694,7 @@ static inline const char *_kgsl_context_comm(struct kgsl_context *context)
#define pr_fault(_d, _c, fmt, args...) \
dev_err((_d)->dev, "%s[%d]: " fmt, \
_kgsl_context_comm((_c)->context), \
- (_c)->context->proc_priv->pid, ##args)
+ pid_nr((_c)->context->proc_priv->pid), ##args)
static void adreno_fault_header(struct kgsl_device *device,
diff --git a/drivers/gpu/msm/adreno_profile.c b/drivers/gpu/msm/adreno_profile.c
index e756c82287fd..93501d96ef8e 100644
--- a/drivers/gpu/msm/adreno_profile.c
+++ b/drivers/gpu/msm/adreno_profile.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2016, 2018, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2016, 2018,2020, 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
@@ -168,7 +168,7 @@ static int _build_pre_ib_cmds(struct adreno_device *adreno_dev,
ibcmds += _ib_cmd_mem_write(adreno_dev, ibcmds, gpuaddr + data_offset,
drawctxt->base.id, &data_offset);
ibcmds += _ib_cmd_mem_write(adreno_dev, ibcmds, gpuaddr + data_offset,
- drawctxt->base.proc_priv->pid, &data_offset);
+ pid_nr(drawctxt->base.proc_priv->pid), &data_offset);
ibcmds += _ib_cmd_mem_write(adreno_dev, ibcmds, gpuaddr + data_offset,
drawctxt->base.tid, &data_offset);
ibcmds += _ib_cmd_mem_write(adreno_dev, ibcmds, gpuaddr + data_offset,
diff --git a/drivers/gpu/msm/kgsl.c b/drivers/gpu/msm/kgsl.c
index de5405615891..96b24176c388 100644
--- a/drivers/gpu/msm/kgsl.c
+++ b/drivers/gpu/msm/kgsl.c
@@ -540,7 +540,7 @@ int kgsl_context_init(struct kgsl_device_private *dev_priv,
if (atomic_read(&proc_priv->ctxt_count) > KGSL_MAX_CONTEXTS_PER_PROC) {
KGSL_DRV_ERR_RATELIMIT(device,
"Per process context limit reached for pid %u",
- dev_priv->process_priv->pid);
+ pid_nr(dev_priv->process_priv->pid));
spin_unlock(&proc_priv->ctxt_count_lock);
return -ENOSPC;
}
@@ -865,6 +865,7 @@ static void kgsl_destroy_process_private(struct kref *kref)
struct kgsl_process_private *private = container_of(kref,
struct kgsl_process_private, refcount);
+ put_pid(private->pid);
idr_destroy(&private->mem_idr);
idr_destroy(&private->syncsource_idr);
@@ -895,7 +896,7 @@ struct kgsl_process_private *kgsl_process_private_find(pid_t pid)
mutex_lock(&kgsl_driver.process_mutex);
list_for_each_entry(p, &kgsl_driver.process_list, list) {
- if (p->pid == pid) {
+ if (pid_nr(p->pid) == pid) {
if (kgsl_process_private_get(p))
private = p;
break;
@@ -909,13 +910,15 @@ static struct kgsl_process_private *kgsl_process_private_new(
struct kgsl_device *device)
{
struct kgsl_process_private *private;
- pid_t tgid = task_tgid_nr(current);
+ struct pid *cur_pid = get_task_pid(current->group_leader, PIDTYPE_PID);
/* Search in the process list */
list_for_each_entry(private, &kgsl_driver.process_list, list) {
- if (private->pid == tgid) {
- if (!kgsl_process_private_get(private))
+ if (private->pid == cur_pid) {
+ if (!kgsl_process_private_get(private)) {
+ put_pid(cur_pid);
private = ERR_PTR(-EINVAL);
+ }
return private;
}
}
@@ -927,7 +930,7 @@ static struct kgsl_process_private *kgsl_process_private_new(
kref_init(&private->refcount);
- private->pid = tgid;
+ private->pid = cur_pid;
get_task_comm(private->comm, current->group_leader);
spin_lock_init(&private->mem_lock);
@@ -938,12 +941,14 @@ static struct kgsl_process_private *kgsl_process_private_new(
idr_init(&private->syncsource_idr);
/* Allocate a pagetable for the new process object */
- private->pagetable = kgsl_mmu_getpagetable(&device->mmu, tgid);
+ private->pagetable = kgsl_mmu_getpagetable(&device->mmu,
+ pid_nr(cur_pid));
if (IS_ERR(private->pagetable)) {
int err = PTR_ERR(private->pagetable);
idr_destroy(&private->mem_idr);
idr_destroy(&private->syncsource_idr);
+ put_pid(private->pid);
kfree(private);
private = ERR_PTR(err);
@@ -1877,8 +1882,9 @@ static long gpumem_free_entry(struct kgsl_mem_entry *entry)
if (entry->memdesc.pagetable != NULL)
ptname = entry->memdesc.pagetable->name;
- kgsl_memfree_add(entry->priv->pid, ptname, entry->memdesc.gpuaddr,
- entry->memdesc.size, entry->memdesc.flags);
+ kgsl_memfree_add(pid_nr(entry->priv->pid), ptname,
+ entry->memdesc.gpuaddr, entry->memdesc.size,
+ entry->memdesc.flags);
kgsl_mem_entry_put(entry);
@@ -4529,13 +4535,15 @@ kgsl_get_unmapped_area(struct file *file, unsigned long addr,
if (IS_ERR_VALUE(val))
KGSL_DRV_ERR_RATELIMIT(device,
"get_unmapped_area: pid %d addr %lx pgoff %lx len %ld failed error %d\n",
- private->pid, addr, pgoff, len, (int) val);
+ pid_nr(private->pid), addr,
+ pgoff, len, (int) val);
} else {
val = _get_svm_area(private, entry, addr, len, flags);
if (IS_ERR_VALUE(val))
KGSL_DRV_ERR_RATELIMIT(device,
"_get_svm_area: pid %d mmap_base %lx addr %lx pgoff %lx len %ld failed error %d\n",
- private->pid, current->mm->mmap_base, addr,
+ pid_nr(private->pid),
+ current->mm->mmap_base, addr,
pgoff, len, (int) val);
}
diff --git a/drivers/gpu/msm/kgsl_debugfs.c b/drivers/gpu/msm/kgsl_debugfs.c
index 592257a332d1..30769de41a70 100644
--- a/drivers/gpu/msm/kgsl_debugfs.c
+++ b/drivers/gpu/msm/kgsl_debugfs.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2002,2008-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2002,2008-2017,2020, 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
@@ -393,7 +393,7 @@ void kgsl_process_init_debugfs(struct kgsl_process_private *private)
unsigned char name[16];
struct dentry *dentry;
- snprintf(name, sizeof(name), "%d", private->pid);
+ snprintf(name, sizeof(name), "%d", pid_nr(private->pid));
private->debug_root = debugfs_create_dir(name, proc_d_debugfs);
@@ -413,14 +413,15 @@ void kgsl_process_init_debugfs(struct kgsl_process_private *private)
}
dentry = debugfs_create_file("mem", 0444, private->debug_root,
- (void *) ((unsigned long) private->pid), &process_mem_fops);
+ (void *) ((unsigned long) pid_nr(private->pid)),
+ &process_mem_fops);
if (IS_ERR_OR_NULL(dentry))
WARN((dentry == NULL),
"Unable to create 'mem' file for %s\n", name);
dentry = debugfs_create_file("sparse_mem", 0444, private->debug_root,
- (void *) ((unsigned long) private->pid),
+ (void *) ((unsigned long) pid_nr(private->pid)),
&process_sparse_mem_fops);
if (IS_ERR_OR_NULL(dentry))
diff --git a/drivers/gpu/msm/kgsl_device.h b/drivers/gpu/msm/kgsl_device.h
index 0ab6041b3bbd..14852326116c 100644
--- a/drivers/gpu/msm/kgsl_device.h
+++ b/drivers/gpu/msm/kgsl_device.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2002,2007-2019, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2002,2007-2020, 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
@@ -405,13 +405,13 @@ struct kgsl_context {
#define pr_context(_d, _c, fmt, args...) \
dev_err((_d)->dev, "%s[%d]: " fmt, \
_context_comm((_c)), \
- (_c)->proc_priv->pid, ##args)
+ pid_nr((_c)->proc_priv->pid), ##args)
/**
* struct kgsl_process_private - Private structure for a KGSL process (across
* all devices)
* @priv: Internal flags, use KGSL_PROCESS_* values
- * @pid: ID for the task owner of the process
+ * @pid: Identification structure for the task owner of the process
* @comm: task name of the process
* @mem_lock: Spinlock to protect the process memory lists
* @refcount: kref object for reference counting the process
@@ -428,7 +428,7 @@ struct kgsl_context {
*/
struct kgsl_process_private {
unsigned long priv;
- pid_t pid;
+ struct pid *pid;
char comm[TASK_COMM_LEN];
spinlock_t mem_lock;
struct kref refcount;
diff --git a/drivers/gpu/msm/kgsl_iommu.c b/drivers/gpu/msm/kgsl_iommu.c
index f6ff4658c93b..aff54105474a 100644
--- a/drivers/gpu/msm/kgsl_iommu.c
+++ b/drivers/gpu/msm/kgsl_iommu.c
@@ -692,7 +692,7 @@ static void _get_entries(struct kgsl_process_private *private,
prev->flags = p->memdesc.flags;
prev->priv = p->memdesc.priv;
prev->pending_free = p->pending_free;
- prev->pid = private->pid;
+ prev->pid = pid_nr(private->pid);
__kgsl_get_memory_usage(prev);
}
@@ -702,7 +702,7 @@ static void _get_entries(struct kgsl_process_private *private,
next->flags = n->memdesc.flags;
next->priv = n->memdesc.priv;
next->pending_free = n->pending_free;
- next->pid = private->pid;
+ next->pid = pid_nr(private->pid);
__kgsl_get_memory_usage(next);
}
}
diff --git a/drivers/gpu/msm/kgsl_sharedmem.c b/drivers/gpu/msm/kgsl_sharedmem.c
index 4c54553e9977..b233211620da 100644
--- a/drivers/gpu/msm/kgsl_sharedmem.c
+++ b/drivers/gpu/msm/kgsl_sharedmem.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2002,2007-2017 The Linux Foundation. All rights reserved.
+/* Copyright (c) 2002,2007-2017,2020, 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
@@ -202,7 +202,7 @@ void kgsl_process_init_sysfs(struct kgsl_device *device,
/* Keep private valid until the sysfs enries are removed. */
kgsl_process_private_get(private);
- snprintf(name, sizeof(name), "%d", private->pid);
+ snprintf(name, sizeof(name), "%d", pid_nr(private->pid));
if (kobject_init_and_add(&private->kobj, &ktype_mem_entry,
kgsl_driver.prockobj, name)) {
diff --git a/drivers/gpu/msm/kgsl_trace.h b/drivers/gpu/msm/kgsl_trace.h
index 6438c6e65b97..2d9bca7e7d7f 100644
--- a/drivers/gpu/msm/kgsl_trace.h
+++ b/drivers/gpu/msm/kgsl_trace.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-2016,2020, 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
@@ -417,7 +417,7 @@ TRACE_EVENT(kgsl_mem_alloc,
TP_fast_assign(
__entry->gpuaddr = mem_entry->memdesc.gpuaddr;
__entry->size = mem_entry->memdesc.size;
- __entry->tgid = mem_entry->priv->pid;
+ __entry->tgid = pid_nr(mem_entry->priv->pid);
kgsl_get_memory_usage(__entry->usage, sizeof(__entry->usage),
mem_entry->memdesc.flags);
__entry->id = mem_entry->id;
@@ -510,7 +510,7 @@ TRACE_EVENT(kgsl_mem_map,
__entry->size = mem_entry->memdesc.size;
__entry->fd = fd;
__entry->type = kgsl_memdesc_usermem_type(&mem_entry->memdesc);
- __entry->tgid = mem_entry->priv->pid;
+ __entry->tgid = pid_nr(mem_entry->priv->pid);
kgsl_get_memory_usage(__entry->usage, sizeof(__entry->usage),
mem_entry->memdesc.flags);
__entry->id = mem_entry->id;
@@ -545,7 +545,7 @@ TRACE_EVENT(kgsl_mem_free,
__entry->gpuaddr = mem_entry->memdesc.gpuaddr;
__entry->size = mem_entry->memdesc.size;
__entry->type = kgsl_memdesc_usermem_type(&mem_entry->memdesc);
- __entry->tgid = mem_entry->priv->pid;
+ __entry->tgid = pid_nr(mem_entry->priv->pid);
kgsl_get_memory_usage(__entry->usage, sizeof(__entry->usage),
mem_entry->memdesc.flags);
__entry->id = mem_entry->id;
@@ -580,7 +580,7 @@ TRACE_EVENT(kgsl_mem_sync_cache,
__entry->gpuaddr = mem_entry->memdesc.gpuaddr;
kgsl_get_memory_usage(__entry->usage, sizeof(__entry->usage),
mem_entry->memdesc.flags);
- __entry->tgid = mem_entry->priv->pid;
+ __entry->tgid = pid_nr(mem_entry->priv->pid);
__entry->id = mem_entry->id;
__entry->op = op;
__entry->offset = offset;
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 0a7ad37aa83e..e51b824e8de5 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -2077,6 +2077,16 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_RYOS_MK_PRO) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_SAVU) },
#endif
+#if IS_ENABLED(CONFIG_HID_NINTENDO)
+ { HID_USB_DEVICE(USB_VENDOR_ID_NINTENDO,
+ USB_DEVICE_ID_NINTENDO_PROCON) },
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO,
+ USB_DEVICE_ID_NINTENDO_PROCON) },
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO,
+ USB_DEVICE_ID_NINTENDO_JOYCONL) },
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO,
+ USB_DEVICE_ID_NINTENDO_JOYCONR) },
+#endif
#if IS_ENABLED(CONFIG_HID_SAITEK)
{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_PS1000) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RAT7_OLD) },
@@ -2099,6 +2109,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER) },
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_DONGLE) },
diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp_stats_util.c b/drivers/media/platform/msm/camera_v2/isp/msm_isp_stats_util.c
index 3e8220005f77..4ffd6e4e54e0 100644
--- a/drivers/media/platform/msm/camera_v2/isp/msm_isp_stats_util.c
+++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp_stats_util.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2018, 2020 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
@@ -548,10 +548,10 @@ int msm_isp_release_stats_stream(struct vfe_device *vfe_dev, void *arg)
stream_info->buffer_offset[i] = stream_info->buffer_offset[k];
}
+ stream_info->num_isp--;
stream_info->vfe_dev[stream_info->num_isp] = 0;
stream_info->stream_handle[stream_info->num_isp] = 0;
stream_info->buffer_offset[stream_info->num_isp] = 0;
- stream_info->num_isp--;
stream_info->vfe_mask &= ~(1 << vfe_dev->pdev->id);
if (stream_info->num_isp == 0)
stream_info->state = STATS_AVAILABLE;
diff --git a/drivers/video/fbdev/msm/mdss_hdmi_edid.c b/drivers/video/fbdev/msm/mdss_hdmi_edid.c
index 6f0234500d70..5095f4ae49b5 100644
--- a/drivers/video/fbdev/msm/mdss_hdmi_edid.c
+++ b/drivers/video/fbdev/msm/mdss_hdmi_edid.c
@@ -65,6 +65,11 @@
#define EDID_VENDOR_ID_SIZE 4
#define EDID_IEEE_REG_ID 0x0c03
+enum edid_screen_orientation {
+ LANDSCAPE = 1,
+ PORTRAIT = 2,
+};
+
enum edid_sink_mode {
SINK_MODE_DVI,
SINK_MODE_HDMI
@@ -143,6 +148,8 @@ struct hdmi_edid_ctrl {
u8 cea_blks;
/* DC: MSB -> LSB: Y420_48|Y420_36|Y420_30|RGB48|RGB36|RGB30|Y444 */
u8 deep_color;
+ u8 physical_width;
+ u8 physical_height;
u16 physical_address;
u32 video_resolution; /* selected by user */
u32 sink_mode; /* HDMI or DVI */
@@ -167,6 +174,9 @@ struct hdmi_edid_ctrl {
bool y420_cmdb_supports_all;
struct hdmi_edid_y420_cmdb y420_cmdb;
+ enum edid_screen_orientation orientation;
+ enum aspect_ratio aspect_ratio;
+
struct hdmi_edid_sink_data sink_data;
struct hdmi_edid_init_data init_data;
struct hdmi_edid_sink_caps sink_caps;
@@ -254,6 +264,11 @@ int hdmi_edid_reset_parser(void *input)
edid_ctrl->y420_cmdb_supports_all = false;
kfree(edid_ctrl->y420_cmdb.vic_list);
memset(&edid_ctrl->y420_cmdb, 0, sizeof(edid_ctrl->y420_cmdb));
+
+ edid_ctrl->physical_width = 0;
+ edid_ctrl->physical_height = 0;
+ edid_ctrl->orientation = 0;
+ edid_ctrl->aspect_ratio = HDMI_RES_AR_INVALID;
return 0;
}
@@ -449,6 +464,30 @@ static ssize_t hdmi_edid_sysfs_rda_modes(struct device *dev,
static DEVICE_ATTR(edid_modes, S_IRUGO | S_IWUSR, hdmi_edid_sysfs_rda_modes,
hdmi_edid_sysfs_wta_modes);
+static ssize_t hdmi_edid_sysfs_rda_screen_size(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ ssize_t ret = 0;
+ struct hdmi_edid_ctrl *edid_ctrl = hdmi_edid_get_ctrl(dev);
+
+ if (!edid_ctrl) {
+ DEV_ERR("%s: invalid input\n", __func__);
+ return -EINVAL;
+ }
+
+ ret += scnprintf(buf + ret, PAGE_SIZE - ret, "%d",
+ (edid_ctrl->physical_width * 10));
+ ret += scnprintf(buf + ret, PAGE_SIZE - ret, " %d",
+ (edid_ctrl->physical_height * 10));
+
+ DEV_DBG("%s: '%s'\n", __func__, buf);
+ ret += scnprintf(buf + ret, PAGE_SIZE - ret, "\n");
+
+ return ret;
+} /* hdmi_edid_sysfs_rda_screen_size */
+static DEVICE_ATTR(edid_screen_size, S_IRUGO, hdmi_edid_sysfs_rda_screen_size,
+ NULL);
+
static ssize_t hdmi_edid_sysfs_rda_res_info_data(struct device *dev,
struct device_attribute *attr, char *buf)
{
@@ -855,6 +894,7 @@ static DEVICE_ATTR(hdr_data, S_IRUGO, hdmi_edid_sysfs_rda_hdr_data, NULL);
static struct attribute *hdmi_edid_fs_attrs[] = {
&dev_attr_edid_modes.attr,
+ &dev_attr_edid_screen_size.attr,
&dev_attr_pa.attr,
&dev_attr_scan_info.attr,
&dev_attr_edid_3d_modes.attr,
@@ -1515,6 +1555,68 @@ static u32 hdmi_edid_extract_ieee_reg_id(struct hdmi_edid_ctrl *edid_ctrl,
return ((u32)vsd[3] << 16) + ((u32)vsd[2] << 8) + (u32)vsd[1];
} /* hdmi_edid_extract_ieee_reg_id */
+static void hdmi_edid_extract_bdpf(struct hdmi_edid_ctrl *edid_ctrl)
+{
+ u8 *edid_buf = NULL;
+
+ if (!edid_ctrl) {
+ DEV_ERR("%s: invalid input\n", __func__);
+ return;
+ }
+
+ edid_buf = edid_ctrl->edid_buf;
+ if (edid_buf[21] && edid_buf[22]) {
+ edid_ctrl->physical_width = edid_buf[21];
+ edid_ctrl->physical_height = edid_buf[22];
+
+ DEV_DBG("%s: EDID: Horizontal Screen Size = %d cm\n",
+ __func__, edid_ctrl->physical_width);
+ DEV_DBG("%s: EDID: Vertical Screen Size = %d cm\n",
+ __func__, edid_ctrl->physical_height);
+ } else if (edid_buf[21]) {
+ edid_ctrl->orientation = LANDSCAPE;
+ switch (edid_buf[21]) {
+ case 0x4F:
+ edid_ctrl->aspect_ratio = HDMI_RES_AR_16_9;
+ break;
+ case 0x3D:
+ edid_ctrl->aspect_ratio = HDMI_RES_AR_16_10;
+ break;
+ case 0x22:
+ edid_ctrl->aspect_ratio = HDMI_RES_AR_4_3;
+ break;
+ case 0x1A:
+ edid_ctrl->aspect_ratio = HDMI_RES_AR_5_4;
+ break;
+ }
+ DEV_DBG("%s: EDID: Landscape Aspect Ratio = %d\n",
+ __func__, edid_ctrl->aspect_ratio);
+ } else if (edid_buf[22]) {
+ edid_ctrl->orientation = PORTRAIT;
+ switch (edid_buf[22]) {
+ case 0x4F:
+ edid_ctrl->aspect_ratio = HDMI_RES_AR_16_9;
+ break;
+ case 0x3D:
+ edid_ctrl->aspect_ratio = HDMI_RES_AR_16_10;
+ break;
+ case 0x22:
+ edid_ctrl->aspect_ratio = HDMI_RES_AR_4_3;
+ break;
+ case 0x1A:
+ edid_ctrl->aspect_ratio = HDMI_RES_AR_5_4;
+ break;
+ }
+ DEV_DBG("%s: EDID: Portrait Aspect Ratio = %d\n",
+ __func__, edid_ctrl->aspect_ratio);
+ } else {
+ pr_debug("%s: Undefined Screen size/Aspect ratio\n", __func__);
+ edid_ctrl->orientation = 0;
+ edid_ctrl->physical_width = 0;
+ edid_ctrl->physical_height = 0;
+ }
+}
+
static void hdmi_edid_extract_vendor_id(struct hdmi_edid_ctrl *edid_ctrl)
{
char *vendor_id;
@@ -2462,6 +2564,8 @@ int hdmi_edid_parser(void *input)
hdmi_edid_extract_vendor_id(edid_ctrl);
+ hdmi_edid_extract_bdpf(edid_ctrl);
+
/* EDID_CEA_EXTENSION_FLAG[0x7E] - CEC extension byte */
num_of_cea_blocks = edid_buf[EDID_BLOCK_SIZE - 2];
DEV_DBG("%s: No. of CEA/Extended EDID blocks is [%u]\n", __func__,
@@ -2914,6 +3018,30 @@ bool hdmi_edid_is_audio_supported(void *input)
return (edid_ctrl->basic_audio_supp || edid_ctrl->adb_size);
}
+u32 hdmi_edid_get_phys_width(void *input)
+{
+ struct hdmi_edid_ctrl *edid_ctrl = (struct hdmi_edid_ctrl *)input;
+
+ if (!edid_ctrl) {
+ DEV_ERR("%s: invalid edid_ctrl data\n", __func__);
+ return 0;
+ }
+
+ return (u32)edid_ctrl->physical_width * 10; /* return in mm */
+}
+
+u32 hdmi_edid_get_phys_height(void *input)
+{
+ struct hdmi_edid_ctrl *edid_ctrl = (struct hdmi_edid_ctrl *)input;
+
+ if (!edid_ctrl) {
+ DEV_ERR("%s: invalid edid_ctrl data\n", __func__);
+ return 0;
+ }
+
+ return (u32)edid_ctrl->physical_height * 10; /* return in mm */
+}
+
void hdmi_edid_deinit(void *input)
{
struct hdmi_edid_ctrl *edid_ctrl = (struct hdmi_edid_ctrl *)input;
diff --git a/drivers/video/fbdev/msm/mdss_hdmi_edid.h b/drivers/video/fbdev/msm/mdss_hdmi_edid.h
index d258aa9f95bc..9b3b5fa952b4 100644
--- a/drivers/video/fbdev/msm/mdss_hdmi_edid.h
+++ b/drivers/video/fbdev/msm/mdss_hdmi_edid.h
@@ -94,5 +94,7 @@ void hdmi_edid_set_max_pclk_rate(void *input, u32 max_pclk_khz);
bool hdmi_edid_is_audio_supported(void *input);
u32 hdmi_edid_get_sink_caps_max_tmds_clk(void *input);
u8 hdmi_edid_get_colorimetry(void *input);
+u32 hdmi_edid_get_phys_width(void *input);
+u32 hdmi_edid_get_phys_height(void *input);
#endif /* __HDMI_EDID_H__ */
diff --git a/drivers/video/fbdev/msm/mdss_hdmi_tx.c b/drivers/video/fbdev/msm/mdss_hdmi_tx.c
index 747c245bf78e..af08edf13d87 100644
--- a/drivers/video/fbdev/msm/mdss_hdmi_tx.c
+++ b/drivers/video/fbdev/msm/mdss_hdmi_tx.c
@@ -3432,6 +3432,9 @@ static int hdmi_tx_power_off(struct hdmi_tx_ctrl *hdmi_ctrl)
hdmi_ctrl->panel_power_on = false;
hdmi_ctrl->vic = 0;
+ hdmi_ctrl->use_bt2020 = false;
+ hdmi_ctrl->curr_hdr_state = HDR_DISABLE;
+
if (hdmi_ctrl->hpd_off_pending || hdmi_ctrl->panel_suspend)
hdmi_tx_hpd_off(hdmi_ctrl);
@@ -4125,6 +4128,7 @@ sysfs_err:
static int hdmi_tx_evt_handle_check_param(struct hdmi_tx_ctrl *hdmi_ctrl)
{
struct mdss_panel_info *pinfo = &hdmi_ctrl->panel_data.panel_info;
+ void *data = NULL;
int new_vic = -1;
int rc = 0;
@@ -4136,6 +4140,10 @@ static int hdmi_tx_evt_handle_check_param(struct hdmi_tx_ctrl *hdmi_ctrl)
goto end;
}
+ data = hdmi_tx_get_fd(HDMI_TX_FEAT_EDID);
+ pinfo->physical_width = hdmi_edid_get_phys_width(data);
+ pinfo->physical_height = hdmi_edid_get_phys_height(data);
+
/*
* return value of 1 lets mdss know that panel
* needs a reconfig due to new resolution and
diff --git a/sound/soc/msm/msm8998.c b/sound/soc/msm/msm8998.c
index 8b3da6d7dd64..e48b23dffe61 100644
--- a/sound/soc/msm/msm8998.c
+++ b/sound/soc/msm/msm8998.c
@@ -7516,6 +7516,33 @@ static struct snd_soc_dai_link msm_common_be_dai_links[] = {
.be_hw_params_fixup = msm_be_hw_params_fixup,
.ignore_suspend = 1,
},
+ /* Proxy Tx BACK END DAI Link */
+ {
+ .name = LPASS_BE_PROXY_TX,
+ .stream_name = "Proxy Capture",
+ .cpu_dai_name = "msm-dai-q6-dev.8195",
+ .platform_name = "msm-pcm-routing",
+ .codec_name = "msm-stub-codec.1",
+ .codec_dai_name = "msm-stub-tx",
+ .no_pcm = 1,
+ .dpcm_capture = 1,
+ .be_id = MSM_BACKEND_DAI_PROXY_TX,
+ .ignore_suspend = 1,
+ },
+ /* Proxy Rx BACK END DAI Link */
+ {
+ .name = LPASS_BE_PROXY_RX,
+ .stream_name = "Proxy Playback",
+ .cpu_dai_name = "msm-dai-q6-dev.8194",
+ .platform_name = "msm-pcm-routing",
+ .codec_name = "msm-stub-codec.1",
+ .codec_dai_name = "msm-stub-rx",
+ .no_pcm = 1,
+ .dpcm_playback = 1,
+ .be_id = MSM_BACKEND_DAI_PROXY_RX,
+ .ignore_pmdown_time = 1,
+ .ignore_suspend = 1,
+ },
{
.name = LPASS_BE_USB_AUDIO_RX,
.stream_name = "USB Audio Playback",