drm/vmwgfx: Use bo_driver::move_notify to unbind GMRs.

This was previously done explicitly for overlay- and fb buffers.
Now it's done for any buffer leaving the SYSTEM memory region.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Thomas Hellstrom
2010-01-13 22:28:39 +01:00
committed by Dave Airlie
parent 7704befbd5
commit effe1105be
5 changed files with 22 additions and 29 deletions

View File

@@ -104,7 +104,6 @@ static int vmw_dmabuf_pin_in_vram(struct vmw_private *dev_priv,
bool pin, bool interruptible)
{
struct ttm_buffer_object *bo = &buf->base;
struct ttm_bo_global *glob = bo->glob;
struct ttm_placement *overlay_placement = &vmw_vram_placement;
int ret;
@@ -116,14 +115,6 @@ static int vmw_dmabuf_pin_in_vram(struct vmw_private *dev_priv,
if (unlikely(ret != 0))
goto err;
if (buf->gmr_bound) {
vmw_gmr_unbind(dev_priv, buf->gmr_id);
spin_lock(&glob->lru_lock);
ida_remove(&dev_priv->gmr_ida, buf->gmr_id);
spin_unlock(&glob->lru_lock);
buf->gmr_bound = NULL;
}
if (pin)
overlay_placement = &vmw_vram_ne_placement;