diff options
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_fence.c | 21 |
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) | |||
330 | int ret; | 330 | int ret; |
331 | 331 | ||
332 | if (dev_priv->chipset < 0x84) { | 332 | if (dev_priv->chipset < 0x84) { |
333 | ret = RING_SPACE(chan, 3); | 333 | if (dev_priv->chipset < 0x50) { |
334 | if (ret) | 334 | ret = RING_SPACE(chan, 3); |
335 | return ret; | 335 | if (ret) |
336 | return ret; | ||
337 | } else { | ||
338 | ret = RING_SPACE(chan, 5); | ||
339 | if (ret) | ||
340 | return ret; | ||
341 | |||
342 | BEGIN_RING(chan, NvSubSw, NV_SW_YIELD, 1); | ||
343 | OUT_RING (chan, 0); | ||
344 | } | ||
336 | 345 | ||
337 | BEGIN_RING(chan, NvSubSw, NV_SW_SEMAPHORE_OFFSET, 2); | 346 | BEGIN_RING(chan, NvSubSw, NV_SW_SEMAPHORE_OFFSET, 2); |
338 | OUT_RING (chan, sema->mem->start); | 347 | OUT_RING (chan, sema->mem->start); |
@@ -401,7 +410,7 @@ semaphore_release(struct nouveau_channel *chan, struct nouveau_semaphore *sema) | |||
401 | int ret; | 410 | int ret; |
402 | 411 | ||
403 | if (dev_priv->chipset < 0x84) { | 412 | if (dev_priv->chipset < 0x84) { |
404 | ret = RING_SPACE(chan, 4); | 413 | ret = RING_SPACE(chan, (dev_priv->chipset != 0x50) ? 4 : 6); |
405 | if (ret) | 414 | if (ret) |
406 | return ret; | 415 | return ret; |
407 | 416 | ||
@@ -409,6 +418,10 @@ semaphore_release(struct nouveau_channel *chan, struct nouveau_semaphore *sema) | |||
409 | OUT_RING (chan, sema->mem->start); | 418 | OUT_RING (chan, sema->mem->start); |
410 | BEGIN_RING(chan, NvSubSw, NV_SW_SEMAPHORE_RELEASE, 1); | 419 | BEGIN_RING(chan, NvSubSw, NV_SW_SEMAPHORE_RELEASE, 1); |
411 | OUT_RING (chan, 1); | 420 | OUT_RING (chan, 1); |
421 | if (dev_priv->chipset == 0x50) { | ||
422 | BEGIN_RING(chan, NvSubSw, NV_SW_YIELD, 1); | ||
423 | OUT_RING (chan, 0); | ||
424 | } | ||
412 | } else | 425 | } else |
413 | if (dev_priv->chipset < 0xc0) { | 426 | if (dev_priv->chipset < 0xc0) { |
414 | /* | 427 | /* |