[PATCH 08/11] drm/amdgpu: add the IH to the IV trace

Alex Deucher alexdeucher at gmail.com
Fri Nov 30 16:01:31 UTC 2018


On Fri, Nov 30, 2018 at 7:36 AM Christian König
<ckoenig.leichtzumerken at gmail.com> wrote:
>
> To distinct on which IH ring an IV was found.
>
> Signed-off-by: Christian König <christian.koenig at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c   |  4 ++--
>  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 318874952bc2..127ed7de841d 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,
>         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_ERROR("Invalid client_id in IV: %d\n", client_id);
>                 return;
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
> index 626abca770a0..6e388d7753c1 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,
>  );
>
>  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],
> --
> 2.17.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list