diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1576-drm-amdgpu-Remove-unused-clear_bo-function.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1576-drm-amdgpu-Remove-unused-clear_bo-function.patch | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1576-drm-amdgpu-Remove-unused-clear_bo-function.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1576-drm-amdgpu-Remove-unused-clear_bo-function.patch new file mode 100644 index 00000000..6ea043be --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1576-drm-amdgpu-Remove-unused-clear_bo-function.patch @@ -0,0 +1,84 @@ +From 0021405382735056cd8d951fc90abb37f5a1c446 Mon Sep 17 00:00:00 2001 +From: Kent Russell <kent.russell@amd.com> +Date: Tue, 31 Jan 2017 06:48:42 -0500 +Subject: [PATCH 1576/4131] drm/amdgpu: Remove unused clear_bo function + +amdgpu_fill_buffer does this job and handles the split VRAM allocations, +so use that instead + +Change-Id: Ida807c285e0357dfa2d7aba24dc46345a831a252 +Signed-off-by: Kent Russell <kent.russell@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 56 ------------------------ + 1 file changed, 56 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +index 9895c8a..097d336 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +@@ -486,62 +486,6 @@ static int validate_pt_pd_bos(struct amdgpu_device *adev, struct amdgpu_vm *vm) + return ret; + } + +-/** +- * amdgpu_vm_clear_bo - initially clear the VRAM pages +- * +- * @adev: amdgpu_device pointer +- * @bo: bo to clear +- * @vm: requested vm +- * need to reserve bo first before calling it. +- */ +-static int amdgpu_amdkfd_gpuvm_clear_bo(struct amdgpu_device *adev, +- struct amdgpu_vm *vm, +- struct amdgpu_bo *bo) +-{ +- struct amdgpu_ring *ring; +- struct fence *fence = NULL; +- struct amdgpu_job *job; +- unsigned entries; +- uint64_t addr; +- int r; +- +- ring = container_of(vm->entity.sched, struct amdgpu_ring, sched); +- +- r = reservation_object_reserve_shared(bo->tbo.resv); +- if (r) +- return r; +- +- r = ttm_bo_validate(&bo->tbo, &bo->placement, true, false); +- if (r) +- goto error; +- +- addr = amdgpu_bo_gpu_offset(bo); +- entries = amdgpu_bo_size(bo); +- +- r = amdgpu_job_alloc_with_ib(adev, 64, &job); +- if (r) +- goto error; +- +- amdgpu_emit_fill_buffer(adev, &job->ibs[0], 0, addr, entries); +- amdgpu_ring_pad_ib(ring, &job->ibs[0]); +- +- WARN_ON(job->ibs[0].length_dw > 64); +- r = amdgpu_job_submit(job, ring, &vm->entity, +- AMDGPU_FENCE_OWNER_VM, &fence); +- if (r) +- goto error_free; +- +- amdgpu_bo_fence(bo, fence, true); +- fence_put(fence); +- return 0; +- +-error_free: +- amdgpu_job_free(job); +- +-error: +- return r; +-} +- + static void add_kgd_mem_to_kfd_bo_list(struct kgd_mem *mem, + struct amdkfd_vm *kfd_vm) + { +-- +2.7.4 + |