History

drm/amdkfd: use GTT for VRAM on APUs only if GTT is larger

If the user has configured a large carveout on a small APU, only use GTT for VRAM allocations if GTT is larger than VRAM. v2: fix reversed check (Philip)

Alex Deucher committed 1 year ago

Commit 759e7641 parent 8b0d0681 file · +4 −2Browse files

Unified · Split

drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c+4−2
@@ -1987,8 +1987,10 @@ int amdgpu_ttm_init(struct amdgpu_device *adev) · 1986 unmodified lines
19871987 DRM_INFO("amdgpu: %uM of GTT memory ready.\n",
19881988 (unsigned int)(gtt_size / (1024 * 1024)));
19891989
1990− if (adev->flags & AMD_IS_APU)
1991− adev->apu_prefer_gtt = true;
1990+ if (adev->flags & AMD_IS_APU) {
1991+ if (adev->gmc.real_vram_size < gtt_size)
1992+ adev->apu_prefer_gtt = true;
1993+ }
19921994
19931995 /* Initialize doorbell pool on PCI BAR */
19941996 r = amdgpu_ttm_init_on_chip(adev, AMDGPU_PL_DOORBELL, adev->doorbell.size / PAGE_SIZE);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t