drm/i915: Wait for vblank between disabling a sprite and unpinning the fb
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 27 Mar 2013 15:49:13 +0000 (17:49 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 27 Mar 2013 16:48:11 +0000 (17:48 +0100)
When disabling a sprite, wait for the sprite to stop fetching data
from memory before unpinning the fb.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_sprite.c

index 414d325f28d39451382c61cd756958f2f40b207c..27df5b871be52f5ec7eb04f47d0476a78cc6b743 100644 (file)
@@ -582,6 +582,8 @@ intel_disable_plane(struct drm_plane *plane)
        if (!intel_plane->obj)
                goto out;
 
+       intel_wait_for_vblank(dev, intel_plane->pipe);
+
        mutex_lock(&dev->struct_mutex);
        intel_unpin_fb_obj(intel_plane->obj);
        intel_plane->obj = NULL;