diff options
| author | Christian König <christian.koenig@amd.com> | 2016-01-05 10:03:39 -0500 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2016-02-10 14:16:49 -0500 |
| commit | a8480309df2aa8b39e8f67b5202db8cebaff4b72 (patch) | |
| tree | 66b64d65786b268ec22caecbdc330a86d7ac0bb2 /drivers/gpu/drm | |
| parent | 15486fd20cbe45cf56805ee5a67f7b25642efa9d (diff) | |
drm/amdgpu: try to find BO VAs only for the BOs in the list
The other ones don't have any VAs assigned anyway or are uninteresting to us.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-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_cs.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index ac26e52d5923..0479ad5a66ed 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |||
| @@ -290,8 +290,6 @@ static u64 amdgpu_cs_get_threshold_for_moves(struct amdgpu_device *adev) | |||
| 290 | int amdgpu_cs_list_validate(struct amdgpu_cs_parser *p, | 290 | int amdgpu_cs_list_validate(struct amdgpu_cs_parser *p, |
| 291 | struct list_head *validated) | 291 | struct list_head *validated) |
| 292 | { | 292 | { |
| 293 | struct amdgpu_fpriv *fpriv = p->filp->driver_priv; | ||
| 294 | struct amdgpu_vm *vm = &fpriv->vm; | ||
| 295 | struct amdgpu_bo_list_entry *lobj; | 293 | struct amdgpu_bo_list_entry *lobj; |
| 296 | u64 initial_bytes_moved; | 294 | u64 initial_bytes_moved; |
| 297 | int r; | 295 | int r; |
| @@ -300,7 +298,6 @@ int amdgpu_cs_list_validate(struct amdgpu_cs_parser *p, | |||
| 300 | struct amdgpu_bo *bo = lobj->robj; | 298 | struct amdgpu_bo *bo = lobj->robj; |
| 301 | uint32_t domain; | 299 | uint32_t domain; |
| 302 | 300 | ||
| 303 | lobj->bo_va = amdgpu_vm_bo_find(vm, bo); | ||
| 304 | if (bo->pin_count) | 301 | if (bo->pin_count) |
| 305 | continue; | 302 | continue; |
| 306 | 303 | ||
| @@ -374,6 +371,19 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, | |||
| 374 | goto error_validate; | 371 | goto error_validate; |
| 375 | 372 | ||
| 376 | r = amdgpu_cs_list_validate(p, &p->validated); | 373 | r = amdgpu_cs_list_validate(p, &p->validated); |
| 374 | if (r) | ||
| 375 | goto error_validate; | ||
| 376 | |||
| 377 | if (p->bo_list) { | ||
| 378 | struct amdgpu_vm *vm = &fpriv->vm; | ||
| 379 | unsigned i; | ||
| 380 | |||
| 381 | for (i = 0; i < p->bo_list->num_entries; i++) { | ||
| 382 | struct amdgpu_bo *bo = p->bo_list->array[i].robj; | ||
| 383 | |||
| 384 | p->bo_list->array[i].bo_va = amdgpu_vm_bo_find(vm, bo); | ||
| 385 | } | ||
| 386 | } | ||
| 377 | 387 | ||
| 378 | error_validate: | 388 | error_validate: |
| 379 | if (r) { | 389 | if (r) { |
