summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
diff options
context:
space:
mode:
authorThomas Hellstrom2010-01-13 22:28:41 +0100
committerDave Airlie2010-01-14 03:19:01 +0100
commit476d51dbdbaa2e61fa4899459c658f476eee3fd9 (patch)
tree4917e97ae7d01226296bc665b0f0d91e2f7491c1 /drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
parentdrm/ttm: Add a swap_notify callback. (diff)
downloadkernel-qcow2-linux-476d51dbdbaa2e61fa4899459c658f476eee3fd9.tar.gz
kernel-qcow2-linux-476d51dbdbaa2e61fa4899459c658f476eee3fd9.tar.xz
kernel-qcow2-linux-476d51dbdbaa2e61fa4899459c658f476eee3fd9.zip
drm/vmwgfx: Implement a swap_notify callback.
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>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
index 4be47d84077f..37a81925b158 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
@@ -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.
@@ -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
};