aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2010-01-13 16:28:39 -0500
committerDave Airlie <airlied@redhat.com>2010-01-13 21:18:43 -0500
commiteffe1105bef07f42366c20eac41b80ff9fcf675e (patch)
treed4341a955614b8be1732f4ffc37f39016dffa61d /drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
parent7704befbd599e9c9524f640e14658ca8ed9d8717 (diff)
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>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
index d6f2d2b882e9..4be47d84077f 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
@@ -172,6 +172,13 @@ static int vmw_verify_access(struct ttm_buffer_object *bo, struct file *filp)
172 return 0; 172 return 0;
173} 173}
174 174
175static void vmw_move_notify(struct ttm_buffer_object *bo,
176 struct ttm_mem_reg *new_mem)
177{
178 if (new_mem->mem_type != TTM_PL_SYSTEM)
179 vmw_dmabuf_gmr_unbind(bo);
180}
181
175/** 182/**
176 * FIXME: We're using the old vmware polling method to sync. 183 * FIXME: We're using the old vmware polling method to sync.
177 * Do this with fences instead. 184 * Do this with fences instead.
@@ -225,5 +232,6 @@ struct ttm_bo_driver vmw_bo_driver = {
225 .sync_obj_wait = vmw_sync_obj_wait, 232 .sync_obj_wait = vmw_sync_obj_wait,
226 .sync_obj_flush = vmw_sync_obj_flush, 233 .sync_obj_flush = vmw_sync_obj_flush,
227 .sync_obj_unref = vmw_sync_obj_unref, 234 .sync_obj_unref = vmw_sync_obj_unref,
228 .sync_obj_ref = vmw_sync_obj_ref 235 .sync_obj_ref = vmw_sync_obj_ref,
236 .move_notify = vmw_move_notify
229}; 237};