summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_bo.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@ubuntu.com>2014-01-09 11:03:11 +0100
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>2014-09-02 16:41:50 +0200
commit29ba89b2371d466ca68973525816cf10debc2655 (patch)
tree0433045bea840aed27057bedf422c02018b66d4e /drivers/gpu/drm/nouveau/nouveau_bo.c
parent2298e804e96eb3635c39519c8287befd92460303 (diff)
downloadblackbird-obmc-linux-29ba89b2371d466ca68973525816cf10debc2655.tar.gz
blackbird-obmc-linux-29ba89b2371d466ca68973525816cf10debc2655.zip
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,
}
mutex_lock_nested(&cli->mutex, SINGLE_DEPTH_NESTING);
- ret = nouveau_fence_sync(bo->sync_obj, chan);
+ ret = nouveau_fence_sync(nouveau_bo(bo), chan);
if (ret == 0) {
ret = drm->ttm.move(chan, bo, &bo->mem, new_mem);
if (ret == 0) {
@@ -1464,10 +1464,12 @@ nouveau_bo_fence_unref(void **sync_obj)
void
nouveau_bo_fence(struct nouveau_bo *nvbo, struct nouveau_fence *fence)
{
- lockdep_assert_held(&nvbo->bo.resv->lock.base);
+ struct reservation_object *resv = nvbo->bo.resv;
nouveau_bo_fence_unref(&nvbo->bo.sync_obj);
nvbo->bo.sync_obj = nouveau_fence_ref(fence);
+
+ reservation_object_add_excl_fence(resv, &fence->base);
}
static void *
OpenPOWER on IntegriCloud