diff options
| author | Dave Airlie <airlied@redhat.com> | 2021-06-10 13:47:12 +1000 | 
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2021-06-10 13:47:13 +1000 | 
| commit | c707b73f0cfb1acc94a20389aecde65e6385349b (patch) | |
| tree | be2d0069c38a87c4f2e6c4d3e7097d5ee672a3bb /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
| parent | a2098e857b765bd39a9c67c81448f60d5c475846 (diff) | |
| parent | 2c1b1ac7084edf477309d27c02d9da7f79b33cec (diff) | |
Merge tag 'amd-drm-next-5.14-2021-06-09' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
amd-drm-next-5.14-2021-06-09:
amdgpu:
- SR-IOV fixes
- Smartshift updates
- GPUVM TLB flush updates
- 16bpc fixed point display fix for DCE11
- BACO cleanups and core refactoring
- Aldebaran updates
- Initial Yellow Carp support
- RAS fixes
- PM API cleanup
- DC visual confirm updates
- DC DP MST fixes
- DC DML fixes
- Misc code cleanups and bug fixes
amdkfd:
- Initial Yellow Carp support
radeon:
- memcpy_to/from_io fixes
UAPI:
- Add Yellow Carp chip family id
  Used internally in the kernel driver and by mesa
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210610031649.4006-1-alexander.deucher@amd.com
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, 10 insertions, 9 deletions
| diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 777e8922ecf3..18246b5b6ee3 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -910,7 +910,7 @@ static int amdgpu_vm_pt_create(struct amdgpu_device *adev,  		return r;  	bo = &(*vmbo)->bo; -	if (vm->is_compute_context && (adev->flags & AMD_IS_APU)) { +	if (vm->is_compute_context || (adev->flags & AMD_IS_APU)) {  		(*vmbo)->shadow = NULL;  		return 0;  	} @@ -1713,8 +1713,8 @@ int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,  	if (r)  		goto error_unlock; -	amdgpu_res_first(res, offset, (last - start + 1) * AMDGPU_GPU_PAGE_SIZE, -			 &cursor); +	amdgpu_res_first(pages_addr ? NULL : res, offset, +			 (last - start + 1) * AMDGPU_GPU_PAGE_SIZE, &cursor);  	while (cursor.remaining) {  		uint64_t tmp, num_entries, addr; @@ -1764,12 +1764,12 @@ int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,  		amdgpu_res_next(&cursor, num_entries * AMDGPU_GPU_PAGE_SIZE);  		start = tmp; -	}; +	}  	r = vm->update_funcs->commit(¶ms, fence);  	if (table_freed) -		*table_freed = params.table_freed; +		*table_freed = *table_freed || params.table_freed;  error_unlock:  	amdgpu_vm_eviction_unlock(vm); @@ -1827,6 +1827,7 @@ void amdgpu_vm_get_memory(struct amdgpu_vm *vm, uint64_t *vram_mem,   * @adev: amdgpu_device pointer   * @bo_va: requested BO and VM object   * @clear: if true clear the entries + * @table_freed: return true if page table is freed   *   * Fill in the page table entries for @bo_va.   * @@ -1834,7 +1835,7 @@ void amdgpu_vm_get_memory(struct amdgpu_vm *vm, uint64_t *vram_mem,   * 0 for success, -EINVAL for failure.   */  int amdgpu_vm_bo_update(struct amdgpu_device *adev, struct amdgpu_bo_va *bo_va, -			bool clear) +			bool clear, bool *table_freed)  {  	struct amdgpu_bo *bo = bo_va->base.bo;  	struct amdgpu_vm *vm = bo_va->base.vm; @@ -1913,7 +1914,7 @@ int amdgpu_vm_bo_update(struct amdgpu_device *adev, struct amdgpu_bo_va *bo_va,  						resv, mapping->start,  						mapping->last, update_flags,  						mapping->offset, mem, -						pages_addr, last_update, NULL); +						pages_addr, last_update, table_freed);  		if (r)  			return r;  	} @@ -2165,7 +2166,7 @@ int amdgpu_vm_handle_moved(struct amdgpu_device *adev,  	list_for_each_entry_safe(bo_va, tmp, &vm->moved, base.vm_status) {  		/* Per VM BOs never need to bo cleared in the page tables */ -		r = amdgpu_vm_bo_update(adev, bo_va, false); +		r = amdgpu_vm_bo_update(adev, bo_va, false, NULL);  		if (r)  			return r;  	} @@ -2184,7 +2185,7 @@ int amdgpu_vm_handle_moved(struct amdgpu_device *adev,  		else  			clear = true; -		r = amdgpu_vm_bo_update(adev, bo_va, clear); +		r = amdgpu_vm_bo_update(adev, bo_va, clear, NULL);  		if (r)  			return r; | 
