drm/amdgpu: Removed used parameter
Subsystems (3)
PATCH 1/1 drm/amdgpu: Removed used parameter
Also passing adev is misleading if BO is associated with different adev. In this case BO is mapped to a different device
Signed-off-by Harish Kasiviswanathan <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 ++-- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h +1 -1
@@ -320,7 +320,7 @@ int amdgpu_amdkfd_gpuvm_map_gtt_bo_to_kernel(struct kgd_mem *mem, void **kptr, uint64_t *size);void amdgpu_amdkfd_gpuvm_unmap_gtt_bo_from_kernel (struct kgd_mem *mem); -int amdgpu_amdkfd_map_gtt_bo_to_gart (struct amdgpu_device *adev,struct amdgpu_bo *bo); +int amdgpu_amdkfd_map_gtt_bo_to_gart (struct amdgpu_bo *bo);int amdgpu_amdkfd_gpuvm_restore_process_bos (void *process_info,struct dma_fence __rcu **ef);
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +2 -2
@@ -2189,13 +2189,13 @@ int amdgpu_amdkfd_gpuvm_sync_memory(/** * amdgpu_amdkfd_map_gtt_bo_to_gart - Map BO to GART and increment reference count -* @adev: Device to which allocated BO belongs * @bo: Buffer object to be mapped * +* BO will be mapped to GART of adev to which it is previously associated with * Before return, bo reference count is incremented. To release the reference and unpin/ * unmap the BO, call amdgpu_amdkfd_free_gtt_mem. */ -int amdgpu_amdkfd_map_gtt_bo_to_gart (struct amdgpu_device *adev,struct amdgpu_bo *bo) +int amdgpu_amdkfd_map_gtt_bo_to_gart (struct amdgpu_bo *bo) {int ret;
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +1 -1
@@ -371,7 +371,7 @@ static int kfd_ioctl_create_queue(struct file *filep, struct kfd_process *p, goto err_wptr_map_gart; } - err =amdgpu_amdkfd_map_gtt_bo_to_gart (dev->adev, wptr_bo); + err =amdgpu_amdkfd_map_gtt_bo_to_gart (wptr_bo);if (err) {pr_err ("Failed to map wptr bo to GART\n" ); goto err_wptr_map_gart;
Signature · 1 line
2.34.1
Quoted 5 lines · Harish Kasiviswanathan
Also passing adev is misleading if BO is associated with different adev. In this case BO is mapped to a different device
Signed-off-by Harish Kasiviswanathan <[email protected]>
Acked-by Alex Deucher <[email protected]>
Quoted 55 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 ++-- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h +1
-1@@ -320,7 +320,7 @@ int amdgpu_amdkfd_gpuvm_map_gtt_bo_to_kernel(struct kgd_mem *mem, void **kptr, uint64_t *size);void amdgpu_amdkfd_gpuvm_unmap_gtt_bo_from_kernel (struct kgd_mem *mem); -int amdgpu_amdkfd_map_gtt_bo_to_gart (struct amdgpu_device *adev,struct amdgpu_bo *bo); +int amdgpu_amdkfd_map_gtt_bo_to_gart (struct amdgpu_bo *bo);int amdgpu_amdkfd_gpuvm_restore_process_bos (void *process_info,struct dma_fence __rcu **ef);drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +2
-2@@ -2189,13 +2189,13 @@ int amdgpu_amdkfd_gpuvm_sync_memory(/** * amdgpu_amdkfd_map_gtt_bo_to_gart - Map BO to GART and increment reference count -* @adev: Device to which allocated BO belongs * @bo: Buffer object to be mapped * +* BO will be mapped to GART of adev to which it is previously associated with * Before return, bo reference count is incremented. To release the reference and unpin/ * unmap the BO, call amdgpu_amdkfd_free_gtt_mem. */ -int amdgpu_amdkfd_map_gtt_bo_to_gart (struct amdgpu_device *adev,struct amdgpu_bo *bo) +int amdgpu_amdkfd_map_gtt_bo_to_gart (struct amdgpu_bo *bo) {int ret;drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +1
-2@@ -371,7 +371,7 @@ static int kfd_ioctl_create_queue(struct file *filep, struct kfd_process *p, goto err_wptr_map_gart; } - err =amdgpu_amdkfd_map_gtt_bo_to_gart (dev->adev, wptr_bo); + err =amdgpu_amdkfd_map_gtt_bo_to_gart (wptr_bo);if (err) {pr_err ("Failed to map wptr bo to GART\n" ); goto err_wptr_map_gart; --2.34.1
Quoted 3 lines · Harish Kasiviswanathan
Also passing adev is misleading if BO is associated with different adev. In this case BO is mapped to a different device
Looks like a typo in subject - unused?
Thanks,
Lijo
Quoted 53 lines
Signed-off-by Harish Kasiviswanathan <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 ++-- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h +1
-1@@ -320,7 +320,7 @@ int amdgpu_amdkfd_gpuvm_map_gtt_bo_to_kernel(struct kgd_mem *mem, void **kptr, uint64_t *size);void amdgpu_amdkfd_gpuvm_unmap_gtt_bo_from_kernel (struct kgd_mem *mem); -int amdgpu_amdkfd_map_gtt_bo_to_gart (struct amdgpu_device *adev,struct amdgpu_bo *bo); +int amdgpu_amdkfd_map_gtt_bo_to_gart (struct amdgpu_bo *bo);int amdgpu_amdkfd_gpuvm_restore_process_bos (void *process_info,struct dma_fence __rcu **ef);drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +2
-2@@ -2189,13 +2189,13 @@ int amdgpu_amdkfd_gpuvm_sync_memory(/** * amdgpu_amdkfd_map_gtt_bo_to_gart - Map BO to GART and increment reference count -* @adev: Device to which allocated BO belongs * @bo: Buffer object to be mapped * +* BO will be mapped to GART of adev to which it is previously associated with * Before return, bo reference count is incremented. To release the reference and unpin/ * unmap the BO, call amdgpu_amdkfd_free_gtt_mem. */ -int amdgpu_amdkfd_map_gtt_bo_to_gart (struct amdgpu_device *adev,struct amdgpu_bo *bo) +int amdgpu_amdkfd_map_gtt_bo_to_gart (struct amdgpu_bo *bo) {int ret;drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +1
-1@@ -371,7 +371,7 @@ static int kfd_ioctl_create_queue(struct file *filep, struct kfd_process *p, goto err_wptr_map_gart; } - err =amdgpu_amdkfd_map_gtt_bo_to_gart (dev->adev, wptr_bo); + err =amdgpu_amdkfd_map_gtt_bo_to_gart (wptr_bo);if (err) {pr_err ("Failed to map wptr bo to GART\n" ); goto err_wptr_map_gart;