From: Greg Kroah-Hartman Date: Fri, 14 Feb 2020 21:12:15 +0000 (-0500) Subject: drop drm-dp_mst-remove-vcpi-while-disabling-topology-mgr.patch X-Git-Tag: v4.4.214~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=42227058323d7de3b6cd2fa1ef966c91276af47d;p=thirdparty%2Fkernel%2Fstable-queue.git drop drm-dp_mst-remove-vcpi-while-disabling-topology-mgr.patch from 4.4, 4.9, and 4.14 --- diff --git a/queue-4.14/drm-dp_mst-remove-vcpi-while-disabling-topology-mgr.patch b/queue-4.14/drm-dp_mst-remove-vcpi-while-disabling-topology-mgr.patch deleted file mode 100644 index 77231c2d304..00000000000 --- a/queue-4.14/drm-dp_mst-remove-vcpi-while-disabling-topology-mgr.patch +++ /dev/null @@ -1,92 +0,0 @@ -From a8a2a3d70f0d811e54c88481a1c27323444dadd9 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 5 Dec 2019 17:00:43 +0800 -Subject: drm/dp_mst: Remove VCPI while disabling topology mgr - -From: Wayne Lin - -[ Upstream commit 64e62bdf04ab8529f45ed0a85122c703035dec3a ] - -[Why] - -This patch is trying to address the issue observed when hotplug DP -daisy chain monitors. - -e.g. -src-mstb-mstb-sst -> src (unplug) mstb-mstb-sst -> src-mstb-mstb-sst -(plug in again) - -Once unplug a DP MST capable device, driver will call -drm_dp_mst_topology_mgr_set_mst() to disable MST. In this function, -it cleans data of topology manager while disabling mst_state. However, -it doesn't clean up the proposed_vcpis of topology manager. -If proposed_vcpi is not reset, once plug in MST daisy chain monitors -later, code will fail at checking port validation while trying to -allocate payloads. - -When MST capable device is plugged in again and try to allocate -payloads by calling drm_dp_update_payload_part1(), this -function will iterate over all proposed virtual channels to see if -any proposed VCPI's num_slots is greater than 0. If any proposed -VCPI's num_slots is greater than 0 and the port which the -specific virtual channel directed to is not in the topology, code then -fails at the port validation. Since there are stale VCPI allocations -from the previous topology enablement in proposed_vcpi[], code will fail -at port validation and reurn EINVAL. - -[How] - -Clean up the data of stale proposed_vcpi[] and reset mgr->proposed_vcpis -to NULL while disabling mst in drm_dp_mst_topology_mgr_set_mst(). - -Changes since v1: -*Add on more details in commit message to describe the issue which the -patch is trying to fix - -Signed-off-by: Wayne Lin -[added cc to stable] -Signed-off-by: Lyude Paul -Link: https://patchwork.freedesktop.org/patch/msgid/20191205090043.7580-1-Wayne.Lin@amd.com -Cc: # v3.17+ -Signed-off-by: Sasha Levin ---- - drivers/gpu/drm/drm_dp_mst_topology.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c -index 9d94c306c8ca1..f427a5dc66685 100644 ---- a/drivers/gpu/drm/drm_dp_mst_topology.c -+++ b/drivers/gpu/drm/drm_dp_mst_topology.c -@@ -2046,6 +2046,7 @@ static bool drm_dp_get_vc_payload_bw(int dp_link_bw, - int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool mst_state) - { - int ret = 0; -+ int i = 0; - struct drm_dp_mst_branch *mstb = NULL; - - mutex_lock(&mgr->lock); -@@ -2106,10 +2107,21 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms - /* this can fail if the device is gone */ - drm_dp_dpcd_writeb(mgr->aux, DP_MSTM_CTRL, 0); - ret = 0; -+ mutex_lock(&mgr->payload_lock); - memset(mgr->payloads, 0, mgr->max_payloads * sizeof(struct drm_dp_payload)); - mgr->payload_mask = 0; - set_bit(0, &mgr->payload_mask); -+ for (i = 0; i < mgr->max_payloads; i++) { -+ struct drm_dp_vcpi *vcpi = mgr->proposed_vcpis[i]; -+ -+ if (vcpi) { -+ vcpi->vcpi = 0; -+ vcpi->num_slots = 0; -+ } -+ mgr->proposed_vcpis[i] = NULL; -+ } - mgr->vcpi_mask = 0; -+ mutex_unlock(&mgr->payload_lock); - } - - out_unlock: --- -2.20.1 - diff --git a/queue-4.14/series b/queue-4.14/series index 9c5e1e507b1..454404789e5 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -124,7 +124,6 @@ btrfs-free-block-groups-after-free-ing-fs-trees.patch btrfs-remove-trivial-locking-wrappers-of-tree-mod-lo.patch btrfs-fix-race-between-adding-and-putting-tree-mod-s.patch drm-atmel-hlcdc-enable-clock-before-configuring-timi.patch -drm-dp_mst-remove-vcpi-while-disabling-topology-mgr.patch kvm-x86-protect-pmu_intel.c-from-spectre-v1-l1tf-att.patch btrfs-flush-write-bio-if-we-loop-in-extent_write_cac.patch kvm-x86-fix-potential-put_fpu-w-o-load_fpu-on-mpx-pl.patch diff --git a/queue-4.4/drm-dp_mst-remove-vcpi-while-disabling-topology-mgr.patch b/queue-4.4/drm-dp_mst-remove-vcpi-while-disabling-topology-mgr.patch deleted file mode 100644 index 9ea0060f516..00000000000 --- a/queue-4.4/drm-dp_mst-remove-vcpi-while-disabling-topology-mgr.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 1aee00e5e1f5483eec506bd57a050d222ecb6764 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 5 Dec 2019 17:00:43 +0800 -Subject: drm/dp_mst: Remove VCPI while disabling topology mgr - -From: Wayne Lin - -[ Upstream commit 64e62bdf04ab8529f45ed0a85122c703035dec3a ] - -[Why] - -This patch is trying to address the issue observed when hotplug DP -daisy chain monitors. - -e.g. -src-mstb-mstb-sst -> src (unplug) mstb-mstb-sst -> src-mstb-mstb-sst -(plug in again) - -Once unplug a DP MST capable device, driver will call -drm_dp_mst_topology_mgr_set_mst() to disable MST. In this function, -it cleans data of topology manager while disabling mst_state. However, -it doesn't clean up the proposed_vcpis of topology manager. -If proposed_vcpi is not reset, once plug in MST daisy chain monitors -later, code will fail at checking port validation while trying to -allocate payloads. - -When MST capable device is plugged in again and try to allocate -payloads by calling drm_dp_update_payload_part1(), this -function will iterate over all proposed virtual channels to see if -any proposed VCPI's num_slots is greater than 0. If any proposed -VCPI's num_slots is greater than 0 and the port which the -specific virtual channel directed to is not in the topology, code then -fails at the port validation. Since there are stale VCPI allocations -from the previous topology enablement in proposed_vcpi[], code will fail -at port validation and reurn EINVAL. - -[How] - -Clean up the data of stale proposed_vcpi[] and reset mgr->proposed_vcpis -to NULL while disabling mst in drm_dp_mst_topology_mgr_set_mst(). - -Changes since v1: -*Add on more details in commit message to describe the issue which the -patch is trying to fix - -Signed-off-by: Wayne Lin -[added cc to stable] -Signed-off-by: Lyude Paul -Link: https://patchwork.freedesktop.org/patch/msgid/20191205090043.7580-1-Wayne.Lin@amd.com -Cc: # v3.17+ -Signed-off-by: Sasha Levin ---- - drivers/gpu/drm/drm_dp_mst_topology.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c -index 4d0f77f0edad1..d4f1a40f6fc5e 100644 ---- a/drivers/gpu/drm/drm_dp_mst_topology.c -+++ b/drivers/gpu/drm/drm_dp_mst_topology.c -@@ -2039,6 +2039,7 @@ static bool drm_dp_get_vc_payload_bw(int dp_link_bw, - int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool mst_state) - { - int ret = 0; -+ int i = 0; - struct drm_dp_mst_branch *mstb = NULL; - - mutex_lock(&mgr->lock); -@@ -2103,10 +2104,21 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms - /* this can fail if the device is gone */ - drm_dp_dpcd_writeb(mgr->aux, DP_MSTM_CTRL, 0); - ret = 0; -+ mutex_lock(&mgr->payload_lock); - memset(mgr->payloads, 0, mgr->max_payloads * sizeof(struct drm_dp_payload)); - mgr->payload_mask = 0; - set_bit(0, &mgr->payload_mask); -+ for (i = 0; i < mgr->max_payloads; i++) { -+ struct drm_dp_vcpi *vcpi = mgr->proposed_vcpis[i]; -+ -+ if (vcpi) { -+ vcpi->vcpi = 0; -+ vcpi->num_slots = 0; -+ } -+ mgr->proposed_vcpis[i] = NULL; -+ } - mgr->vcpi_mask = 0; -+ mutex_unlock(&mgr->payload_lock); - } - - out_unlock: --- -2.20.1 - diff --git a/queue-4.4/series b/queue-4.4/series index c6a43106857..123db66a5f1 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -64,7 +64,6 @@ btrfs-fix-assertion-failure-on-fsync-with-no_holes-e.patch btrfs-remove-trivial-locking-wrappers-of-tree-mod-lo.patch btrfs-fix-race-between-adding-and-putting-tree-mod-s.patch drm-atmel-hlcdc-enable-clock-before-configuring-timi.patch -drm-dp_mst-remove-vcpi-while-disabling-topology-mgr.patch kvm-x86-drop-picdev_in_range.patch kvm-x86-refactor-picdev_write-to-prevent-spectre-v1-.patch kvm-x86-protect-pmu_intel.c-from-spectre-v1-l1tf-att.patch diff --git a/queue-4.9/drm-dp_mst-remove-vcpi-while-disabling-topology-mgr.patch b/queue-4.9/drm-dp_mst-remove-vcpi-while-disabling-topology-mgr.patch deleted file mode 100644 index bc2e85b0f86..00000000000 --- a/queue-4.9/drm-dp_mst-remove-vcpi-while-disabling-topology-mgr.patch +++ /dev/null @@ -1,92 +0,0 @@ -From fa78001d4127e5e466a2951da248875f7dd093e1 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 5 Dec 2019 17:00:43 +0800 -Subject: drm/dp_mst: Remove VCPI while disabling topology mgr - -From: Wayne Lin - -[ Upstream commit 64e62bdf04ab8529f45ed0a85122c703035dec3a ] - -[Why] - -This patch is trying to address the issue observed when hotplug DP -daisy chain monitors. - -e.g. -src-mstb-mstb-sst -> src (unplug) mstb-mstb-sst -> src-mstb-mstb-sst -(plug in again) - -Once unplug a DP MST capable device, driver will call -drm_dp_mst_topology_mgr_set_mst() to disable MST. In this function, -it cleans data of topology manager while disabling mst_state. However, -it doesn't clean up the proposed_vcpis of topology manager. -If proposed_vcpi is not reset, once plug in MST daisy chain monitors -later, code will fail at checking port validation while trying to -allocate payloads. - -When MST capable device is plugged in again and try to allocate -payloads by calling drm_dp_update_payload_part1(), this -function will iterate over all proposed virtual channels to see if -any proposed VCPI's num_slots is greater than 0. If any proposed -VCPI's num_slots is greater than 0 and the port which the -specific virtual channel directed to is not in the topology, code then -fails at the port validation. Since there are stale VCPI allocations -from the previous topology enablement in proposed_vcpi[], code will fail -at port validation and reurn EINVAL. - -[How] - -Clean up the data of stale proposed_vcpi[] and reset mgr->proposed_vcpis -to NULL while disabling mst in drm_dp_mst_topology_mgr_set_mst(). - -Changes since v1: -*Add on more details in commit message to describe the issue which the -patch is trying to fix - -Signed-off-by: Wayne Lin -[added cc to stable] -Signed-off-by: Lyude Paul -Link: https://patchwork.freedesktop.org/patch/msgid/20191205090043.7580-1-Wayne.Lin@amd.com -Cc: # v3.17+ -Signed-off-by: Sasha Levin ---- - drivers/gpu/drm/drm_dp_mst_topology.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c -index 17aedaaf364c1..8b1d497b7f99f 100644 ---- a/drivers/gpu/drm/drm_dp_mst_topology.c -+++ b/drivers/gpu/drm/drm_dp_mst_topology.c -@@ -2042,6 +2042,7 @@ static bool drm_dp_get_vc_payload_bw(int dp_link_bw, - int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool mst_state) - { - int ret = 0; -+ int i = 0; - struct drm_dp_mst_branch *mstb = NULL; - - mutex_lock(&mgr->lock); -@@ -2106,10 +2107,21 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms - /* this can fail if the device is gone */ - drm_dp_dpcd_writeb(mgr->aux, DP_MSTM_CTRL, 0); - ret = 0; -+ mutex_lock(&mgr->payload_lock); - memset(mgr->payloads, 0, mgr->max_payloads * sizeof(struct drm_dp_payload)); - mgr->payload_mask = 0; - set_bit(0, &mgr->payload_mask); -+ for (i = 0; i < mgr->max_payloads; i++) { -+ struct drm_dp_vcpi *vcpi = mgr->proposed_vcpis[i]; -+ -+ if (vcpi) { -+ vcpi->vcpi = 0; -+ vcpi->num_slots = 0; -+ } -+ mgr->proposed_vcpis[i] = NULL; -+ } - mgr->vcpi_mask = 0; -+ mutex_unlock(&mgr->payload_lock); - } - - out_unlock: --- -2.20.1 - diff --git a/queue-4.9/series b/queue-4.9/series index a709ba00b4d..3c4474f3027 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -83,7 +83,6 @@ btrfs-use-bool-argument-in-free_root_pointers.patch btrfs-remove-trivial-locking-wrappers-of-tree-mod-lo.patch btrfs-fix-race-between-adding-and-putting-tree-mod-s.patch drm-atmel-hlcdc-enable-clock-before-configuring-timi.patch -drm-dp_mst-remove-vcpi-while-disabling-topology-mgr.patch kvm-x86-protect-pmu_intel.c-from-spectre-v1-l1tf-att.patch btrfs-flush-write-bio-if-we-loop-in-extent_write_cac.patch kvm-x86-mmu-apply-max-pa-check-for-mmio-sptes-to-32-.patch