drm/amd/display: Match actual state during S3 resume.
authorLeo (Sunpeng) Li <sunpeng.li@amd.com>
Thu, 7 Sep 2017 21:05:38 +0000 (17:05 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Sat, 21 Oct 2017 20:40:54 +0000 (16:40 -0400)
commit4f346e655d24140fb40b46f814506ba17ac34ea1
treec24cad22a11a581d42486ed153a7eb467b54c5d6
parent7f4a7253b112c9ed21022e25c7a740d824c56619
drm/amd/display: Match actual state during S3 resume.

During system suspend, we:

1. Cache a duplicate of the current DRM atomic state, which calls hooks
   to duplicate our internal states.
2. Call hooks to disable all functionalities.
3. System suspended.

During resume, we attempt to restore the cached state. However, our
interal states are now stale, since step 1 was done before step 2.
i.e. our cached state does not reflect the disabled nature of things.

This change resolves that by destroying all relevant states to reflect
the actual state during resume.

Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@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.c