diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 758d8cf8fd17..cb89fff863c0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |||
@@ -650,6 +650,10 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain, | |||
650 | if (WARN_ON_ONCE(min_offset > max_offset)) | 650 | if (WARN_ON_ONCE(min_offset > max_offset)) |
651 | return -EINVAL; | 651 | return -EINVAL; |
652 | 652 | ||
653 | /* A shared bo cannot be migrated to VRAM */ | ||
654 | if (bo->prime_shared_count && (domain == AMDGPU_GEM_DOMAIN_VRAM)) | ||
655 | return -EINVAL; | ||
656 | |||
653 | if (bo->pin_count) { | 657 | if (bo->pin_count) { |
654 | uint32_t mem_type = bo->tbo.mem.mem_type; | 658 | uint32_t mem_type = bo->tbo.mem.mem_type; |
655 | 659 | ||