aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-09-25 10:11:52 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-09-28 16:16:26 -0400
commitec2f05f034688468ddf42e79755b66bd6dd8281e (patch)
treed91491fca6fb7977a3f96120852de05e569ca4c4 /drivers/gpu/drm/amd/amdgpu
parent186294f9c57856887b0efe3ce0dd8ca66605caef (diff)
drm/amdgpu: improve VM PTE trace points
Use a separate one for the copy operation and log all the interesting parameters. 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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h20
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c10
2 files changed, 25 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
index 0d8d65eb46cd..067e5e683bb3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
@@ -247,7 +247,7 @@ DEFINE_EVENT(amdgpu_vm_mapping, amdgpu_vm_bo_mapping,
247 TP_ARGS(mapping) 247 TP_ARGS(mapping)
248); 248);
249 249
250TRACE_EVENT(amdgpu_vm_set_page, 250TRACE_EVENT(amdgpu_vm_set_ptes,
251 TP_PROTO(uint64_t pe, uint64_t addr, unsigned count, 251 TP_PROTO(uint64_t pe, uint64_t addr, unsigned count,
252 uint32_t incr, uint32_t flags), 252 uint32_t incr, uint32_t flags),
253 TP_ARGS(pe, addr, count, incr, flags), 253 TP_ARGS(pe, addr, count, incr, flags),
@@ -271,6 +271,24 @@ TRACE_EVENT(amdgpu_vm_set_page,
271 __entry->flags, __entry->count) 271 __entry->flags, __entry->count)
272); 272);
273 273
274TRACE_EVENT(amdgpu_vm_copy_ptes,
275 TP_PROTO(uint64_t pe, uint64_t src, unsigned count),
276 TP_ARGS(pe, src, count),
277 TP_STRUCT__entry(
278 __field(u64, pe)
279 __field(u64, src)
280 __field(u32, count)
281 ),
282
283 TP_fast_assign(
284 __entry->pe = pe;
285 __entry->src = src;
286 __entry->count = count;
287 ),
288 TP_printk("pe=%010Lx, src=%010Lx, count=%u",
289 __entry->pe, __entry->src, __entry->count)
290);
291
274TRACE_EVENT(amdgpu_vm_flush, 292TRACE_EVENT(amdgpu_vm_flush,
275 TP_PROTO(uint64_t pd_addr, unsigned ring, unsigned id), 293 TP_PROTO(uint64_t pd_addr, unsigned ring, unsigned id),
276 TP_ARGS(pd_addr, ring, id), 294 TP_ARGS(pd_addr, ring, id),
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 3a43000bdf8c..1405d69fefb5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -487,7 +487,7 @@ static void amdgpu_vm_do_set_ptes(struct amdgpu_pte_update_params *params,
487 unsigned count, uint32_t incr, 487 unsigned count, uint32_t incr,
488 uint32_t flags) 488 uint32_t flags)
489{ 489{
490 trace_amdgpu_vm_set_page(pe, addr, count, incr, flags); 490 trace_amdgpu_vm_set_ptes(pe, addr, count, incr, flags);
491 491
492 if (count < 3) { 492 if (count < 3) {
493 amdgpu_vm_write_pte(params->adev, params->ib, pe, 493 amdgpu_vm_write_pte(params->adev, params->ib, pe,
@@ -516,10 +516,12 @@ static void amdgpu_vm_do_copy_ptes(struct amdgpu_pte_update_params *params,
516 unsigned count, uint32_t incr, 516 unsigned count, uint32_t incr,
517 uint32_t flags) 517 uint32_t flags)
518{ 518{
519 trace_amdgpu_vm_set_page(pe, addr, count, incr, flags); 519 uint64_t src = (params->src + (addr >> 12) * 8);
520 520
521 amdgpu_vm_copy_pte(params->adev, params->ib, pe, 521
522 (params->src + (addr >> 12) * 8), count); 522 trace_amdgpu_vm_copy_ptes(pe, src, count);
523
524 amdgpu_vm_copy_pte(params->adev, params->ib, pe, src, count);
523} 525}
524 526
525/** 527/**