diff options
author | Maarten Lankhorst <maarten.lankhorst@canonical.com> | 2014-01-21 07:02:14 -0500 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@canonical.com> | 2014-09-01 04:16:43 -0400 |
commit | bdaf7ddf652ef51fd363b052e320711c06f6f553 (patch) | |
tree | 2c819bda873b7b9271f40c5b09a7a8e1b92c9b75 /drivers/gpu/drm/nouveau/nouveau_bo.c | |
parent | d0b3c3b6c26c6eed1ba3fa37242dfc8942b5e997 (diff) |
drm/nouveau: require reservations for nouveau_fence_sync and nouveau_bo_fence
This will ensure we always hold the required lock when calling those functions.
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 0591ca0734e3..ed966f51e29b 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c | |||
@@ -1463,6 +1463,8 @@ nouveau_bo_fence(struct nouveau_bo *nvbo, struct nouveau_fence *fence) | |||
1463 | struct nouveau_fence *new_fence = nouveau_fence_ref(fence); | 1463 | struct nouveau_fence *new_fence = nouveau_fence_ref(fence); |
1464 | struct nouveau_fence *old_fence = NULL; | 1464 | struct nouveau_fence *old_fence = NULL; |
1465 | 1465 | ||
1466 | lockdep_assert_held(&nvbo->bo.resv->lock.base); | ||
1467 | |||
1466 | spin_lock(&nvbo->bo.bdev->fence_lock); | 1468 | spin_lock(&nvbo->bo.bdev->fence_lock); |
1467 | old_fence = nvbo->bo.sync_obj; | 1469 | old_fence = nvbo->bo.sync_obj; |
1468 | nvbo->bo.sync_obj = new_fence; | 1470 | nvbo->bo.sync_obj = new_fence; |