aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_bo.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@ubuntu.com>2014-01-09 05:03:11 -0500
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>2014-09-02 10:41:50 -0400
commit29ba89b2371d466ca68973525816cf10debc2655 (patch)
tree0433045bea840aed27057bedf422c02018b66d4e /drivers/gpu/drm/nouveau/nouveau_bo.c
parent2298e804e96eb3635c39519c8287befd92460303 (diff)
drm/nouveau: rework to new fence interface
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Acked-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bo.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bo.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 8d8e5f6340d0..2d026c81ca1b 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -970,7 +970,7 @@ nouveau_bo_move_m2mf(struct ttm_buffer_object *bo, int evict, bool intr,
970 } 970 }
971 971
972 mutex_lock_nested(&cli->mutex, SINGLE_DEPTH_NESTING); 972 mutex_lock_nested(&cli->mutex, SINGLE_DEPTH_NESTING);
973 ret = nouveau_fence_sync(bo->sync_obj, chan); 973 ret = nouveau_fence_sync(nouveau_bo(bo), chan);
974 if (ret == 0) { 974 if (ret == 0) {
975 ret = drm->ttm.move(chan, bo, &bo->mem, new_mem); 975 ret = drm->ttm.move(chan, bo, &bo->mem, new_mem);
976 if (ret == 0) { 976 if (ret == 0) {
@@ -1464,10 +1464,12 @@ nouveau_bo_fence_unref(void **sync_obj)
1464void 1464void
1465nouveau_bo_fence(struct nouveau_bo *nvbo, struct nouveau_fence *fence) 1465nouveau_bo_fence(struct nouveau_bo *nvbo, struct nouveau_fence *fence)
1466{ 1466{
1467 lockdep_assert_held(&nvbo->bo.resv->lock.base); 1467 struct reservation_object *resv = nvbo->bo.resv;
1468 1468
1469 nouveau_bo_fence_unref(&nvbo->bo.sync_obj); 1469 nouveau_bo_fence_unref(&nvbo->bo.sync_obj);
1470 nvbo->bo.sync_obj = nouveau_fence_ref(fence); 1470 nvbo->bo.sync_obj = nouveau_fence_ref(fence);
1471
1472 reservation_object_add_excl_fence(resv, &fence->base);
1471} 1473}
1472 1474
1473static void * 1475static void *