diff options
author | Christian König <christian.koenig@amd.com> | 2023-01-30 12:06:36 +0000 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2023-02-06 12:10:17 +0100 |
commit | f87c1f0b7b79b7a4f165750d1884da1fd29ae93c (patch) | |
tree | e92d41475e1940331e4c0cba2be1253dd931b88b /drivers/gpu/drm/radeon/radeon_ttm.c | |
parent | c7ea16f6a47f9b6eca4e9cdcab8d1f587ea9e484 (diff) | |
download | lwn-f87c1f0b7b79b7a4f165750d1884da1fd29ae93c.tar.gz lwn-f87c1f0b7b79b7a4f165750d1884da1fd29ae93c.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 <christian.koenig@amd.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230130120636.63765-6-matthew.auld@intel.com
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_ttm.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_ttm.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index 1e8e287e113c..67075c85f847 100644 --- a/drivers/gpu/drm/radeon/radeon_ttm.c +++ b/drivers/gpu/drm/radeon/radeon_ttm.c @@ -211,11 +211,7 @@ static int radeon_bo_move(struct ttm_buffer_object *bo, bool evict, if (r) return r; - /* Can't move a pinned BO */ rbo = container_of(bo, struct radeon_bo, tbo); - if (WARN_ON_ONCE(rbo->tbo.pin_count > 0)) - return -EINVAL; - rdev = radeon_get_rdev(bo->bdev); if (old_mem->mem_type == TTM_PL_SYSTEM && bo->ttm == NULL) { ttm_bo_move_null(bo, new_mem); |