diff options
| author | Christian König <[email protected]> | 2022-12-13 09:07:36 +0000 |
|---|---|---|
| committer | Christian König <[email protected]> | 2023-01-25 09:03:36 +0000 |
| commit | b49323aa35d502b0d9a7950327f30a1a52eae534 (patch) | |
| tree | 7441953fea6e7ba55d6fe287089fbb8bd87527b3 /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |
| parent | drm/ttm: stop allocating a dummy resource for pipelined gutting (diff) | |
| download | kernel-b49323aa35d502b0d9a7950327f30a1a52eae534.tar.gz kernel-b49323aa35d502b0d9a7950327f30a1a52eae534.zip | |
drm/ttm: prevent moving of pinned BOs
We have checks for this in the individual drivers move callback, but
it's probably better to generally forbid that on a higher level.
Also stops exporting ttm_resource_compat() since that's not necessary
any more after removing the extra checks in vmwgfx.
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
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, 0 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index c5ef7f7bdc15..2cd081cbf706 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -466,11 +466,7 @@ 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 && |
