Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ee7b41a authored by Christian König's avatar Christian König Committed by Alex Deucher
Browse files

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: default avatarSinclair Yeh <syeh@vmware.com>
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent eb430969
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -997,6 +997,11 @@ static int ttm_bo_move_buffer(struct ttm_buffer_object *bo,

	lockdep_assert_held(&bo->resv->lock.base);

	/*
	 * Don't wait for the BO on initial allocation. This is important when
	 * the BO has an imported reservation object.
	 */
	if (bo->mem.mem_type != TTM_PL_SYSTEM || bo->ttm != NULL) {
		/*
		 * FIXME: It's possible to pipeline buffer moves.
		 * Have the driver move function wait for idle when necessary,
@@ -1005,6 +1010,7 @@ static int ttm_bo_move_buffer(struct ttm_buffer_object *bo,
		ret = ttm_bo_wait(bo, false, interruptible, no_wait_gpu);
		if (ret)
			return ret;
	}
	mem.num_pages = bo->num_pages;
	mem.size = mem.num_pages << PAGE_SHIFT;
	mem.page_alignment = bo->mem.page_alignment;