diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 533b2e7656c0..8a49c3b97bd4 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |||
@@ -572,11 +572,16 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, | |||
572 | INIT_LIST_HEAD(&p->validated); | 572 | INIT_LIST_HEAD(&p->validated); |
573 | 573 | ||
574 | /* p->bo_list could already be assigned if AMDGPU_CHUNK_ID_BO_HANDLES is present */ | 574 | /* p->bo_list could already be assigned if AMDGPU_CHUNK_ID_BO_HANDLES is present */ |
575 | if (!p->bo_list) | 575 | if (p->bo_list) { |
576 | p->bo_list = amdgpu_bo_list_get(fpriv, cs->in.bo_list_handle); | ||
577 | else | ||
578 | mutex_lock(&p->bo_list->lock); | 576 | mutex_lock(&p->bo_list->lock); |
579 | 577 | ||
578 | } else if (cs->in.bo_list_handle) { | ||
579 | r = amdgpu_bo_list_get(fpriv, cs->in.bo_list_handle, | ||
580 | &p->bo_list); | ||
581 | if (r) | ||
582 | return r; | ||
583 | } | ||
584 | |||
580 | if (p->bo_list) { | 585 | if (p->bo_list) { |
581 | amdgpu_bo_list_get_list(p->bo_list, &p->validated); | 586 | amdgpu_bo_list_get_list(p->bo_list, &p->validated); |
582 | if (p->bo_list->first_userptr != p->bo_list->num_entries) | 587 | if (p->bo_list->first_userptr != p->bo_list->num_entries) |