diff options
author | Francisco Jerez <currojerez@riseup.net> | 2010-09-21 13:02:01 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-10-04 19:59:22 -0400 |
commit | 647988175234a733cc0d4cf968949344803a77a7 (patch) | |
tree | cc314c83dda0b6b7664d9703fa4c9391f0c50db6 /drivers/gpu/drm/nouveau | |
parent | 0c6c1c2fb8b0fd4340f78db20ee7f35d2a810907 (diff) |
drm/nouveau: Synchronize buffer object moves in hardware.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 03d842a06b0..4e813638bdb 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c | |||
@@ -454,10 +454,15 @@ nouveau_bo_move_accel_cleanup(struct nouveau_channel *chan, | |||
454 | if (ret) | 454 | if (ret) |
455 | return ret; | 455 | return ret; |
456 | 456 | ||
457 | ret = ttm_bo_move_accel_cleanup(&nvbo->bo, fence, NULL, | 457 | if (nvbo->channel) { |
458 | evict || (nvbo->channel && | 458 | ret = nouveau_fence_sync(fence, nvbo->channel); |
459 | nvbo->channel != chan), | 459 | if (ret) |
460 | goto out; | ||
461 | } | ||
462 | |||
463 | ret = ttm_bo_move_accel_cleanup(&nvbo->bo, fence, NULL, evict, | ||
460 | no_wait_reserve, no_wait_gpu, new_mem); | 464 | no_wait_reserve, no_wait_gpu, new_mem); |
465 | out: | ||
461 | nouveau_fence_unref((void *)&fence); | 466 | nouveau_fence_unref((void *)&fence); |
462 | return ret; | 467 | return ret; |
463 | } | 468 | } |