drm/amdgpu: pipeline evictions as well
authorChristian König <christian.koenig@amd.com>
Wed, 15 Jun 2016 11:44:05 +0000 (13:44 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 7 Jul 2016 18:54:42 +0000 (14:54 -0400)
This boosts Xonotic from 38fps to 47fps when artificially limiting VRAM to
256MB for testing. It should improve all CPU bound rendering situations
where we have a lot of swapping to/from VRAM.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

index b2b9df6..f85527f 100644 (file)
@@ -286,8 +286,10 @@ static int amdgpu_move_blit(struct ttm_buffer_object *bo,
        r = amdgpu_copy_buffer(ring, old_start, new_start,
                               new_mem->num_pages * PAGE_SIZE, /* bytes */
                               bo->resv, &fence);
-       /* FIXME: handle copy error */
-       r = ttm_bo_move_accel_cleanup(bo, fence, evict, new_mem);
+       if (r)
+               return r;
+
+       r = ttm_bo_pipeline_move(bo, fence, evict, new_mem);
        fence_put(fence);
        return r;
 }