drm/amd/display: Add affected crtcs to atomic state for dsc mst unplug
authorjsg <jsg@openbsd.org>
Mon, 11 Apr 2022 03:53:42 +0000 (03:53 +0000)
committerjsg <jsg@openbsd.org>
Mon, 11 Apr 2022 03:53:42 +0000 (03:53 +0000)
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

index fbb2ea7..06a11be 100644 (file)
@@ -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;