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

Commit 77dfc28b authored by Christian König's avatar Christian König Committed by Alex Deucher
Browse files

drm/ttm: wait for BO idle in ttm_bo_move_memcpy



When we want to pipeline accelerated moves we need to wait in the fallback path.

Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 88932a7b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -433,7 +433,8 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo,

	if (r) {
memcpy:
		r = ttm_bo_move_memcpy(bo, evict, no_wait_gpu, new_mem);
		r = ttm_bo_move_memcpy(bo, evict, interruptible,
				       no_wait_gpu, new_mem);
		if (r) {
			return r;
		}
+1 −1
Original line number Diff line number Diff line
@@ -1328,7 +1328,7 @@ nouveau_bo_move(struct ttm_buffer_object *bo, bool evict, bool intr,
	/* Fallback to software copy. */
	ret = ttm_bo_wait(bo, intr, no_wait_gpu);
	if (ret == 0)
		ret = ttm_bo_move_memcpy(bo, evict, no_wait_gpu, new_mem);
		ret = ttm_bo_move_memcpy(bo, evict, intr, no_wait_gpu, new_mem);

out:
	if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA) {
+2 −1
Original line number Diff line number Diff line
@@ -361,7 +361,8 @@ static int qxl_bo_move(struct ttm_buffer_object *bo,
		qxl_move_null(bo, new_mem);
		return 0;
	}
	return ttm_bo_move_memcpy(bo, evict, no_wait_gpu, new_mem);
	return ttm_bo_move_memcpy(bo, evict, interruptible,
				  no_wait_gpu, new_mem);
}

static void qxl_bo_move_notify(struct ttm_buffer_object *bo,
+2 −1
Original line number Diff line number Diff line
@@ -445,7 +445,8 @@ static int radeon_bo_move(struct ttm_buffer_object *bo,

	if (r) {
memcpy:
		r = ttm_bo_move_memcpy(bo, evict, no_wait_gpu, new_mem);
		r = ttm_bo_move_memcpy(bo, evict, interruptible,
				       no_wait_gpu, new_mem);
		if (r) {
			return r;
		}
+2 −1
Original line number Diff line number Diff line
@@ -359,7 +359,8 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
		ret = bdev->driver->move(bo, evict, interruptible,
					 no_wait_gpu, mem);
	else
		ret = ttm_bo_move_memcpy(bo, evict, no_wait_gpu, mem);
		ret = ttm_bo_move_memcpy(bo, evict, interruptible,
					 no_wait_gpu, mem);

	if (ret) {
		if (bdev->driver->move_notify) {
Loading