diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2013-11-13 10:23:46 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2013-11-14 14:55:06 +1000 |
commit | 5d216f6013d54a6085d5e499407aec6d67e79990 (patch) | |
tree | 472870c1928b1533644b8b3e44e5517d0bdc44fa /drivers/gpu/drm/nouveau/nouveau_gem.c | |
parent | 0bae1d61c7512580f1622a880d82164c9534fce3 (diff) | |
download | linux-5d216f6013d54a6085d5e499407aec6d67e79990.tar.gz linux-5d216f6013d54a6085d5e499407aec6d67e79990.tar.bz2 linux-5d216f6013d54a6085d5e499407aec6d67e79990.zip |
drm/nouveau: allow nouveau_fence_ref() to be a noop
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_gem.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_gem.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index 418a6177a653..c60f65a815d3 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gem.c +++ b/drivers/gpu/drm/nouveau/nouveau_gem.c @@ -106,8 +106,7 @@ nouveau_gem_object_unmap(struct nouveau_bo *nvbo, struct nouveau_vma *vma) if (mapped) { spin_lock(&nvbo->bo.bdev->fence_lock); - if (nvbo->bo.sync_obj) - fence = nouveau_fence_ref(nvbo->bo.sync_obj); + fence = nouveau_fence_ref(nvbo->bo.sync_obj); spin_unlock(&nvbo->bo.bdev->fence_lock); } @@ -438,8 +437,7 @@ validate_sync(struct nouveau_channel *chan, struct nouveau_bo *nvbo) int ret = 0; spin_lock(&nvbo->bo.bdev->fence_lock); - if (nvbo->bo.sync_obj) - fence = nouveau_fence_ref(nvbo->bo.sync_obj); + fence = nouveau_fence_ref(nvbo->bo.sync_obj); spin_unlock(&nvbo->bo.bdev->fence_lock); if (fence) { |