AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Zhigang Luo <Zhigang.Luo@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: YiPeng.Chai@amd.com, Sashank.Saye@amd.com,
	Victor Skvortsov <victor.skvortsov@amd.com>,
	Hawking.Zhang@amd.com
Subject: [PATCH 2/3] drm/amdgpu: Add RAS_POISON_READY host response message
Date: Wed, 24 Jan 2024 18:21:42 -0500	[thread overview]
Message-ID: <20240124232143.7201-2-Zhigang.Luo@amd.com> (raw)
In-Reply-To: <20240124232143.7201-1-Zhigang.Luo@amd.com>

From: Victor Skvortsov <victor.skvortsov@amd.com>

In a non-FLR page avoidance scenario, the host driver will
provide the bad pages in the pf2vf exchange region.

Adding a new host response message to indicate when the
pf2vf exchange region has been updated.

Signed-off-by: Victor Skvortsov <victor.skvortsov@amd.com>
Change-Id: I58d5d11d959d91ad5723d33fddb93570c259e245
---
 drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 5 +++++
 drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h | 1 +
 2 files changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c b/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
index d0a018da3c7a..c49bf87d4b0b 100644
--- a/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
+++ b/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
@@ -170,6 +170,9 @@ static int xgpu_nv_send_access_requests_with_param(struct amdgpu_device *adev,
 	case IDH_REQ_GPU_INIT_DATA:
 		event = IDH_REQ_GPU_INIT_DATA_READY;
 		break;
+	case IDH_RAS_POISON:
+		if (data1 != 0)
+			event = IDH_RAS_POISON_READY;
 	default:
 		break;
 	}
@@ -437,8 +440,10 @@ static void xgpu_nv_ras_poison_handler(struct amdgpu_device *adev,
 	if (amdgpu_ip_version(adev, UMC_HWIP, 0) < IP_VERSION(12, 0, 0)) {
 		xgpu_nv_send_access_requests(adev, IDH_RAS_POISON);
 	} else {
+		amdgpu_virt_fini_data_exchange(adev);
 		xgpu_nv_send_access_requests_with_param(adev,
 					IDH_RAS_POISON,	block, 0, 0);
+		amdgpu_virt_init_data_exchange(adev);
 	}
 }
 
diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h b/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h
index d0221ce08769..1e8fd90cab43 100644
--- a/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h
+++ b/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h
@@ -51,6 +51,7 @@ enum idh_event {
 	IDH_FAIL,
 	IDH_QUERY_ALIVE,
 	IDH_REQ_GPU_INIT_DATA_READY,
+	IDH_RAS_POISON_READY,
 
 	IDH_TEXT_MESSAGE = 255,
 };
-- 
2.25.1


  reply	other threads:[~2024-01-24 23:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24 23:21 [PATCH 1/3] drm/amdgpu: Support passing poison consumption ras block to SRIOV Zhigang Luo
2024-01-24 23:21 ` Zhigang Luo [this message]
2024-01-24 23:21 ` [PATCH 3/3] amdgpu/drm: Use vram manager for virtualization page retirement Zhigang Luo
2024-01-26 15:21   ` Christian König
2024-01-25  3:25 ` [PATCH 1/3] drm/amdgpu: Support passing poison consumption ras block to SRIOV Zhang, Hawking

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=20240124232143.7201-2-Zhigang.Luo@amd.com \
    --to=zhigang.luo@amd.com \
    --cc=Hawking.Zhang@amd.com \
    --cc=Sashank.Saye@amd.com \
    --cc=YiPeng.Chai@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=victor.skvortsov@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