Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: remove unused function parameter

amdgpu_vm_bo_invalidate doesn't use the adev parameter and not all
callers have a reference to adev handy, so remove it for cleanliness.

Signed-off-by: Yunxiang Li <Yunxiang.Li@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241219151411.1150-5-Yunxiang.Li@amd.com
Signed-off-by: Christian König <christian.koenig@amd.com>

authored by

Yunxiang Li and committed by
Christian König
a541a6e8 e77d0401

+7 -12
+2 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
··· 1105 1105 * We can't use gang submit on with reserved VMIDs when the VM changes 1106 1106 * can't be invalidated by more than one engine at the same time. 1107 1107 */ 1108 - if (p->gang_size > 1 && !p->adev->vm_manager.concurrent_flush) { 1108 + if (p->gang_size > 1 && !adev->vm_manager.concurrent_flush) { 1109 1109 for (i = 0; i < p->gang_size; ++i) { 1110 1110 struct drm_sched_entity *entity = p->entities[i]; 1111 1111 struct drm_gpu_scheduler *sched = entity->rq->sched; ··· 1189 1189 if (!bo) 1190 1190 continue; 1191 1191 1192 - amdgpu_vm_bo_invalidate(adev, bo, false); 1192 + amdgpu_vm_bo_invalidate(bo, false); 1193 1193 } 1194 1194 } 1195 1195
+1 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
··· 345 345 /* FIXME: This should be after the "if", but needs a fix to make sure 346 346 * DMABuf imports are initialized in the right VM list. 347 347 */ 348 - amdgpu_vm_bo_invalidate(adev, bo, false); 348 + amdgpu_vm_bo_invalidate(bo, false); 349 349 if (!bo->tbo.resource || bo->tbo.resource->mem_type == TTM_PL_SYSTEM) 350 350 return; 351 351
+1 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
··· 839 839 int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data, 840 840 struct drm_file *filp) 841 841 { 842 - struct amdgpu_device *adev = drm_to_adev(dev); 843 842 struct drm_amdgpu_gem_op *args = data; 844 843 struct drm_gem_object *gobj; 845 844 struct amdgpu_vm_bo_base *base; ··· 898 899 robj->allowed_domains |= AMDGPU_GEM_DOMAIN_GTT; 899 900 900 901 if (robj->flags & AMDGPU_GEM_CREATE_VM_ALWAYS_VALID) 901 - amdgpu_vm_bo_invalidate(adev, robj, true); 902 + amdgpu_vm_bo_invalidate(robj, true); 902 903 903 904 amdgpu_bo_unreserve(robj); 904 905 break;
+1 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
··· 1150 1150 bool evict, 1151 1151 struct ttm_resource *new_mem) 1152 1152 { 1153 - struct amdgpu_device *adev = amdgpu_ttm_adev(bo->bdev); 1154 1153 struct ttm_resource *old_mem = bo->resource; 1155 1154 struct amdgpu_bo *abo; 1156 1155 ··· 1157 1158 return; 1158 1159 1159 1160 abo = ttm_to_amdgpu_bo(bo); 1160 - amdgpu_vm_bo_invalidate(adev, abo, evict); 1161 + amdgpu_vm_bo_invalidate(abo, evict); 1161 1162 1162 1163 amdgpu_bo_kunmap(abo); 1163 1164
+1 -3
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
··· 2143 2143 /** 2144 2144 * amdgpu_vm_bo_invalidate - mark the bo as invalid 2145 2145 * 2146 - * @adev: amdgpu_device pointer 2147 2146 * @bo: amdgpu buffer object 2148 2147 * @evicted: is the BO evicted 2149 2148 * 2150 2149 * Mark @bo as invalid. 2151 2150 */ 2152 - void amdgpu_vm_bo_invalidate(struct amdgpu_device *adev, 2153 - struct amdgpu_bo *bo, bool evicted) 2151 + void amdgpu_vm_bo_invalidate(struct amdgpu_bo *bo, bool evicted) 2154 2152 { 2155 2153 struct amdgpu_vm_bo_base *bo_base; 2156 2154
+1 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
··· 524 524 struct amdgpu_bo_va *bo_va, 525 525 bool clear); 526 526 bool amdgpu_vm_evictable(struct amdgpu_bo *bo); 527 - void amdgpu_vm_bo_invalidate(struct amdgpu_device *adev, 528 - struct amdgpu_bo *bo, bool evicted); 527 + void amdgpu_vm_bo_invalidate(struct amdgpu_bo *bo, bool evicted); 529 528 uint64_t amdgpu_vm_map_gart(const dma_addr_t *pages_addr, uint64_t addr); 530 529 struct amdgpu_bo_va *amdgpu_vm_bo_find(struct amdgpu_vm *vm, 531 530 struct amdgpu_bo *bo);