From 67f7f7dd87fb5a4b3e8629612c66234792d5d7e0 Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 11 Apr 2022 03:53:42 +0000 Subject: [PATCH] drm/amd/display: Add affected crtcs to atomic state for dsc mst unplug From Roman Li 0f47edc22c2b7e4c1903d74c3992f09db9453d11 in linux 5.15.y/5.15.33 128f8ed5902a287a6bb4afe0ffdae8a80b2a64ec in mainline linux --- sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c index fbb2ea7a1a0..06a11becd43 100644 --- a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -10240,10 +10240,13 @@ static int dm_check_crtc_cursor(struct drm_atomic_state *state, static int add_affected_mst_dsc_crtcs(struct drm_atomic_state *state, struct drm_crtc *crtc) { struct drm_connector *connector; - struct drm_connector_state *conn_state; + struct drm_connector_state *conn_state, *old_conn_state; struct amdgpu_dm_connector *aconnector = NULL; int i; - for_each_new_connector_in_state(state, connector, conn_state, i) { + for_each_oldnew_connector_in_state(state, connector, old_conn_state, conn_state, i) { + if (!conn_state->crtc) + conn_state = old_conn_state; + if (conn_state->crtc != crtc) continue; -- 2.20.1