Skip to content

Commit a541a6e

Browse files
yunxialiChristianKoenigAMD
authored andcommitted
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 <[email protected]> Reviewed-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Christian König <[email protected]>
1 parent e77d040 commit a541a6e

File tree

6 files changed

+7
-12
lines changed

6 files changed

+7
-12
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p)
11051105
* We can't use gang submit on with reserved VMIDs when the VM changes
11061106
* can't be invalidated by more than one engine at the same time.
11071107
*/
1108-
if (p->gang_size > 1 && !p->adev->vm_manager.concurrent_flush) {
1108+
if (p->gang_size > 1 && !adev->vm_manager.concurrent_flush) {
11091109
for (i = 0; i < p->gang_size; ++i) {
11101110
struct drm_sched_entity *entity = p->entities[i];
11111111
struct drm_gpu_scheduler *sched = entity->rq->sched;
@@ -1189,7 +1189,7 @@ static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p)
11891189
if (!bo)
11901190
continue;
11911191

1192-
amdgpu_vm_bo_invalidate(adev, bo, false);
1192+
amdgpu_vm_bo_invalidate(bo, false);
11931193
}
11941194
}
11951195

drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ amdgpu_dma_buf_move_notify(struct dma_buf_attachment *attach)
345345
/* FIXME: This should be after the "if", but needs a fix to make sure
346346
* DMABuf imports are initialized in the right VM list.
347347
*/
348-
amdgpu_vm_bo_invalidate(adev, bo, false);
348+
amdgpu_vm_bo_invalidate(bo, false);
349349
if (!bo->tbo.resource || bo->tbo.resource->mem_type == TTM_PL_SYSTEM)
350350
return;
351351

drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,6 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
839839
int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
840840
struct drm_file *filp)
841841
{
842-
struct amdgpu_device *adev = drm_to_adev(dev);
843842
struct drm_amdgpu_gem_op *args = data;
844843
struct drm_gem_object *gobj;
845844
struct amdgpu_vm_bo_base *base;
@@ -899,7 +898,7 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
899898
robj->allowed_domains |= AMDGPU_GEM_DOMAIN_GTT;
900899

901900
if (robj->flags & AMDGPU_GEM_CREATE_VM_ALWAYS_VALID)
902-
amdgpu_vm_bo_invalidate(adev, robj, true);
901+
amdgpu_vm_bo_invalidate(robj, true);
903902

904903
amdgpu_bo_unreserve(robj);
905904
break;

drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,15 +1150,14 @@ void amdgpu_bo_move_notify(struct ttm_buffer_object *bo,
11501150
bool evict,
11511151
struct ttm_resource *new_mem)
11521152
{
1153-
struct amdgpu_device *adev = amdgpu_ttm_adev(bo->bdev);
11541153
struct ttm_resource *old_mem = bo->resource;
11551154
struct amdgpu_bo *abo;
11561155

11571156
if (!amdgpu_bo_is_amdgpu_bo(bo))
11581157
return;
11591158

11601159
abo = ttm_to_amdgpu_bo(bo);
1161-
amdgpu_vm_bo_invalidate(adev, abo, evict);
1160+
amdgpu_vm_bo_invalidate(abo, evict);
11621161

11631162
amdgpu_bo_kunmap(abo);
11641163

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2143,14 +2143,12 @@ bool amdgpu_vm_evictable(struct amdgpu_bo *bo)
21432143
/**
21442144
* amdgpu_vm_bo_invalidate - mark the bo as invalid
21452145
*
2146-
* @adev: amdgpu_device pointer
21472146
* @bo: amdgpu buffer object
21482147
* @evicted: is the BO evicted
21492148
*
21502149
* Mark @bo as invalid.
21512150
*/
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)
21542152
{
21552153
struct amdgpu_vm_bo_base *bo_base;
21562154

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,8 +524,7 @@ int amdgpu_vm_bo_update(struct amdgpu_device *adev,
524524
struct amdgpu_bo_va *bo_va,
525525
bool clear);
526526
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);
529528
uint64_t amdgpu_vm_map_gart(const dma_addr_t *pages_addr, uint64_t addr);
530529
struct amdgpu_bo_va *amdgpu_vm_bo_find(struct amdgpu_vm *vm,
531530
struct amdgpu_bo *bo);

0 commit comments

Comments
 (0)