| From a772698fbff7682ecdcfcc183d2d6af8816ed7f2 Mon Sep 17 00:00:00 2001 |
| From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com> |
| Date: Thu, 19 Sep 2019 10:38:57 +0200 |
| Subject: [PATCH] drm/amdgpu: fix potential VM faults |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| commit 3122051edc7c27cc08534be730f4c7c180919b8a upstream. |
| |
| When we allocate new page tables under memory |
| pressure we should not evict old ones. |
| |
| Signed-off-by: Christian Kรถnig <christian.koenig@amd.com> |
| Acked-by: Alex Deucher <alexander.deucher@amd.com> |
| Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c |
| index 93b2c5a48a71..2f0bfd7a5389 100644 |
| --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c |
| +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c |
| @@ -421,7 +421,8 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, |
| .interruptible = (bp->type != ttm_bo_type_kernel), |
| .no_wait_gpu = false, |
| .resv = bp->resv, |
| - .flags = TTM_OPT_FLAG_ALLOW_RES_EVICT |
| + .flags = bp->type != ttm_bo_type_kernel ? |
| + TTM_OPT_FLAG_ALLOW_RES_EVICT : 0 |
| }; |
| struct amdgpu_bo *bo; |
| unsigned long page_align, size = bp->size; |
| -- |
| 2.7.4 |
| |