amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Lazar, Lijo" <lijo.lazar@amd.com>
To: Tao Zhou <tao.zhou1@amd.com>,
	amd-gfx@lists.freedesktop.org, Mohammadzafar.Ziya@amd.com,
	hawking.zhang@amd.com, stanley.yang@amd.com, YiPeng.Chai@amd.com
Subject: Re: [PATCH 2/2] drm/amdgpu: refine RAS poison consumption handler
Date: Tue, 10 May 2022 15:44:54 +0530	[thread overview]
Message-ID: <65199aec-f613-215e-4945-7442bd46e027@amd.com> (raw)
In-Reply-To: <20220510062950.11792-2-tao.zhou1@amd.com>



On 5/10/2022 11:59 AM, Tao Zhou wrote:
> Qeury ras status before ras poison consumption handling, add more
> comment and log.
> 
> Signed-off-by: Tao Zhou <tao.zhou1@amd.com>

Series is :
	Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>

Thanks,
Lijo

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 43 +++++++++++++++----------
>   1 file changed, 26 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index 91d9e9969b4e..a653cf3b3d13 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -1538,33 +1538,42 @@ void amdgpu_ras_interrupt_fatal_error_handler(struct amdgpu_device *adev)
>   static void amdgpu_ras_interrupt_poison_consumption_handler(struct ras_manager *obj,
>   				struct amdgpu_iv_entry *entry)
>   {
> -	bool poison_stat = true, need_reset = true;
> +	bool poison_stat = false;
>   	struct amdgpu_device *adev = obj->adev;
>   	struct ras_err_data err_data = {0, 0, 0, NULL};
>   	struct amdgpu_ras_block_object *block_obj =
>   		amdgpu_ras_get_ras_block(adev, obj->head.block, 0);
>   
> -	if (!adev->gmc.xgmi.connected_to_cpu)
> -		amdgpu_umc_poison_handler(adev, &err_data, false);
> -
> -	/* both query_poison_status and handle_poison_consumption are optional */
> -	if (block_obj && block_obj->hw_ops) {
> -		if (block_obj->hw_ops->query_poison_status) {
> -			poison_stat = block_obj->hw_ops->query_poison_status(adev);
> -			if (!poison_stat)
> -				dev_info(adev->dev, "No RAS poison status in %s poison IH.\n",
> -						block_obj->ras_comm.name);
> -		}
> +	if (!block_obj || !block_obj->hw_ops)
> +		return;
>   
> -		if (poison_stat && block_obj->hw_ops->handle_poison_consumption) {
> -			poison_stat = block_obj->hw_ops->handle_poison_consumption(adev);
> -			need_reset = poison_stat;
> +	/* both query_poison_status and handle_poison_consumption are optional,
> +	 * but at least one of them should be implemented if we need poison
> +	 * consumption handler
> +	 */
> +	if (block_obj->hw_ops->query_poison_status) {
> +		poison_stat = block_obj->hw_ops->query_poison_status(adev);
> +		if (!poison_stat) {
> +			/* Not poison consumption interrupt, no need to handle it */
> +			dev_info(adev->dev, "No RAS poison status in %s poison IH.\n",
> +					block_obj->ras_comm.name);
> +
> +			return;
>   		}
>   	}
>   
> -	/* gpu reset is fallback for all failed cases */
> -	if (need_reset)
> +	if (!adev->gmc.xgmi.connected_to_cpu)
> +		amdgpu_umc_poison_handler(adev, &err_data, false);
> +
> +	if (block_obj->hw_ops->handle_poison_consumption)
> +		poison_stat = block_obj->hw_ops->handle_poison_consumption(adev);
> +
> +	/* gpu reset is fallback for failed and default cases */
> +	if (poison_stat) {
> +		dev_info(adev->dev, "GPU reset for %s RAS poison consumption is issued!\n",
> +				block_obj->ras_comm.name);
>   		amdgpu_ras_reset_gpu(adev);
> +	}
>   }
>   
>   static void amdgpu_ras_interrupt_poison_creation_handler(struct ras_manager *obj,
> 

  reply	other threads:[~2022-05-10 10:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10  6:29 [PATCH 1/2] drm/amdgpu: enable RAS IH for poison consumption Tao Zhou
2022-05-10  6:29 ` [PATCH 2/2] drm/amdgpu: refine RAS poison consumption handler Tao Zhou
2022-05-10 10:14   ` Lazar, Lijo [this message]
2022-05-10  6:36 ` [PATCH 1/2] drm/amdgpu: enable RAS IH for poison consumption Ziya, Mohammad zafar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65199aec-f613-215e-4945-7442bd46e027@amd.com \
    --to=lijo.lazar@amd.com \
    --cc=Mohammadzafar.Ziya@amd.com \
    --cc=YiPeng.Chai@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=hawking.zhang@amd.com \
    --cc=stanley.yang@amd.com \
    --cc=tao.zhou1@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).