summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>2014-03-26 14:07:44 +0100
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>2014-09-02 16:41:50 +0200
commit2298e804e96eb3635c39519c8287befd92460303 (patch)
treefbc0194d93fd0e832e331fab0dfe12af66dfd271 /drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
parentc060a4e135fdd8a35276f2e318f1e9b3bc2450a9 (diff)
drm/vmwgfx: rework to new fence interface, v2
Use the new fence interface on vmwgfx too. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> --- Changes since v1: Fix a sleeping function called from invalid context in enable_signaling.
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_resource.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_resource.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
index 23169362bca8..67aebdb13b8c 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
@@ -1420,21 +1420,20 @@ void vmw_fence_single_bo(struct ttm_buffer_object *bo,
struct vmw_fence_obj *fence)
{
struct ttm_bo_device *bdev = bo->bdev;
- struct ttm_bo_driver *driver = bdev->driver;
struct vmw_fence_obj *old_fence_obj;
struct vmw_private *dev_priv =
container_of(bdev, struct vmw_private, bdev);
- if (fence == NULL)
+ if (fence == NULL) {
vmw_execbuf_fence_commands(NULL, dev_priv, &fence, NULL);
- else
- driver->sync_obj_ref(fence);
+ } else
+ vmw_fence_obj_reference(fence);
+ reservation_object_add_excl_fence(bo->resv, &fence->base);
old_fence_obj = bo->sync_obj;
bo->sync_obj = fence;
-
if (old_fence_obj)
vmw_fence_obj_unreference(&old_fence_obj);
}