aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-04-06 05:12:02 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-05-04 20:21:15 -0400
commit5ee7b41a8b83e5d73d8b0725561ba43de5cb9443 (patch)
treebb9db3d9a36fe7987152ae2d82bc25ef780d7a88
parenteb4309690061abe21bb37b09692e57ca4fca0968 (diff)
drm/ttm: don't wait for BO on initial allocation
When we use an extern reservation object that otherwise waits for every fence registered with it. Reviewed-by: Sinclair Yeh <syeh@vmware.com> Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 870a87a2224e..c1f22cb3ea43 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -998,13 +998,19 @@ static int ttm_bo_move_buffer(struct ttm_buffer_object *bo,
998 lockdep_assert_held(&bo->resv->lock.base); 998 lockdep_assert_held(&bo->resv->lock.base);
999 999
1000 /* 1000 /*
1001 * FIXME: It's possible to pipeline buffer moves. 1001 * Don't wait for the BO on initial allocation. This is important when
1002 * Have the driver move function wait for idle when necessary, 1002 * the BO has an imported reservation object.
1003 * instead of doing it here.
1004 */ 1003 */
1005 ret = ttm_bo_wait(bo, false, interruptible, no_wait_gpu); 1004 if (bo->mem.mem_type != TTM_PL_SYSTEM || bo->ttm != NULL) {
1006 if (ret) 1005 /*
1007 return ret; 1006 * FIXME: It's possible to pipeline buffer moves.
1007 * Have the driver move function wait for idle when necessary,
1008 * instead of doing it here.
1009 */
1010 ret = ttm_bo_wait(bo, false, interruptible, no_wait_gpu);
1011 if (ret)
1012 return ret;
1013 }
1008 mem.num_pages = bo->num_pages; 1014 mem.num_pages = bo->num_pages;
1009 mem.size = mem.num_pages << PAGE_SHIFT; 1015 mem.size = mem.num_pages << PAGE_SHIFT;
1010 mem.page_alignment = bo->mem.page_alignment; 1016 mem.page_alignment = bo->mem.page_alignment;