diff options
author | Christian König <christian.koenig@amd.com> | 2018-09-26 07:37:24 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-01-14 15:04:48 -0500 |
commit | b56e3270e0f310d66567368ee134660147305724 (patch) | |
tree | ce3b7316ec082c8a58034441eae6bbee18cd50d3 /drivers/gpu/drm/amd/amdgpu | |
parent | b82175750131c9ac228cf08116a208c856d850c9 (diff) |
drm/amdgpu: add the IH to the IV trace
To distinct on which IH ring an IV was found.
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_irq.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 11 |
2 files changed, 9 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c index b7968f426862..b8e543e23166 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | |||
@@ -148,6 +148,8 @@ static void amdgpu_irq_callback(struct amdgpu_device *adev, | |||
148 | entry.iv_entry = (const uint32_t *)&ih->ring[ring_index]; | 148 | entry.iv_entry = (const uint32_t *)&ih->ring[ring_index]; |
149 | amdgpu_ih_decode_iv(adev, &entry); | 149 | amdgpu_ih_decode_iv(adev, &entry); |
150 | 150 | ||
151 | trace_amdgpu_iv(ih - &adev->irq.ih, &entry); | ||
152 | |||
151 | amdgpu_irq_dispatch(adev, &entry); | 153 | amdgpu_irq_dispatch(adev, &entry); |
152 | } | 154 | } |
153 | 155 | ||
@@ -367,8 +369,6 @@ void amdgpu_irq_dispatch(struct amdgpu_device *adev, | |||
367 | bool handled = false; | 369 | bool handled = false; |
368 | int r; | 370 | int r; |
369 | 371 | ||
370 | trace_amdgpu_iv(entry); | ||
371 | |||
372 | if (client_id >= AMDGPU_IRQ_CLIENTID_MAX) { | 372 | if (client_id >= AMDGPU_IRQ_CLIENTID_MAX) { |
373 | DRM_DEBUG("Invalid client_id in IV: %d\n", client_id); | 373 | DRM_DEBUG("Invalid client_id in IV: %d\n", client_id); |
374 | 374 | ||
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h index 626abca770a0..d3ca2424b5fe 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | |||
@@ -76,9 +76,10 @@ TRACE_EVENT(amdgpu_mm_wreg, | |||
76 | ); | 76 | ); |
77 | 77 | ||
78 | TRACE_EVENT(amdgpu_iv, | 78 | TRACE_EVENT(amdgpu_iv, |
79 | TP_PROTO(struct amdgpu_iv_entry *iv), | 79 | TP_PROTO(unsigned ih, struct amdgpu_iv_entry *iv), |
80 | TP_ARGS(iv), | 80 | TP_ARGS(ih, iv), |
81 | TP_STRUCT__entry( | 81 | TP_STRUCT__entry( |
82 | __field(unsigned, ih) | ||
82 | __field(unsigned, client_id) | 83 | __field(unsigned, client_id) |
83 | __field(unsigned, src_id) | 84 | __field(unsigned, src_id) |
84 | __field(unsigned, ring_id) | 85 | __field(unsigned, ring_id) |
@@ -90,6 +91,7 @@ TRACE_EVENT(amdgpu_iv, | |||
90 | __array(unsigned, src_data, 4) | 91 | __array(unsigned, src_data, 4) |
91 | ), | 92 | ), |
92 | TP_fast_assign( | 93 | TP_fast_assign( |
94 | __entry->ih = ih; | ||
93 | __entry->client_id = iv->client_id; | 95 | __entry->client_id = iv->client_id; |
94 | __entry->src_id = iv->src_id; | 96 | __entry->src_id = iv->src_id; |
95 | __entry->ring_id = iv->ring_id; | 97 | __entry->ring_id = iv->ring_id; |
@@ -103,8 +105,9 @@ TRACE_EVENT(amdgpu_iv, | |||
103 | __entry->src_data[2] = iv->src_data[2]; | 105 | __entry->src_data[2] = iv->src_data[2]; |
104 | __entry->src_data[3] = iv->src_data[3]; | 106 | __entry->src_data[3] = iv->src_data[3]; |
105 | ), | 107 | ), |
106 | TP_printk("client_id:%u src_id:%u ring:%u vmid:%u timestamp: %llu pasid:%u src_data: %08x %08x %08x %08x", | 108 | TP_printk("ih:%u client_id:%u src_id:%u ring:%u vmid:%u " |
107 | __entry->client_id, __entry->src_id, | 109 | "timestamp: %llu pasid:%u src_data: %08x %08x %08x %08x", |
110 | __entry->ih, __entry->client_id, __entry->src_id, | ||
108 | __entry->ring_id, __entry->vmid, | 111 | __entry->ring_id, __entry->vmid, |
109 | __entry->timestamp, __entry->pasid, | 112 | __entry->timestamp, __entry->pasid, |
110 | __entry->src_data[0], __entry->src_data[1], | 113 | __entry->src_data[0], __entry->src_data[1], |