AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Xiang Liu <xiang.liu@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: <Hawking.Zhang@amd.com>, <Tao.Zhou1@amd.com>,
	<Stanley.Yang@amd.com>, <YiPeng.Chai@amd.com>,
	Xiang Liu <xiang.liu@amd.com>
Subject: [PATCH 1/3] drm/amd/ras: report threshold status after bad pages are saved
Date: Tue, 29 Sep 2026 20:02:14 +0800	[thread overview]
Message-ID: <20260929120216.1230237-1-xiang.liu@amd.com> (raw)

The EEPROM table is tagged as over threshold while the new bad page
records are written out, so the table status queried while the records
are only queued still reports the table as writable. The device is
therefore never flagged as having reached the threshold and neither the
in-band CPER record nor the out-of-band RMA reason is emitted.

Re-evaluate the table status once the records have been appended, so the
report is driven by the state that was just persisted.

Signed-off-by: Xiang Liu <xiang.liu@amd.com>
---
 drivers/gpu/drm/amd/ras/core/ras_umc.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/amd/ras/core/ras_umc.c b/drivers/gpu/drm/amd/ras/core/ras_umc.c
index b3f30da19a78..c2663f84a883 100644
--- a/drivers/gpu/drm/amd/ras/core/ras_umc.c
+++ b/drivers/gpu/drm/amd/ras/core/ras_umc.c
@@ -848,6 +848,13 @@ static int ras_umc_save_bad_pages(struct ras_core_context *ras_core)
 		RAS_DEV_INFO(ras_core->dev, "Saved %d pages to EEPROM table.\n",
 			ras_umc_count_valid_pages(ras_core,
 				&data->bps[eeprom_record_num], save_count));
+
+		/* The table is only tagged as over threshold while the new
+		 * records are written out, so the status has to be
+		 * re-evaluated here.
+		 */
+		ras_eeprom_mgr_check_and_report_status(ras_core, true);
+		ras_umc_report_badpage_info(ras_core);
 	}
 
 exit:
-- 
2.34.1


             reply	other threads:[~2026-09-29 12:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 12:02 Xiang Liu [this message]
2026-09-29 12:02 ` [PATCH 2/3] drm/amd/ras: report the bad page threshold in every work mode Xiang Liu
2026-09-29 12:02 ` [PATCH 3/3] drm/amd/ras: init reserved vram size before RAS core sw init Xiang Liu
2026-10-09  9:54   ` Zhou1, Tao

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=20260929120216.1230237-1-xiang.liu@amd.com \
    --to=xiang.liu@amd.com \
    --cc=Hawking.Zhang@amd.com \
    --cc=Stanley.Yang@amd.com \
    --cc=Tao.Zhou1@amd.com \
    --cc=YiPeng.Chai@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /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