drm/amd/display: Don't commit surfaces if no stream
authorHarry Wentland <harry.wentland@amd.com>
Thu, 25 May 2017 22:00:37 +0000 (18:00 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 22:07:40 +0000 (18:07 -0400)
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-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_types.c

index 1fc8bbf..7db04a4 100644 (file)
@@ -2549,6 +2549,9 @@ void amdgpu_dm_atomic_commit_tail(
                WARN_ON(!status);
                WARN_ON(!status->surface_count);
 
+               if (!acrtc->stream)
+                       continue;
+
                /*TODO How it works with MPO ?*/
                if (!dc_commit_surfaces_to_stream(
                                dm->dc,
@@ -2606,8 +2609,12 @@ void amdgpu_dm_atomic_commit_tail(
        }
 
        /* update planes when needed per crtc*/
-       for_each_crtc_in_state(state, pcrtc, old_crtc_state, j)
-               amdgpu_dm_commit_surfaces(state, dev, dm, pcrtc, &wait_for_vblank);
+       for_each_crtc_in_state(state, pcrtc, old_crtc_state, j) {
+               struct amdgpu_crtc *acrtc = to_amdgpu_crtc(pcrtc);
+
+               if (acrtc->stream)
+                       amdgpu_dm_commit_surfaces(state, dev, dm, pcrtc, &wait_for_vblank);
+       }
 
        for (i = 0; i < new_crtcs_count; i++) {
                /*