summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_bo.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-23 18:28:03 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-23 18:28:03 -0700
commitee005577aa3b89f5291fe73be2054d375d23f5eb (patch)
tree50fc586c3a3b6bdc73d68d103e2554544060e8bf /drivers/gpu/drm/nouveau/nouveau_bo.c
parent2e9e018ecd836d92cc4735b4d878d8b20c08b070 (diff)
parentd03330383c9255cdb184dd33594e89c3542f191b (diff)
Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (33 commits) drm/radeon/kms: fix typo in radeon_compute_pll_gain drm/radeon/kms: try to detect tv vs monitor for underscan drm/radeon/kms: fix sideport detection on newer rs880 boards drm/radeon: fix passing wrong type to gem object create. drm/radeon/kms: set encoder type to DVI for HDMI on evergreen drm/radeon/kms: add back missing break in info ioctl drm/radeon/kms: don't enable MSIs on AGP boards drm/radeon/kms: fix agp mode setup on cards that use pcie bridges drm: move dereference below check drm: fix end of loop test drm/radeon/kms: rework radeon_dp_detect() logic drm/radeon/kms: add missing asic callback assignment for evergreen drm/radeon/kms/DCE3+: switch pads to ddc mode when going i2c drm/radeon/kms/pm: bail early if nothing's changing drm/radeon/kms/atom: clean up dig atom handling drm/radeon/kms: DCE3/4 transmitter fixes drm/radeon/kms: rework encoder handling drm/radeon/kms: DCE3/4 AdjustPixelPll updates drm/radeon: Fix stack data leak drm/radeon/kms: fix GTT/VRAM overlapping test ...
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bo.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bo.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 84f85183d041..f6f44779d82f 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -36,6 +36,21 @@
#include <linux/log2.h>
#include <linux/slab.h>
+int
+nouveau_bo_sync_gpu(struct nouveau_bo *nvbo, struct nouveau_channel *chan)
+{
+ struct nouveau_fence *prev_fence = nvbo->bo.sync_obj;
+ int ret;
+
+ if (!prev_fence || nouveau_fence_channel(prev_fence) == chan)
+ return 0;
+
+ spin_lock(&nvbo->bo.lock);
+ ret = ttm_bo_wait(&nvbo->bo, false, false, false);
+ spin_unlock(&nvbo->bo.lock);
+ return ret;
+}
+
static void
nouveau_bo_del_ttm(struct ttm_buffer_object *bo)
{