diff options
author | Christian König <christian.koenig@amd.com> | 2023-01-25 17:14:37 +0100 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2023-01-25 17:27:51 +0100 |
commit | 2847a67d3aa518a29e8a8db01bbec630d3bd5011 (patch) | |
tree | e1c86de6ccd2059700240dc1443d0e3fce3d20dc /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |
parent | fc64adc56b8302ed21189607dd4b4f4719f2c78f (diff) |
drm/ttm: revert "prevent moving of pinned BOs"
This reverts commit b49323aa35d502b0d9a7950327f30a1a52eae534.
This still seems to break i915.
Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Matthew Auld <matthew.william.auld@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230125155023.105584-1-christian.koenig@amd.com
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 2cd081cbf706..c5ef7f7bdc15 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -466,7 +466,11 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict, return r; } + /* Can't move a pinned BO */ abo = ttm_to_amdgpu_bo(bo); + if (WARN_ON_ONCE(abo->tbo.pin_count > 0)) + return -EINVAL; + adev = amdgpu_ttm_adev(bo->bdev); if (!old_mem || (old_mem->mem_type == TTM_PL_SYSTEM && |