drm/amdgpu: add the IH to the IV trace
authorChristian König <christian.koenig@amd.com>
Wed, 26 Sep 2018 11:37:24 +0000 (13:37 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 14 Jan 2019 20:04:48 +0000 (15:04 -0500)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h

index b7968f4268625e99f7dc62fdddf3b44a896edae5..b8e543e23166dd5ecb0d3907ca679fd3edf8f60e 100644 (file)
@@ -148,6 +148,8 @@ static void amdgpu_irq_callback(struct amdgpu_device *adev,
        entry.iv_entry = (const uint32_t *)&ih->ring[ring_index];
        amdgpu_ih_decode_iv(adev, &entry);
 
+       trace_amdgpu_iv(ih - &adev->irq.ih, &entry);
+
        amdgpu_irq_dispatch(adev, &entry);
 }
 
@@ -367,8 +369,6 @@ void amdgpu_irq_dispatch(struct amdgpu_device *adev,
        bool handled = false;
        int r;
 
-       trace_amdgpu_iv(entry);
-
        if (client_id >= AMDGPU_IRQ_CLIENTID_MAX) {
                DRM_DEBUG("Invalid client_id in IV: %d\n", client_id);
 
index 626abca770a0367b853000358b580fdc7c82ff22..d3ca2424b5fe9a153a67eb6d77d1f59bcb7ba729 100644 (file)
@@ -76,9 +76,10 @@ TRACE_EVENT(amdgpu_mm_wreg,
 );
 
 TRACE_EVENT(amdgpu_iv,
-           TP_PROTO(struct amdgpu_iv_entry *iv),
-           TP_ARGS(iv),
+           TP_PROTO(unsigned ih, struct amdgpu_iv_entry *iv),
+           TP_ARGS(ih, iv),
            TP_STRUCT__entry(
+                            __field(unsigned, ih)
                             __field(unsigned, client_id)
                             __field(unsigned, src_id)
                             __field(unsigned, ring_id)
@@ -90,6 +91,7 @@ TRACE_EVENT(amdgpu_iv,
                             __array(unsigned, src_data, 4)
                            ),
            TP_fast_assign(
+                          __entry->ih = ih;
                           __entry->client_id = iv->client_id;
                           __entry->src_id = iv->src_id;
                           __entry->ring_id = iv->ring_id;
@@ -103,8 +105,9 @@ TRACE_EVENT(amdgpu_iv,
                           __entry->src_data[2] = iv->src_data[2];
                           __entry->src_data[3] = iv->src_data[3];
                           ),
-           TP_printk("client_id:%u src_id:%u ring:%u vmid:%u timestamp: %llu pasid:%u src_data: %08x %08x %08x %08x",
-                     __entry->client_id, __entry->src_id,
+           TP_printk("ih:%u client_id:%u src_id:%u ring:%u vmid:%u "
+                     "timestamp: %llu pasid:%u src_data: %08x %08x %08x %08x",
+                     __entry->ih, __entry->client_id, __entry->src_id,
                      __entry->ring_id, __entry->vmid,
                      __entry->timestamp, __entry->pasid,
                      __entry->src_data[0], __entry->src_data[1],