diff options
author | Dave Airlie <airlied@redhat.com> | 2015-09-03 23:06:29 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-09-03 23:06:29 -0400 |
commit | 99495589aa4de7166af254bc497cdbe133fc24bb (patch) | |
tree | d525e957854064f2492976e9beb8a04dddc28143 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
parent | 879a37d00f1882b1e56a66e626af4194d592d257 (diff) | |
parent | bddf8026386927985ef6d0d11c3ba78f70b76bad (diff) |
Merge branch 'drm-next-4.3' of git://people.freedesktop.org/~agd5f/linux into drm-next
More fixes for radeon and amdgpu for 4.3:
- Send full DP aux address fixes for radeon and amdgpu
- Fix an HDMI display regression for pre-DCE5 parts
- UVD suspend fixes for amdgpu
- Add an rs480 suspend quirk
- Fix bo reserve handling in amdgpu GEM_OP ioctl
- GPU scheduler fixes
- SDMA optimizations
- MEC fix for Fiji
* 'drm-next-4.3' of git://people.freedesktop.org/~agd5f/linux: (21 commits)
drm/amdgpu: set MEC doorbell range for Fiji
drm/amdgpu: implement burst NOP for SDMA
drm/amdgpu: add insert_nop ring func and default implementation
drm/amdgpu: add amdgpu_get_sdma_instance helper function
drm/amdgpu: add AMDGPU_MAX_SDMA_INSTANCES
drm/amdgpu: add burst_nop flag for sdma
drm/amdgpu: add count field for the SDMA NOP packet v2
drm/amdgpu: use PT for VM sync on unmap
drm/amdgpu: make wait_event uninterruptible in push_job
drm/amdgpu: fix amdgpu_bo_unreserve order in GEM_OP IOCTL v2
drm/amdgpu: partially revert "modify amdgpu_fence_wait_any() to amdgpu_fence_wait_multiple()" v2
Add radeon suspend/resume quirk for HP Compaq dc5750.
drm/amdgpu: re-work sync_resv
drm/amdgpu/atom: Send out the full AUX address
drm/radeon/native: Send out the full AUX address
drm/radeon/atom: Send out the full AUX address
drm/amdgpu: use IB for fill_buffer instead of direct command
drm/amdgpu: stop trying to suspend UVD sessions v2
drm/amdgpu: add scheduler dependency callback v2
drm/amdgpu: let the scheduler work more with jobs v2
...
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 83b7ce6f5f72..5848564d3d66 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |||
@@ -627,9 +627,14 @@ static int amdgpu_vm_update_ptes(struct amdgpu_device *adev, | |||
627 | { | 627 | { |
628 | uint64_t mask = AMDGPU_VM_PTE_COUNT - 1; | 628 | uint64_t mask = AMDGPU_VM_PTE_COUNT - 1; |
629 | uint64_t last_pte = ~0, last_dst = ~0; | 629 | uint64_t last_pte = ~0, last_dst = ~0; |
630 | void *owner = AMDGPU_FENCE_OWNER_VM; | ||
630 | unsigned count = 0; | 631 | unsigned count = 0; |
631 | uint64_t addr; | 632 | uint64_t addr; |
632 | 633 | ||
634 | /* sync to everything on unmapping */ | ||
635 | if (!(flags & AMDGPU_PTE_VALID)) | ||
636 | owner = AMDGPU_FENCE_OWNER_UNDEFINED; | ||
637 | |||
633 | /* walk over the address space and update the page tables */ | 638 | /* walk over the address space and update the page tables */ |
634 | for (addr = start; addr < end; ) { | 639 | for (addr = start; addr < end; ) { |
635 | uint64_t pt_idx = addr >> amdgpu_vm_block_size; | 640 | uint64_t pt_idx = addr >> amdgpu_vm_block_size; |
@@ -638,8 +643,7 @@ static int amdgpu_vm_update_ptes(struct amdgpu_device *adev, | |||
638 | uint64_t pte; | 643 | uint64_t pte; |
639 | int r; | 644 | int r; |
640 | 645 | ||
641 | amdgpu_sync_resv(adev, &ib->sync, pt->tbo.resv, | 646 | amdgpu_sync_resv(adev, &ib->sync, pt->tbo.resv, owner); |
642 | AMDGPU_FENCE_OWNER_VM); | ||
643 | r = reservation_object_reserve_shared(pt->tbo.resv); | 647 | r = reservation_object_reserve_shared(pt->tbo.resv); |
644 | if (r) | 648 | if (r) |
645 | return r; | 649 | return r; |
@@ -790,17 +794,6 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev, | |||
790 | 794 | ||
791 | ib->length_dw = 0; | 795 | ib->length_dw = 0; |
792 | 796 | ||
793 | if (!(flags & AMDGPU_PTE_VALID)) { | ||
794 | unsigned i; | ||
795 | |||
796 | for (i = 0; i < AMDGPU_MAX_RINGS; ++i) { | ||
797 | struct amdgpu_fence *f = vm->ids[i].last_id_use; | ||
798 | r = amdgpu_sync_fence(adev, &ib->sync, &f->base); | ||
799 | if (r) | ||
800 | return r; | ||
801 | } | ||
802 | } | ||
803 | |||
804 | r = amdgpu_vm_update_ptes(adev, vm, ib, mapping->it.start, | 797 | r = amdgpu_vm_update_ptes(adev, vm, ib, mapping->it.start, |
805 | mapping->it.last + 1, addr + mapping->offset, | 798 | mapping->it.last + 1, addr + mapping->offset, |
806 | flags, gtt_flags); | 799 | flags, gtt_flags); |