summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2019-09-19 10:38:57 +0200
committerAlex Deucher <alexander.deucher@amd.com>2019-10-17 17:12:34 -0400
commit3122051edc7c27cc08534be730f4c7c180919b8a (patch)
tree59e6d8762bcadfebaa474bc1f7fbb0f81d4c13e3 /drivers/gpu/drm
parent209620b422945ee03cebb03f726e706d537b692d (diff)
downloadlinux-riscv-3122051edc7c27cc08534be730f4c7c180919b8a.tar.gz
linux-riscv-3122051edc7c27cc08534be730f4c7c180919b8a.tar.bz2
linux-riscv-3122051edc7c27cc08534be730f4c7c180919b8a.zip
drm/amdgpu: fix potential VM faults
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>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_object.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 1fead0e8b890..7289e1b4fb60 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -453,7 +453,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;