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

Commit 993baf15 authored by Roger He's avatar Roger He Committed by Alex Deucher
Browse files

drm/ttm: use an operation ctx for ttm_tt_bind



forward the operation context to ttm_tt_bind as well,
and the ultimate goal is swapout enablement for reserved BOs.

v2: use common term rather than amd specific

Reviewed-by: default avatarThomas Hellström <thellstrom@vmware.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarChuming Zhou <david1.zhou@amd.com>
Signed-off-by: default avatarRoger He <Hongbo.He@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d0cef9fa
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -497,7 +497,7 @@ static int amdgpu_move_vram_ram(struct ttm_buffer_object *bo, bool evict,
		goto out_cleanup;
		goto out_cleanup;
	}
	}


	r = ttm_tt_bind(bo->ttm, &tmp_mem);
	r = ttm_tt_bind(bo->ttm, &tmp_mem, ctx);
	if (unlikely(r)) {
	if (unlikely(r)) {
		goto out_cleanup;
		goto out_cleanup;
	}
	}
+1 −1
Original line number Original line Diff line number Diff line
@@ -1218,7 +1218,7 @@ nouveau_bo_move_flipd(struct ttm_buffer_object *bo, bool evict, bool intr,
	if (ret)
	if (ret)
		return ret;
		return ret;


	ret = ttm_tt_bind(bo->ttm, &tmp_reg);
	ret = ttm_tt_bind(bo->ttm, &tmp_reg, &ctx);
	if (ret)
	if (ret)
		goto out;
		goto out;


+1 −1
Original line number Original line Diff line number Diff line
@@ -339,7 +339,7 @@ static int radeon_move_vram_ram(struct ttm_buffer_object *bo,
		goto out_cleanup;
		goto out_cleanup;
	}
	}


	r = ttm_tt_bind(bo->ttm, &tmp_mem);
	r = ttm_tt_bind(bo->ttm, &tmp_mem, &ctx);
	if (unlikely(r)) {
	if (unlikely(r)) {
		goto out_cleanup;
		goto out_cleanup;
	}
	}
+1 −1
Original line number Original line Diff line number Diff line
@@ -300,7 +300,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
			goto out_err;
			goto out_err;


		if (mem->mem_type != TTM_PL_SYSTEM) {
		if (mem->mem_type != TTM_PL_SYSTEM) {
			ret = ttm_tt_bind(bo->ttm, mem);
			ret = ttm_tt_bind(bo->ttm, mem, ctx);
			if (ret)
			if (ret)
				goto out_err;
				goto out_err;
		}
		}
+1 −1
Original line number Original line Diff line number Diff line
@@ -73,7 +73,7 @@ int ttm_bo_move_ttm(struct ttm_buffer_object *bo,
		return ret;
		return ret;


	if (new_mem->mem_type != TTM_PL_SYSTEM) {
	if (new_mem->mem_type != TTM_PL_SYSTEM) {
		ret = ttm_tt_bind(ttm, new_mem);
		ret = ttm_tt_bind(ttm, new_mem, ctx);
		if (unlikely(ret != 0))
		if (unlikely(ret != 0))
			return ret;
			return ret;
	}
	}
Loading