summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-01-31 16:42:28 +1000
committerBen Skeggs <bskeggs@redhat.com>2011-02-25 06:44:25 +1000
commitfc772ec48d7d57ef5fb3fe171eae467d3d440bc4 (patch)
treed81644baa72a0e087ff57e661525d6de59ac9370 /drivers/gpu/drm
parentea5f2786a0942832f32deb7c507531b766028356 (diff)
downloadblackbird-op-linux-fc772ec48d7d57ef5fb3fe171eae467d3d440bc4.tar.gz
blackbird-op-linux-fc772ec48d7d57ef5fb3fe171eae467d3d440bc4.zip
drm/nv50: 0x50 needs semaphore yields too
Evil, evil chipset. Worst of both worlds. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_fence.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c
index 1334868a3eeb..d820ad29dfe1 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fence.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fence.c
@@ -330,9 +330,18 @@ semaphore_acquire(struct nouveau_channel *chan, struct nouveau_semaphore *sema)
int ret;
if (dev_priv->chipset < 0x84) {
- ret = RING_SPACE(chan, 3);
- if (ret)
- return ret;
+ if (dev_priv->chipset < 0x50) {
+ ret = RING_SPACE(chan, 3);
+ if (ret)
+ return ret;
+ } else {
+ ret = RING_SPACE(chan, 5);
+ if (ret)
+ return ret;
+
+ BEGIN_RING(chan, NvSubSw, NV_SW_YIELD, 1);
+ OUT_RING (chan, 0);
+ }
BEGIN_RING(chan, NvSubSw, NV_SW_SEMAPHORE_OFFSET, 2);
OUT_RING (chan, sema->mem->start);
@@ -401,7 +410,7 @@ semaphore_release(struct nouveau_channel *chan, struct nouveau_semaphore *sema)
int ret;
if (dev_priv->chipset < 0x84) {
- ret = RING_SPACE(chan, 4);
+ ret = RING_SPACE(chan, (dev_priv->chipset != 0x50) ? 4 : 6);
if (ret)
return ret;
@@ -409,6 +418,10 @@ semaphore_release(struct nouveau_channel *chan, struct nouveau_semaphore *sema)
OUT_RING (chan, sema->mem->start);
BEGIN_RING(chan, NvSubSw, NV_SW_SEMAPHORE_RELEASE, 1);
OUT_RING (chan, 1);
+ if (dev_priv->chipset == 0x50) {
+ BEGIN_RING(chan, NvSubSw, NV_SW_YIELD, 1);
+ OUT_RING (chan, 0);
+ }
} else
if (dev_priv->chipset < 0xc0) {
/*
OpenPOWER on IntegriCloud