From: Thomas Hellstrom Subject: [PATCH 06/10] vmwgfx: Implement a swap_notify callback. Date: Wed, 13 Jan 2010 22:28:41 +0100 Message-ID: <1263418125-7373-7-git-send-email-thellstrom@vmware.com> References: <1263418125-7373-1-git-send-email-thellstrom@vmware.com> <1263418125-7373-2-git-send-email-thellstrom@vmware.com> <1263418125-7373-3-git-send-email-thellstrom@vmware.com> <1263418125-7373-4-git-send-email-thellstrom@vmware.com> <1263418125-7373-5-git-send-email-thellstrom@vmware.com> <1263418125-7373-6-git-send-email-thellstrom@vmware.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1263418125-7373-6-git-send-email-thellstrom@vmware.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.sourceforge.net To: dri-devel@lists.sourceforge.net, airlied@redhat.com Cc: Thomas Hellstrom List-Id: dri-devel@lists.freedesktop.org Unbind GMR bindings on the buffer about to be swapped out. Signed-off-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c | 8 +++++++- 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 4be47d8..37a8192 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 }; -- 1.6.2.5 ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev --