Skip to content

Commit

Permalink
drm/i915: Wait for vblank before unpinning old fb
Browse files Browse the repository at this point in the history
Be paranoid and ensure that the vblank has passed and the scanout has
switched to the new fb, before unpinning the old one and possibly
tearing down its PTEs.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
  • Loading branch information
Chris Wilson committed Dec 15, 2010
1 parent c6df541 commit b7f1de2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1626,8 +1626,10 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
return ret;
}

if (old_fb)
if (old_fb) {
intel_wait_for_vblank(dev, intel_crtc->pipe);
i915_gem_object_unpin(to_intel_framebuffer(old_fb)->obj);
}

mutex_unlock(&dev->struct_mutex);

Expand Down

0 comments on commit b7f1de2

Please sign in to comment.