All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guchun Chen <guchun.chen@amd.com>
To: amd-gfx@lists.freedesktop.org, alexander.deucher@amd.com,
	Hawking.Zhang@amd.com, Dennis.Li@amd.com,
	andrey.grodzovsky@amd.com, Tao.Zhou1@amd.com,
	John.Clements@amd.com, lijo.lazar@amd.com,
	christian.koenig@amd.com, stanley.yang@amd.com
Cc: Guchun Chen <guchun.chen@amd.com>
Subject: [PATCH 01/12] drm/amdgpu: add bad page count threshold in module parameter
Date: Tue, 28 Jul 2020 15:49:23 +0800	[thread overview]
Message-ID: <20200728074934.12490-2-guchun.chen@amd.com> (raw)
In-Reply-To: <20200728074934.12490-1-guchun.chen@amd.com>

bad_page_threshold could be configured to enable/disable the
associated bad page retirement feature in RAS.

When it's -1, ras will use typical bad page failure value to
handle bad page retirement.

When it's 0, disable bad page retirement, and no bad page
will be recorded and saved.

For other valid value, driver will use this manual value
as the threshold value of totoal bad pages.

v2: correct documentation of this parameter.
v3: remove confused statement in documentation.

Signed-off-by: Guchun Chen <guchun.chen@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h     |  1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 11 +++++++++++
 2 files changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 06bfb8658dec..bb83ffb5e26a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -181,6 +181,7 @@ extern uint amdgpu_dm_abm_level;
 extern struct amdgpu_mgpu_info mgpu_info;
 extern int amdgpu_ras_enable;
 extern uint amdgpu_ras_mask;
+extern int amdgpu_bad_page_threshold;
 extern int amdgpu_async_gfx_ring;
 extern int amdgpu_mcbp;
 extern int amdgpu_discovery;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index d28b95f721c4..820a28c9e957 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -161,6 +161,7 @@ struct amdgpu_mgpu_info mgpu_info = {
 };
 int amdgpu_ras_enable = -1;
 uint amdgpu_ras_mask = 0xffffffff;
+int amdgpu_bad_page_threshold = -1;
 
 /**
  * DOC: vramlimit (int)
@@ -801,6 +802,16 @@ module_param_named(tmz, amdgpu_tmz, int, 0444);
 MODULE_PARM_DESC(reset_method, "GPU reset method (-1 = auto (default), 0 = legacy, 1 = mode0, 2 = mode1, 3 = mode2, 4 = baco)");
 module_param_named(reset_method, amdgpu_reset_method, int, 0444);
 
+/**
+ * DOC: bad_page_threshold (int)
+ * Bad page threshold is to specify the threshold value of faulty pages
+ * detected by RAS ECC, that may result in GPU entering bad status if total
+ * faulty pages by ECC exceed threshold value and leave it for user's further
+ * check.
+ */
+MODULE_PARM_DESC(bad_page_threshold, "Bad page threshold(-1 = auto(default typical value), 0 = disable bad page retirement)");
+module_param_named(bad_page_threshold, amdgpu_bad_page_threshold, int, 0444);
+
 static const struct pci_device_id pciidlist[] = {
 #ifdef  CONFIG_DRM_AMDGPU_SI
 	{0x1002, 0x6780, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI},
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2020-07-28  7:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-28  7:49 [PATCH 00/12] BAD GPU retirement policy by total bad pages Guchun Chen
2020-07-28  7:49 ` Guchun Chen [this message]
2020-07-28  7:49 ` [PATCH 02/12] drm/amdgpu: validate bad page threshold in ras Guchun Chen
2020-07-28  7:49 ` [PATCH 03/12] drm/amdgpu: add bad gpu tag definition Guchun Chen
2020-07-28  7:49 ` [PATCH 04/12] drm/amdgpu: break driver init process when it's bad GPU Guchun Chen
2020-07-28  9:43   ` Li, Dennis
2020-07-28 14:11     ` Chen, Guchun
2020-07-28  7:49 ` [PATCH 05/12] drm/amdgpu: skip bad page reservation once issuing from eeprom write Guchun Chen
2020-07-28  7:49 ` [PATCH 06/12] drm/amdgpu: schedule ras recovery when reaching bad page threshold Guchun Chen
2020-07-28  7:49 ` [PATCH 07/12] drm/amdgpu: break GPU recovery once it's in bad state Guchun Chen
2020-07-28  7:49 ` [PATCH 08/12] drm/amdgpu: restore ras flags when user resets eeprom Guchun Chen
2020-07-28  7:49 ` [PATCH 09/12] drm/amdgpu: define one macro for RAS's sysfs/debugfs name Guchun Chen
2020-07-28  7:55   ` Christian König
2020-07-28  8:00     ` Chen, Guchun
2020-07-28  7:49 ` [PATCH 10/12] drm/amdgpu: decouple sysfs creating of bad page node Guchun Chen
2020-07-28  7:49 ` [PATCH 11/12] drm/amdgpu: disable page reservation when amdgpu_bad_page_threshold = 0 Guchun Chen
2020-07-28  7:49 ` [PATCH 12/12] drm/amdgpu: reset eeprom once specifying one bigger threshold Guchun Chen
2020-07-29  2:56 [PATCH 00/12] BAD GPU retirement policy by total bad pages Guchun Chen
2020-07-29  2:56 ` [PATCH 01/12] drm/amdgpu: add bad page count threshold in module parameter Guchun Chen

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=20200728074934.12490-2-guchun.chen@amd.com \
    --to=guchun.chen@amd.com \
    --cc=Dennis.Li@amd.com \
    --cc=Hawking.Zhang@amd.com \
    --cc=John.Clements@amd.com \
    --cc=Tao.Zhou1@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=andrey.grodzovsky@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=lijo.lazar@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.