mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 05:48:40 +00:00
drm/radeon: add radeon_vm_bo_update trace point
Also rename the function to better reflect what it is doing. agd5f: fix argument size warning Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
84d597b74b
commit
9c57a6bd3e
4 changed files with 32 additions and 12 deletions
|
@ -2710,10 +2710,10 @@ void radeon_vm_fence(struct radeon_device *rdev,
|
|||
struct radeon_vm *vm,
|
||||
struct radeon_fence *fence);
|
||||
uint64_t radeon_vm_map_gart(struct radeon_device *rdev, uint64_t addr);
|
||||
int radeon_vm_bo_update_pte(struct radeon_device *rdev,
|
||||
struct radeon_vm *vm,
|
||||
struct radeon_bo *bo,
|
||||
struct ttm_mem_reg *mem);
|
||||
int radeon_vm_bo_update(struct radeon_device *rdev,
|
||||
struct radeon_vm *vm,
|
||||
struct radeon_bo *bo,
|
||||
struct ttm_mem_reg *mem);
|
||||
void radeon_vm_bo_invalidate(struct radeon_device *rdev,
|
||||
struct radeon_bo *bo);
|
||||
struct radeon_bo_va *radeon_vm_bo_find(struct radeon_vm *vm,
|
||||
|
|
|
@ -360,13 +360,13 @@ static int radeon_bo_vm_update_pte(struct radeon_cs_parser *parser,
|
|||
struct radeon_bo *bo;
|
||||
int r;
|
||||
|
||||
r = radeon_vm_bo_update_pte(rdev, vm, rdev->ring_tmp_bo.bo, &rdev->ring_tmp_bo.bo->tbo.mem);
|
||||
r = radeon_vm_bo_update(rdev, vm, rdev->ring_tmp_bo.bo, &rdev->ring_tmp_bo.bo->tbo.mem);
|
||||
if (r) {
|
||||
return r;
|
||||
}
|
||||
list_for_each_entry(lobj, &parser->validated, tv.head) {
|
||||
bo = lobj->bo;
|
||||
r = radeon_vm_bo_update_pte(parser->rdev, vm, bo, &bo->tbo.mem);
|
||||
r = radeon_vm_bo_update(parser->rdev, vm, bo, &bo->tbo.mem);
|
||||
if (r) {
|
||||
return r;
|
||||
}
|
||||
|
|
|
@ -1118,7 +1118,7 @@ static void radeon_vm_update_ptes(struct radeon_device *rdev,
|
|||
}
|
||||
|
||||
/**
|
||||
* radeon_vm_bo_update_pte - map a bo into the vm page table
|
||||
* radeon_vm_bo_update - map a bo into the vm page table
|
||||
*
|
||||
* @rdev: radeon_device pointer
|
||||
* @vm: requested vm
|
||||
|
@ -1130,10 +1130,10 @@ static void radeon_vm_update_ptes(struct radeon_device *rdev,
|
|||
*
|
||||
* Object have to be reserved & global and local mutex must be locked!
|
||||
*/
|
||||
int radeon_vm_bo_update_pte(struct radeon_device *rdev,
|
||||
struct radeon_vm *vm,
|
||||
struct radeon_bo *bo,
|
||||
struct ttm_mem_reg *mem)
|
||||
int radeon_vm_bo_update(struct radeon_device *rdev,
|
||||
struct radeon_vm *vm,
|
||||
struct radeon_bo *bo,
|
||||
struct ttm_mem_reg *mem)
|
||||
{
|
||||
struct radeon_ib ib;
|
||||
struct radeon_bo_va *bo_va;
|
||||
|
@ -1178,6 +1178,8 @@ int radeon_vm_bo_update_pte(struct radeon_device *rdev,
|
|||
bo_va->valid = false;
|
||||
}
|
||||
|
||||
trace_radeon_vm_bo_update(bo_va);
|
||||
|
||||
nptes = radeon_bo_ngpu_pages(bo);
|
||||
|
||||
/* assume two extra pdes in case the mapping overlaps the borders */
|
||||
|
@ -1259,7 +1261,7 @@ int radeon_vm_bo_rmv(struct radeon_device *rdev,
|
|||
mutex_lock(&rdev->vm_manager.lock);
|
||||
mutex_lock(&bo_va->vm->mutex);
|
||||
if (bo_va->soffset) {
|
||||
r = radeon_vm_bo_update_pte(rdev, bo_va->vm, bo_va->bo, NULL);
|
||||
r = radeon_vm_bo_update(rdev, bo_va->vm, bo_va->bo, NULL);
|
||||
}
|
||||
mutex_unlock(&rdev->vm_manager.lock);
|
||||
list_del(&bo_va->vm_list);
|
||||
|
|
|
@ -62,6 +62,24 @@ TRACE_EVENT(radeon_vm_grab_id,
|
|||
TP_printk("vmid=%u, ring=%u", __entry->vmid, __entry->ring)
|
||||
);
|
||||
|
||||
TRACE_EVENT(radeon_vm_bo_update,
|
||||
TP_PROTO(struct radeon_bo_va *bo_va),
|
||||
TP_ARGS(bo_va),
|
||||
TP_STRUCT__entry(
|
||||
__field(u64, soffset)
|
||||
__field(u64, eoffset)
|
||||
__field(u32, flags)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->soffset = bo_va->soffset;
|
||||
__entry->eoffset = bo_va->eoffset;
|
||||
__entry->flags = bo_va->flags;
|
||||
),
|
||||
TP_printk("soffs=%010llx, eoffs=%010llx, flags=%08x",
|
||||
__entry->soffset, __entry->eoffset, __entry->flags)
|
||||
);
|
||||
|
||||
TRACE_EVENT(radeon_vm_set_page,
|
||||
TP_PROTO(uint64_t pe, uint64_t addr, unsigned count,
|
||||
uint32_t incr, uint32_t flags),
|
||||
|
|
Loading…
Reference in a new issue