[PATCH 1/3] drm/amdgpu: remove the GART copy hack

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Christian König
> Sent: Wednesday, August 23, 2017 5:03 AM
> To: amd-gfx at lists.freedesktop.org
> Subject: [PATCH 1/3] drm/amdgpu: remove the GART copy hack
> 
> From: Christian König <christian.koenig at amd.com>
> 
> This isn't used since we don't map evicted BOs to GART any more.
> 
> Signed-off-by: Christian König <christian.koenig at amd.com>

Series is:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 22 +++++-----------------
>  1 file changed, 5 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index ab6e03d..7a0656c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -1615,7 +1615,6 @@ static int amdgpu_vm_bo_update_mapping(struct
> amdgpu_device *adev,
>   *
>   * @adev: amdgpu_device pointer
>   * @exclusive: fence we need to sync to
> - * @gtt_flags: flags as they are used for GTT
>   * @pages_addr: DMA addresses to use for mapping
>   * @vm: requested vm
>   * @mapping: mapped range and flags to use for the update
> @@ -1629,7 +1628,6 @@ static int amdgpu_vm_bo_update_mapping(struct
> amdgpu_device *adev,
>   */
>  static int amdgpu_vm_bo_split_mapping(struct amdgpu_device *adev,
>  				      struct dma_fence *exclusive,
> -				      uint64_t gtt_flags,
>  				      dma_addr_t *pages_addr,
>  				      struct amdgpu_vm *vm,
>  				      struct amdgpu_bo_va_mapping
> *mapping,
> @@ -1684,11 +1682,7 @@ static int amdgpu_vm_bo_split_mapping(struct
> amdgpu_device *adev,
>  		}
> 
>  		if (pages_addr) {
> -			if (flags == gtt_flags)
> -				src = adev->gart.table_addr +
> -					(addr >>
> AMDGPU_GPU_PAGE_SHIFT) * 8;
> -			else
> -				max_entries = min(max_entries, 16ull *
> 1024ull);
> +			max_entries = min(max_entries, 16ull * 1024ull);
>  			addr = 0;
>  		} else if (flags & AMDGPU_PTE_VALID) {
>  			addr += adev->vm_manager.vram_base_offset;
> @@ -1733,10 +1727,10 @@ int amdgpu_vm_bo_update(struct
> amdgpu_device *adev,
>  	struct amdgpu_vm *vm = bo_va->base.vm;
>  	struct amdgpu_bo_va_mapping *mapping;
>  	dma_addr_t *pages_addr = NULL;
> -	uint64_t gtt_flags, flags;
>  	struct ttm_mem_reg *mem;
>  	struct drm_mm_node *nodes;
>  	struct dma_fence *exclusive;
> +	uint64_t flags;
>  	int r;
> 
>  	if (clear || !bo_va->base.bo) {
> @@ -1756,15 +1750,10 @@ int amdgpu_vm_bo_update(struct
> amdgpu_device *adev,
>  		exclusive = reservation_object_get_excl(bo->tbo.resv);
>  	}
> 
> -	if (bo) {
> +	if (bo)
>  		flags = amdgpu_ttm_tt_pte_flags(adev, bo->tbo.ttm, mem);
> -		gtt_flags = (amdgpu_ttm_is_bound(bo->tbo.ttm) &&
> -			adev == amdgpu_ttm_adev(bo->tbo.bdev)) ?
> -			flags : 0;
> -	} else {
> +	else
>  		flags = 0x0;
> -		gtt_flags = ~0x0;
> -	}
> 
>  	spin_lock(&vm->status_lock);
>  	if (!list_empty(&bo_va->base.vm_status))
> @@ -1772,8 +1761,7 @@ int amdgpu_vm_bo_update(struct amdgpu_device
> *adev,
>  	spin_unlock(&vm->status_lock);
> 
>  	list_for_each_entry(mapping, &bo_va->invalids, list) {
> -		r = amdgpu_vm_bo_split_mapping(adev, exclusive,
> -					       gtt_flags, pages_addr, vm,
> +		r = amdgpu_vm_bo_split_mapping(adev, exclusive,
> pages_addr, vm,
>  					       mapping, flags, nodes,
>  					       &bo_va->last_pt_update);
>  		if (r)
> --
> 2.7.4
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux