[PATCH 1/2] drm/amdgpu: decode the ctxid for SMC to host IH

Quan, Evan Evan.Quan at amd.com
Sat May 9 04:33:59 UTC 2020


[AMD Official Use Only - Internal Distribution Only]

OK. Reasonable. Will update the patches.

BR,
Evan
-----Original Message-----
From: Christian König <ckoenig.leichtzumerken at gmail.com>
Sent: Friday, May 8, 2020 6:53 PM
To: Quan, Evan <Evan.Quan at amd.com>; amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>
Subject: Re: [PATCH 1/2] drm/amdgpu: decode the ctxid for SMC to host IH

Am 08.05.20 um 12:02 schrieb Evan Quan:
> Driver needs that to tell the different events raised from SMC.

NAK, the ctxid is filled in by the SMC and not by the IH. We only decode fields here which are filled in by the IH.

Just use src_data[0] when you need some SMC specific bits.

Christian.

>
> Change-Id: I0e44e22527182fbb45a2db4fc3b1cd73fb17ba33
> Signed-off-by: Evan Quan <evan.quan at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h | 1 +
>   drivers/gpu/drm/amd/amdgpu/navi10_ih.c  | 1 +
>   drivers/gpu/drm/amd/amdgpu/vega10_ih.c  | 1 +
>   3 files changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h
> index 7b1762b1c595..965875b8bf93 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h
> @@ -55,6 +55,7 @@ struct amdgpu_iv_entry {
>   unsigned timestamp_src;
>   unsigned pasid;
>   unsigned pasid_src;
> +unsigned ctxid; /* for SMC to Host interrupt */
>   unsigned src_data[AMDGPU_IRQ_SRC_DATA_MAX_SIZE_DW];
>   const uint32_t *iv_entry;
>   };
> diff --git a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
> b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
> index f97857ed3c7e..932dc3eabbe2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
> +++ b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
> @@ -470,6 +470,7 @@ static void navi10_ih_decode_iv(struct amdgpu_device *adev,
>   entry->timestamp_src = dw[2] >> 31;
>   entry->pasid = dw[3] & 0xffff;
>   entry->pasid_src = dw[3] >> 31;
> +entry->ctxid = dw[4];
>   entry->src_data[0] = dw[4];
>   entry->src_data[1] = dw[5];
>   entry->src_data[2] = dw[6];
> diff --git a/drivers/gpu/drm/amd/amdgpu/vega10_ih.c
> b/drivers/gpu/drm/amd/amdgpu/vega10_ih.c
> index 407c6093c2ec..e46d1f9f62ca 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vega10_ih.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vega10_ih.c
> @@ -460,6 +460,7 @@ static void vega10_ih_decode_iv(struct amdgpu_device *adev,
>   entry->timestamp_src = dw[2] >> 31;
>   entry->pasid = dw[3] & 0xffff;
>   entry->pasid_src = dw[3] >> 31;
> +entry->ctxid = dw[4];
>   entry->src_data[0] = dw[4];
>   entry->src_data[1] = dw[5];
>   entry->src_data[2] = dw[6];



More information about the amd-gfx mailing list