aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-06-21 10:28:15 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-07-07 14:54:49 -0400
commit5a712a8727200fc617072bed2ccd8ba8e1b50408 (patch)
tree53d58dfb5e2bcf2b2d1232ecb192f0f8d70851d6 /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
parentdbd5ed60ac856632609491229e6d7ad70115fb09 (diff)
drm/amdgpu: validate VM PTs only on eviction
We don't need to validate them again if the eviction counter didn't changed. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index de171ccf2b9c..cf97a87f76a6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -459,7 +459,7 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,
459 list_splice(&need_pages, &p->validated); 459 list_splice(&need_pages, &p->validated);
460 } 460 }
461 461
462 amdgpu_vm_get_pt_bos(&fpriv->vm, &duplicates); 462 amdgpu_vm_get_pt_bos(p->adev, &fpriv->vm, &duplicates);
463 463
464 p->bytes_moved_threshold = amdgpu_cs_get_threshold_for_moves(p->adev); 464 p->bytes_moved_threshold = amdgpu_cs_get_threshold_for_moves(p->adev);
465 p->bytes_moved = 0; 465 p->bytes_moved = 0;
@@ -472,6 +472,9 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,
472 if (r) 472 if (r)
473 goto error_validate; 473 goto error_validate;
474 474
475 fpriv->vm.last_eviction_counter =
476 atomic64_read(&p->adev->num_evictions);
477
475 if (p->bo_list) { 478 if (p->bo_list) {
476 struct amdgpu_bo *gds = p->bo_list->gds_obj; 479 struct amdgpu_bo *gds = p->bo_list->gds_obj;
477 struct amdgpu_bo *gws = p->bo_list->gws_obj; 480 struct amdgpu_bo *gws = p->bo_list->gws_obj;