diff options
author | Christian König <christian.koenig@amd.com> | 2015-09-10 08:00:35 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-10-14 16:16:40 -0400 |
commit | b495bd3a54e732e846bfde49ba2ea93b62b1de91 (patch) | |
tree | dcab014ba5bacdadd0dac230fd00b68274466a56 /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |
parent | d9c13156a628cc9f8f062f2c10e2bff55b92aaab (diff) |
drm/amdgpu: add option to clear VM page tables after every submit
This makes it much easier to find when userspace misses to send some buffers.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-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.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 29fc45ce64dd..25012c790f8f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |||
@@ -567,9 +567,24 @@ static int amdgpu_bo_vm_update_pte(struct amdgpu_cs_parser *p, | |||
567 | if (r) | 567 | if (r) |
568 | return r; | 568 | return r; |
569 | } | 569 | } |
570 | |||
571 | } | ||
572 | |||
573 | r = amdgpu_vm_clear_invalids(adev, vm, &p->ibs[0].sync); | ||
574 | |||
575 | if (amdgpu_vm_debug && p->bo_list) { | ||
576 | /* Invalidate all BOs to test for userspace bugs */ | ||
577 | for (i = 0; i < p->bo_list->num_entries; i++) { | ||
578 | /* ignore duplicates */ | ||
579 | bo = p->bo_list->array[i].robj; | ||
580 | if (!bo) | ||
581 | continue; | ||
582 | |||
583 | amdgpu_vm_bo_invalidate(adev, bo); | ||
584 | } | ||
570 | } | 585 | } |
571 | 586 | ||
572 | return amdgpu_vm_clear_invalids(adev, vm, &p->ibs[0].sync); | 587 | return r; |
573 | } | 588 | } |
574 | 589 | ||
575 | static int amdgpu_cs_ib_vm_chunk(struct amdgpu_device *adev, | 590 | static int amdgpu_cs_ib_vm_chunk(struct amdgpu_device *adev, |