Revert "drm/amd/display: Match actual state during S3 resume."
Subsystems (3)
PATCH 1/1 Revert "drm/amd/display: Match actual state during S3 resume."
This reverts commit 7ae4acd21e9e264afb079e23d43bcf2238c7dbea.
fix s3 hang issue.
Change-Id Iefb61cf8072b83146d867961b22f13ad83ab0106
Signed-off-by Rex Zhu <[email protected]>
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 38 ----------------------- 1 file changed, 38 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -38
@@ -649,11 +649,6 @@ int amdgpu_dm_display_resume(struct amdgpu_device *adev)struct drm_connector *connector;struct drm_crtc *crtc;struct drm_crtc_state *crtc_state; -struct dm_crtc_state *dm_crtc_state; -struct drm_plane *plane; -struct drm_plane_state *plane_state; -struct dm_plane_state *dm_plane_state; -struct dm_atomic_state *cached_state;int ret =0 ;int i;
@@ -687,43 +682,10 @@ int amdgpu_dm_display_resume(struct amdgpu_device *adev)amdgpu_dm_update_connector_after_detect (aconnector);mutex_unlock (&aconnector->hpd_lock); } -/* Force mode set in atomic comit */ for_each_crtc_in_state (adev->dm.cached_state, crtc, crtc_state, i) crtc_state->active_changed = true; - cached_state =to_dm_atomic_state (adev->dm.cached_state); - -/* -* During suspend, the cached state is saved before all streams are -* disabled. Refresh cached state to match actual current state before -* restoring it. -*/ -WARN_ON (kref_read (&cached_state->context->refcount) >1 ); -dc_release_state (cached_state->context); - - cached_state->context =dc_create_state (); -ASSERT (cached_state->context); -dc_resource_state_copy_construct_current (adev->dm.dc, cached_state->context); - -for_each_new_crtc_in_state (adev->dm.cached_state, crtc, crtc_state, i) { - dm_crtc_state =to_dm_crtc_state (crtc_state); -if (dm_crtc_state->stream) { -WARN_ON (kref_read (&dm_crtc_state->stream->refcount) >1 ); -dc_stream_release (dm_crtc_state->stream); - dm_crtc_state->stream =NULL ; - } - } - -for_each_new_plane_in_state (adev->dm.cached_state, plane, plane_state, i) { - dm_plane_state =to_dm_plane_state (plane_state); -if (dm_plane_state->dc_state) { -WARN_ON (kref_read (&dm_plane_state->dc_state->refcount) >1 ); -dc_plane_state_release (dm_plane_state->dc_state); - dm_plane_state->dc_state =NULL ; - } - } - ret =drm_atomic_helper_resume (ddev, adev->dm.cached_state);drm_atomic_state_put (adev->dm.cached_state);
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1508496739-15138-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org
Alex Deucher
Acked-byQuoted 6 lines · Rex Zhu
This reverts commit
7ae4acd21e9e264afb079e23d43bcf2238c7dbea.fix s3 hang issue.
Change-Id Iefb61cf8072b83146d867961b22f13ad83ab0106Signed-off-by Rex Zhu <[email protected]>
I think the DAL guys may have a proper fix for this, but either way:
Acked-by Alex Deucher <[email protected]>
Quoted 67 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 38 ----------------------- 1 file changed, 38 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-39@@ -649,11 +649,6 @@ int amdgpu_dm_display_resume(struct amdgpu_device *adev)struct drm_connector *connector;struct drm_crtc *crtc;struct drm_crtc_state *crtc_state; -struct dm_crtc_state *dm_crtc_state; -struct drm_plane *plane; -struct drm_plane_state *plane_state; -struct dm_plane_state *dm_plane_state; -struct dm_atomic_state *cached_state;int ret =0 ;int i;@@ -687,43 +682,10 @@ int amdgpu_dm_display_resume(struct amdgpu_device *adev)amdgpu_dm_update_connector_after_detect (aconnector);mutex_unlock (&aconnector->hpd_lock); } -/* Force mode set in atomic comit */ for_each_crtc_in_state (adev->dm.cached_state, crtc, crtc_state, i) crtc_state->active_changed = true; - cached_state =to_dm_atomic_state (adev->dm.cached_state); - -/* -* During suspend, the cached state is saved before all streams are -* disabled. Refresh cached state to match actual current state before -* restoring it. -*/ -WARN_ON (kref_read (&cached_state->context->refcount) >1 ); -dc_release_state (cached_state->context); - - cached_state->context =dc_create_state (); -ASSERT (cached_state->context); -dc_resource_state_copy_construct_current (adev->dm.dc, cached_state->context); - -for_each_new_crtc_in_state (adev->dm.cached_state, crtc, crtc_state, i) { - dm_crtc_state =to_dm_crtc_state (crtc_state); -if (dm_crtc_state->stream) { -WARN_ON (kref_read (&dm_crtc_state->stream->refcount) >1 ); -dc_stream_release (dm_crtc_state->stream); - dm_crtc_state->stream =NULL ; - } - } - -for_each_new_plane_in_state (adev->dm.cached_state, plane, plane_state, i) { - dm_plane_state =to_dm_plane_state (plane_state); -if (dm_plane_state->dc_state) { -WARN_ON (kref_read (&dm_plane_state->dc_state->refcount) >1 ); -dc_plane_state_release (dm_plane_state->dc_state); - dm_plane_state->dc_state =NULL ; - } - } - ret =drm_atomic_helper_resume (ddev, adev->dm.cached_state);drm_atomic_state_put (adev->dm.cached_state); --1.9.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx