diff options
author | Francisco Jerez <currojerez@riseup.net> | 2010-10-20 17:35:40 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-12-03 00:11:12 -0500 |
commit | 332b242f47786d1a43bd7a19a0513dd5d493db8e (patch) | |
tree | f6681c1513c58db54f71c64184ebc033a14c49fe /drivers/gpu/drm/nouveau/nouveau_bo.c | |
parent | 042206c0cd4924879c4292c5ffa2bf1e8023ae5a (diff) |
drm/nouveau: Implement the pageflip ioctl.
nv0x-nv4x should be mostly fine, nv50 doesn't work yet.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-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 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index c09928322eb9..cdc8f544d47f 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c | |||
@@ -942,6 +942,18 @@ nouveau_ttm_fault_reserve_notify(struct ttm_buffer_object *bo) | |||
942 | return ttm_bo_validate(bo, &nvbo->placement, false, true, false); | 942 | return ttm_bo_validate(bo, &nvbo->placement, false, true, false); |
943 | } | 943 | } |
944 | 944 | ||
945 | void | ||
946 | nouveau_bo_fence(struct nouveau_bo *nvbo, struct nouveau_fence *fence) | ||
947 | { | ||
948 | spin_lock(&nvbo->bo.bdev->fence_lock); | ||
949 | __nouveau_fence_unref(&nvbo->bo.sync_obj); | ||
950 | |||
951 | if (likely(fence)) | ||
952 | nvbo->bo.sync_obj = nouveau_fence_ref(fence); | ||
953 | |||
954 | spin_unlock(&nvbo->bo.bdev->fence_lock); | ||
955 | } | ||
956 | |||
945 | struct ttm_bo_driver nouveau_bo_driver = { | 957 | struct ttm_bo_driver nouveau_bo_driver = { |
946 | .create_ttm_backend_entry = nouveau_bo_create_ttm_backend_entry, | 958 | .create_ttm_backend_entry = nouveau_bo_create_ttm_backend_entry, |
947 | .invalidate_caches = nouveau_bo_invalidate_caches, | 959 | .invalidate_caches = nouveau_bo_invalidate_caches, |