drm/amd/display: Fix coding error in connector atomic check
authorMikita Lipski <mikita.lipski@amd.com>
Tue, 12 Nov 2019 14:13:20 +0000 (09:13 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Nov 2019 15:12:54 +0000 (10:12 -0500)
[why]
For MST connector atomic check we have to check a new CRTC state
instead of an old one, when checking if CRTC is disabled to
release VCPI slots allocated.

Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c

index 205531c..81367c8 100644 (file)
@@ -273,7 +273,7 @@ static int dm_dp_mst_atomic_check(struct drm_connector *connector,
                return 0;
 
        if (new_conn_state->crtc) {
-               new_crtc_state = drm_atomic_get_old_crtc_state(state, new_conn_state->crtc);
+               new_crtc_state = drm_atomic_get_new_crtc_state(state, new_conn_state->crtc);
                if (!new_crtc_state ||
                    !drm_atomic_crtc_needs_modeset(new_crtc_state) ||
                    new_crtc_state->enable)