amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Tao Zhou <tao.zhou1@amd.com>
To: <amd-gfx@lists.freedesktop.org>, <Mohammadzafar.Ziya@amd.com>,
	<Lijo.Lazar@amd.com>, <hawking.zhang@amd.com>,
	<stanley.yang@amd.com>, <YiPeng.Chai@amd.com>
Cc: Tao Zhou <tao.zhou1@amd.com>
Subject: [PATCH 1/2] drm/amdgpu: enable RAS IH for poison consumption
Date: Tue, 10 May 2022 14:29:49 +0800	[thread overview]
Message-ID: <20220510062950.11792-1-tao.zhou1@amd.com> (raw)

Enable RAS IH if poison consumption handler is implemented.

Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index cac56f830aed..91d9e9969b4e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -2516,7 +2516,9 @@ int amdgpu_ras_block_late_init(struct amdgpu_device *adev,
 		return 0;
 
 	ras_obj = container_of(ras_block, struct amdgpu_ras_block_object, ras_comm);
-	if (ras_obj->ras_cb) {
+	if (ras_obj->ras_cb || (ras_obj->hw_ops &&
+	    (ras_obj->hw_ops->query_poison_status ||
+	    ras_obj->hw_ops->handle_poison_consumption))) {
 		r = amdgpu_ras_interrupt_add_handler(adev, ras_block);
 		if (r)
 			goto cleanup;
-- 
2.35.1


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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10  6:29 Tao Zhou [this message]
2022-05-10  6:29 ` [PATCH 2/2] drm/amdgpu: refine RAS poison consumption handler Tao Zhou
2022-05-10 10:14   ` Lazar, Lijo
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=20220510062950.11792-1-tao.zhou1@amd.com \
    --to=tao.zhou1@amd.com \
    --cc=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 \
    /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).