Skip to content

Commit e862b08

Browse files
ljymonkalexdeucher
authored andcommitted
drm/amdgpu: don't try to reserve training bo for sriov (v2)
1) SRIOV guest KMD doesn't care training buffer 2) if we resered training buffer that will overlap with IP discovery reservation because training buffer is at vram_size - 0x8000 and IP discovery is at ()vram_size - 0x10000 => vram_size -1) v2: squash in warning fix from Nirmoy Signed-off-by: Monk Liu <[email protected]> Reviewed-by: Emily Deng <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent e1188aa commit e862b08

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1840,9 +1840,11 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
18401840
*The reserved vram for memory training must be pinned to the specified
18411841
*place on the VRAM, so reserve it early.
18421842
*/
1843-
r = amdgpu_ttm_training_reserve_vram_init(adev);
1844-
if (r)
1845-
return r;
1843+
if (!amdgpu_sriov_vf(adev)) {
1844+
r = amdgpu_ttm_training_reserve_vram_init(adev);
1845+
if (r)
1846+
return r;
1847+
}
18461848

18471849
/* allocate memory as required for VGA
18481850
* This is used for VGA emulation and pre-OS scanout buffers to

0 commit comments

Comments
 (0)