diff options
author | Christian König <christian.koenig@amd.com> | 2019-09-19 10:38:57 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-10-15 15:50:18 -0400 |
commit | b2c18f0a9c8bd0fa5c1239830b787d5f8288f7b5 (patch) | |
tree | 68f13c322efe53bddf1ad6387e0e0dbc0c83cfb6 /drivers/gpu/drm/amd | |
parent | b14657001046d79439bd75f320a486d64c2f4845 (diff) | |
download | linux-stable-b2c18f0a9c8bd0fa5c1239830b787d5f8288f7b5.tar.gz linux-stable-b2c18f0a9c8bd0fa5c1239830b787d5f8288f7b5.tar.bz2 linux-stable-b2c18f0a9c8bd0fa5c1239830b787d5f8288f7b5.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/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 |
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 f10b6175e20c..b8e5076e5e30 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -517,7 +517,8 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, .interruptible = (bp->type != ttm_bo_type_kernel), .no_wait_gpu = bp->no_wait_gpu, .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; |