mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-21 20:25:15 +07:00
drm/amdgpu: trace if a PD/PT update is done directly
This is usfull for debugging. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
bc51c1e56f
commit
1313dacfad
@ -323,14 +323,15 @@ DEFINE_EVENT(amdgpu_vm_mapping, amdgpu_vm_bo_cs,
|
||||
|
||||
TRACE_EVENT(amdgpu_vm_set_ptes,
|
||||
TP_PROTO(uint64_t pe, uint64_t addr, unsigned count,
|
||||
uint32_t incr, uint64_t flags),
|
||||
TP_ARGS(pe, addr, count, incr, flags),
|
||||
uint32_t incr, uint64_t flags, bool direct),
|
||||
TP_ARGS(pe, addr, count, incr, flags, direct),
|
||||
TP_STRUCT__entry(
|
||||
__field(u64, pe)
|
||||
__field(u64, addr)
|
||||
__field(u32, count)
|
||||
__field(u32, incr)
|
||||
__field(u64, flags)
|
||||
__field(bool, direct)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
@ -339,28 +340,32 @@ TRACE_EVENT(amdgpu_vm_set_ptes,
|
||||
__entry->count = count;
|
||||
__entry->incr = incr;
|
||||
__entry->flags = flags;
|
||||
__entry->direct = direct;
|
||||
),
|
||||
TP_printk("pe=%010Lx, addr=%010Lx, incr=%u, flags=%llx, count=%u",
|
||||
__entry->pe, __entry->addr, __entry->incr,
|
||||
__entry->flags, __entry->count)
|
||||
TP_printk("pe=%010Lx, addr=%010Lx, incr=%u, flags=%llx, count=%u, "
|
||||
"direct=%d", __entry->pe, __entry->addr, __entry->incr,
|
||||
__entry->flags, __entry->count, __entry->direct)
|
||||
);
|
||||
|
||||
TRACE_EVENT(amdgpu_vm_copy_ptes,
|
||||
TP_PROTO(uint64_t pe, uint64_t src, unsigned count),
|
||||
TP_ARGS(pe, src, count),
|
||||
TP_PROTO(uint64_t pe, uint64_t src, unsigned count, bool direct),
|
||||
TP_ARGS(pe, src, count, direct),
|
||||
TP_STRUCT__entry(
|
||||
__field(u64, pe)
|
||||
__field(u64, src)
|
||||
__field(u32, count)
|
||||
__field(bool, direct)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->pe = pe;
|
||||
__entry->src = src;
|
||||
__entry->count = count;
|
||||
__entry->direct = direct;
|
||||
),
|
||||
TP_printk("pe=%010Lx, src=%010Lx, count=%u",
|
||||
__entry->pe, __entry->src, __entry->count)
|
||||
TP_printk("pe=%010Lx, src=%010Lx, count=%u, direct=%d",
|
||||
__entry->pe, __entry->src, __entry->count,
|
||||
__entry->direct)
|
||||
);
|
||||
|
||||
TRACE_EVENT(amdgpu_vm_flush,
|
||||
|
@ -89,7 +89,7 @@ static int amdgpu_vm_cpu_update(struct amdgpu_vm_update_params *p,
|
||||
|
||||
pe += (unsigned long)amdgpu_bo_kptr(bo);
|
||||
|
||||
trace_amdgpu_vm_set_ptes(pe, addr, count, incr, flags);
|
||||
trace_amdgpu_vm_set_ptes(pe, addr, count, incr, flags, p->direct);
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
value = p->pages_addr ?
|
||||
|
@ -143,7 +143,7 @@ static void amdgpu_vm_sdma_copy_ptes(struct amdgpu_vm_update_params *p,
|
||||
src += p->num_dw_left * 4;
|
||||
|
||||
pe += amdgpu_bo_gpu_offset(bo);
|
||||
trace_amdgpu_vm_copy_ptes(pe, src, count);
|
||||
trace_amdgpu_vm_copy_ptes(pe, src, count, p->direct);
|
||||
|
||||
amdgpu_vm_copy_pte(p->adev, ib, pe, src, count);
|
||||
}
|
||||
@ -170,7 +170,7 @@ static void amdgpu_vm_sdma_set_ptes(struct amdgpu_vm_update_params *p,
|
||||
struct amdgpu_ib *ib = p->job->ibs;
|
||||
|
||||
pe += amdgpu_bo_gpu_offset(bo);
|
||||
trace_amdgpu_vm_set_ptes(pe, addr, count, incr, flags);
|
||||
trace_amdgpu_vm_set_ptes(pe, addr, count, incr, flags, p->direct);
|
||||
if (count < 3) {
|
||||
amdgpu_vm_write_pte(p->adev, ib, pe, addr | flags,
|
||||
count, incr);
|
||||
|
Loading…
Reference in New Issue
Block a user