From 7cce9584310cbf82f64e1e397b28610a17f0de37 Mon Sep 17 00:00:00 2001 From: Andrey Grodzovsky Date: Tue, 16 Jan 2018 10:06:36 -0500 Subject: [PATCH] drm/amdgpu: Use new TTM flag to avoid OOM triggering. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoid OOM on syatem pages allocations. v2: Remove modeprobe parameter, make this behaviour the only option. v3: Move setting no_retry flag into amdgpu_ttm_init. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 828d13990354..c7b1f91a8ce7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -1387,6 +1387,10 @@ int amdgpu_ttm_init(struct amdgpu_device *adev) return r; } adev->mman.initialized = true; + + /* We opt to avoid OOM on system pages allocations */ + adev->mman.bdev.no_retry = true; + r = ttm_bo_init_mm(&adev->mman.bdev, TTM_PL_VRAM, adev->gmc.real_vram_size >> PAGE_SHIFT); if (r) { -- GitLab