From 949941542c0b279c6e0e1bb3cd5a0a4eee5341bd Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 27 Mar 2023 07:36:36 +0000 Subject: [PATCH] drm/display/dp_mst: Fix payload addition on a disconnected sink From Imre Deak 6e48e7901e6258b8ea1116d70752d0eb2eca797d in linux-6.1.y/6.1.18 33f960e23c29d113fe3193e0bdc19ac4f3776f20 in mainline linux --- sys/dev/pci/drm/display/drm_dp_mst_topology.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/display/drm_dp_mst_topology.c b/sys/dev/pci/drm/display/drm_dp_mst_topology.c index d4fff370ec4..f930f0dd260 100644 --- a/sys/dev/pci/drm/display/drm_dp_mst_topology.c +++ b/sys/dev/pci/drm/display/drm_dp_mst_topology.c @@ -3319,8 +3319,13 @@ int drm_dp_add_payload_part1(struct drm_dp_mst_topology_mgr *mgr, int ret; port = drm_dp_mst_topology_get_port_validated(mgr, payload->port); - if (!port) + if (!port) { + drm_dbg_kms(mgr->dev, + "VCPI %d for port %p not in topology, not creating a payload\n", + payload->vcpi, payload->port); + payload->vc_start_slot = -1; return 0; + } if (mgr->payload_count == 0) mgr->next_start_slot = mst_state->start_slot; -- 2.20.1