Skip to content

Commit 81d0bcf

Browse files
committed
drm/amdgpu: make display pinning more flexible (v2)
Only apply the static threshold for Stoney and Carrizo. This hardware has certain requirements that don't allow mixing of GTT and VRAM. Newer asics do not have these requirements so we should be able to be more flexible with where buffers end up. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2270 Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2291 Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2255 Acked-by: Luben Tuikov <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent 2165359 commit 81d0bcf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1506,7 +1506,8 @@ u64 amdgpu_bo_gpu_offset_no_check(struct amdgpu_bo *bo)
15061506
uint32_t amdgpu_bo_get_preferred_domain(struct amdgpu_device *adev,
15071507
uint32_t domain)
15081508
{
1509-
if (domain == (AMDGPU_GEM_DOMAIN_VRAM | AMDGPU_GEM_DOMAIN_GTT)) {
1509+
if ((domain == (AMDGPU_GEM_DOMAIN_VRAM | AMDGPU_GEM_DOMAIN_GTT)) &&
1510+
((adev->asic_type == CHIP_CARRIZO) || (adev->asic_type == CHIP_STONEY))) {
15101511
domain = AMDGPU_GEM_DOMAIN_VRAM;
15111512
if (adev->gmc.real_vram_size <= AMDGPU_SG_THRESHOLD)
15121513
domain = AMDGPU_GEM_DOMAIN_GTT;

0 commit comments

Comments
 (0)