From: Bhawanpreet Lakha <bhawanpreet.la...@amd.com>

Change-Id: I78a2d4bc51d2ad856046073020aa5d93bf179083
Signed-off-by: Bhawanpreet Lakha <bhawanpreet.la...@amd.com>
Reviewed-by: Harry Wentland <harry.wentl...@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index b20ea5a945a4..45642d107273 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -4761,6 +4761,13 @@ int amdgpu_dm_atomic_check(struct drm_device *dev,
                                                                    
&crtc_state->mode,
                                                                    
dm_conn_state);
 
+                               /*
+                                * we can have no stream on ACTION_SET if a 
display
+                                * was disconnected during S3, in this case it 
not and
+                                * error, the OS will be updated after 
detection, and
+                                * do the right thing on next atomic commit
+                                */
+
                                if (!new_stream) {
                                        DRM_DEBUG_KMS("%s: Failed to create new 
stream for crtc %d\n",
                                                        __func__, 
acrtc->base.base.id);
@@ -4773,14 +4780,6 @@ int amdgpu_dm_atomic_check(struct drm_device *dev,
                        if (modeset_required(crtc_state, new_stream,
                                             old_acrtc_state->stream)) {
 
-
-                       /*
-                        * we can have no stream on ACTION_SET if a display
-                        * was disconnected during S3, in this case it not and
-                        * error, the OS will be updated after detection, and
-                        * do the right thing on next atomic commit
-                        */
-
                                if (new_acrtc_state->stream)
                                        
dc_stream_release(new_acrtc_state->stream);
 
-- 
2.11.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to