drm: i915: Wait for fences on new fb, not old
authorDaniel Stone <[email protected]>
Fri, 21 Oct 2016 14:44:54 +0000 (15:44 +0100)
committerDaniel Vetter <[email protected]>
Mon, 24 Oct 2016 07:02:58 +0000 (09:02 +0200)
The previous code would wait for fences on the framebuffer from the old
plane state to complete, rather than the new, so you would see tearing
everywhere. Fix this to wait on the new state before we make it active.

Signed-off-by: Daniel Stone <[email protected]>
Fixes: 94f050246b42 ("drm/i915: nonblocking commit")
Cc: [email protected]
Cc: Daniel Vetter <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/gpu/drm/i915/intel_display.c

index 6ccedf2af98e901553c5728ece7a80163b72acf3..d5d96cffac7d7981806ef949475f3e15c01dde5c 100644 (file)
@@ -14401,7 +14401,7 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 
        for_each_plane_in_state(state, plane, plane_state, i) {
                struct intel_plane_state *intel_plane_state =
-                       to_intel_plane_state(plane_state);
+                       to_intel_plane_state(plane->state);
 
                if (!intel_plane_state->wait_req)
                        continue;