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>
This commit is contained in:

committed by
Alex Deucher

parent
15486fd20c
commit
a8480309df
@@ -290,8 +290,6 @@ static u64 amdgpu_cs_get_threshold_for_moves(struct amdgpu_device *adev)
|
|||||||
int amdgpu_cs_list_validate(struct amdgpu_cs_parser *p,
|
int amdgpu_cs_list_validate(struct amdgpu_cs_parser *p,
|
||||||
struct list_head *validated)
|
struct list_head *validated)
|
||||||
{
|
{
|
||||||
struct amdgpu_fpriv *fpriv = p->filp->driver_priv;
|
|
||||||
struct amdgpu_vm *vm = &fpriv->vm;
|
|
||||||
struct amdgpu_bo_list_entry *lobj;
|
struct amdgpu_bo_list_entry *lobj;
|
||||||
u64 initial_bytes_moved;
|
u64 initial_bytes_moved;
|
||||||
int r;
|
int r;
|
||||||
@@ -300,7 +298,6 @@ int amdgpu_cs_list_validate(struct amdgpu_cs_parser *p,
|
|||||||
struct amdgpu_bo *bo = lobj->robj;
|
struct amdgpu_bo *bo = lobj->robj;
|
||||||
uint32_t domain;
|
uint32_t domain;
|
||||||
|
|
||||||
lobj->bo_va = amdgpu_vm_bo_find(vm, bo);
|
|
||||||
if (bo->pin_count)
|
if (bo->pin_count)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -374,6 +371,19 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,
|
|||||||
goto error_validate;
|
goto error_validate;
|
||||||
|
|
||||||
r = amdgpu_cs_list_validate(p, &p->validated);
|
r = amdgpu_cs_list_validate(p, &p->validated);
|
||||||
|
if (r)
|
||||||
|
goto error_validate;
|
||||||
|
|
||||||
|
if (p->bo_list) {
|
||||||
|
struct amdgpu_vm *vm = &fpriv->vm;
|
||||||
|
unsigned i;
|
||||||
|
|
||||||
|
for (i = 0; i < p->bo_list->num_entries; i++) {
|
||||||
|
struct amdgpu_bo *bo = p->bo_list->array[i].robj;
|
||||||
|
|
||||||
|
p->bo_list->array[i].bo_va = amdgpu_vm_bo_find(vm, bo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
error_validate:
|
error_validate:
|
||||||
if (r) {
|
if (r) {
|
||||||
|
Reference in New Issue
Block a user