summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
diff options
context:
space:
mode:
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>2018-01-16 10:06:36 -0500
committerAlex Deucher <alexander.deucher@amd.com>2018-02-19 14:18:12 -0500
commit7cce9584310cbf82f64e1e397b28610a17f0de37 (patch)
tree9241463e98cc9f537905a30adcca6eb9a3b9c007 /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
parent250b422833321d1d5a6e68ae8699c4e34563de0e (diff)
downloadop-kernel-dev-7cce9584310cbf82f64e1e397b28610a17f0de37.zip
op-kernel-dev-7cce9584310cbf82f64e1e397b28610a17f0de37.tar.gz
drm/amdgpu: Use new TTM flag to avoid OOM triggering.
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 <andrey.grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 828d139..c7b1f91 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) {
OpenPOWER on IntegriCloud