diff options
author | Dave Airlie <airlied@redhat.com> | 2015-12-22 23:15:26 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-12-22 23:15:26 -0500 |
commit | fd3e14ffbd9ec7593ba4dafc9452a91373a4df05 (patch) | |
tree | 2db6625f712787514208f794ac62d24f415771a4 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |
parent | 9116199536878bb2fdd63d6064633d6e3f2cba22 (diff) | |
parent | eafbbd9883d0121811a9388988b80476dc12b1bf (diff) |
Merge branch 'drm-next-4.5' of git://people.freedesktop.org/~agd5f/linux into drm-next
[airlied: fixup build problems on arm - added errno.h include]
* 'drm-next-4.5' of git://people.freedesktop.org/~agd5f/linux: (152 commits)
amd/powerplay: fix copy paste typo in hardwaremanager.c
amd/powerplay: disable powerplay by default initially
amd/powerplay: don't enable ucode fan control if vbios has no fan table
drm/amd/powerplay: show gpu load when print gpu performance for Cz. (v2)
drm/amd/powerplay: check whether need to enable thermal control. (v2)
drm/amd/powerplay: add point check to avoid NULL point hang.
drm/amdgpu/powerplay: Program a calculated value as Deep Sleep clock.
drm/amd/powerplay: Don't return an error if fan table is missing
drm/powerplay/hwmgr: log errors in tonga_hwmgr_backend_init
drm/powerplay: add debugging output to processpptables.c
drm/powerplay: add debugging output to tonga_processpptables.c
amd/powerplay: Add structures required to report configuration change
amd/powerplay: Fix get dal power level
amd\powerplay Implement get dal power level
drm/amd/powerplay: display gpu load when print performance for tonga.
drm/amdgpu/powerplay: enable sysfs and debugfs interfaces late
drm/amd/powerplay: move shared function of vi to hwmgr. (v2)
drm/amd/powerplay: check whether enable dpm in powerplay.
drm/amd/powerplay: fix bug that dpm funcs in debugfs/sysfs missing.
drm/amd/powerplay: fix boolreturn.cocci warnings
...
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index f6ea4b43a60c..6d136b260bb3 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |||
@@ -448,7 +448,7 @@ static void amdgpu_gem_va_update_vm(struct amdgpu_device *adev, | |||
448 | struct amdgpu_bo_va *bo_va, uint32_t operation) | 448 | struct amdgpu_bo_va *bo_va, uint32_t operation) |
449 | { | 449 | { |
450 | struct ttm_validate_buffer tv, *entry; | 450 | struct ttm_validate_buffer tv, *entry; |
451 | struct amdgpu_bo_list_entry *vm_bos; | 451 | struct amdgpu_bo_list_entry vm_pd; |
452 | struct ww_acquire_ctx ticket; | 452 | struct ww_acquire_ctx ticket; |
453 | struct list_head list, duplicates; | 453 | struct list_head list, duplicates; |
454 | unsigned domain; | 454 | unsigned domain; |
@@ -461,15 +461,14 @@ static void amdgpu_gem_va_update_vm(struct amdgpu_device *adev, | |||
461 | tv.shared = true; | 461 | tv.shared = true; |
462 | list_add(&tv.head, &list); | 462 | list_add(&tv.head, &list); |
463 | 463 | ||
464 | vm_bos = amdgpu_vm_get_bos(adev, bo_va->vm, &list); | 464 | amdgpu_vm_get_pd_bo(bo_va->vm, &list, &vm_pd); |
465 | if (!vm_bos) | ||
466 | return; | ||
467 | 465 | ||
468 | /* Provide duplicates to avoid -EALREADY */ | 466 | /* Provide duplicates to avoid -EALREADY */ |
469 | r = ttm_eu_reserve_buffers(&ticket, &list, true, &duplicates); | 467 | r = ttm_eu_reserve_buffers(&ticket, &list, true, &duplicates); |
470 | if (r) | 468 | if (r) |
471 | goto error_free; | 469 | goto error_print; |
472 | 470 | ||
471 | amdgpu_vm_get_pt_bos(bo_va->vm, &duplicates); | ||
473 | list_for_each_entry(entry, &list, head) { | 472 | list_for_each_entry(entry, &list, head) { |
474 | domain = amdgpu_mem_type_to_domain(entry->bo->mem.mem_type); | 473 | domain = amdgpu_mem_type_to_domain(entry->bo->mem.mem_type); |
475 | /* if anything is swapped out don't swap it in here, | 474 | /* if anything is swapped out don't swap it in here, |
@@ -491,9 +490,7 @@ static void amdgpu_gem_va_update_vm(struct amdgpu_device *adev, | |||
491 | error_unreserve: | 490 | error_unreserve: |
492 | ttm_eu_backoff_reservation(&ticket, &list); | 491 | ttm_eu_backoff_reservation(&ticket, &list); |
493 | 492 | ||
494 | error_free: | 493 | error_print: |
495 | drm_free_large(vm_bos); | ||
496 | |||
497 | if (r && r != -ERESTARTSYS) | 494 | if (r && r != -ERESTARTSYS) |
498 | DRM_ERROR("Couldn't update BO_VA (%d)\n", r); | 495 | DRM_ERROR("Couldn't update BO_VA (%d)\n", r); |
499 | } | 496 | } |