diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 1985c08413c6..e62153a86001 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |||
@@ -701,6 +701,15 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain, | |||
701 | return -EINVAL; | 701 | return -EINVAL; |
702 | } | 702 | } |
703 | 703 | ||
704 | /* This assumes only APU display buffers are pinned with (VRAM|GTT). | ||
705 | * See function amdgpu_display_supported_domains() | ||
706 | */ | ||
707 | if (domain == (AMDGPU_GEM_DOMAIN_VRAM | AMDGPU_GEM_DOMAIN_GTT)) { | ||
708 | domain = AMDGPU_GEM_DOMAIN_VRAM; | ||
709 | if (adev->gmc.real_vram_size <= AMDGPU_SG_THRESHOLD) | ||
710 | domain = AMDGPU_GEM_DOMAIN_GTT; | ||
711 | } | ||
712 | |||
704 | if (bo->pin_count) { | 713 | if (bo->pin_count) { |
705 | uint32_t mem_type = bo->tbo.mem.mem_type; | 714 | uint32_t mem_type = bo->tbo.mem.mem_type; |
706 | 715 | ||