Skip to content

Commit

Permalink
drm/vmwgfx: Implement a swap_notify callback.
Browse files Browse the repository at this point in the history
Unbind GMR bindings on the buffer about to be swapped out.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Thomas Hellstrom authored and Dave Airlie committed Jan 14, 2010
1 parent 3f09ea4 commit 476d51d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ static void vmw_move_notify(struct ttm_buffer_object *bo,
vmw_dmabuf_gmr_unbind(bo);
}

static void vmw_swap_notify(struct ttm_buffer_object *bo)
{
vmw_dmabuf_gmr_unbind(bo);
}

/**
* FIXME: We're using the old vmware polling method to sync.
* Do this with fences instead.
Expand Down Expand Up @@ -233,5 +238,6 @@ struct ttm_bo_driver vmw_bo_driver = {
.sync_obj_flush = vmw_sync_obj_flush,
.sync_obj_unref = vmw_sync_obj_unref,
.sync_obj_ref = vmw_sync_obj_ref,
.move_notify = vmw_move_notify
.move_notify = vmw_move_notify,
.swap_notify = vmw_swap_notify
};

0 comments on commit 476d51d

Please sign in to comment.