drm/amdgpu: Allow to reset to EERPOM table.
Subsystems (2)
PATCH 1/1 drm/amdgpu: Allow to reset to EERPOM table.
The table grows quickly during debug/development effort when multiple RAS errors are injected. Allow to avoid this by setting table header back to empty if needed.
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 ++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -0
@@ -169,6 +169,7 @@ extern int amdgpu_discovery;extern int amdgpu_mes;extern int amdgpu_noretry;extern int amdgpu_force_asic_type; +extern int amdgpu_ras_eeprom_reset;#ifdef CONFIG_DRM_AMDGPU_SI extern int amdgpu_si_support;
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +8 -0
@@ -145,6 +145,7 @@ int amdgpu_discovery = -1;int amdgpu_mes =0 ;int amdgpu_noretry =1 ;int amdgpu_force_asic_type =-1 ; +int amdgpu_ras_eeprom_reset =-1 ;struct amdgpu_mgpu_info mgpu_info = { .mutex =__MUTEX_INITIALIZER (mgpu_info.mutex),
@@ -530,6 +531,13 @@ MODULE_PARM_DESC(ras_mask, "Mask of RAS features to enable (default 0xffffffff),module_param_named (ras_mask, amdgpu_ras_mask, uint,0444 );/** +* DOC: ras_eeprom_reset (int) +* Reset EEPROM table to zerro entries. +*/ +MODULE_PARM_DESC (ras_eeprom_reset,"Reset RAS EEPROM table to zerro entries (1 = reset, -1 = auto (default - don't reset)" ); +module_param_named (ras_eeprom_reset, amdgpu_ras_eeprom_reset, int,0444 ); + +/** * DOC: si_support (int) * Set SI support driver. This parameter works after set config CONFIG_DRM_AMDGPU_SI. For SI asic, when radeon driver is enabled, * set value 0 to use radeon driver, while set value 1 to use amdgpu driver. The default is using radeon driver when it available,
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +2 -1
@@ -140,7 +140,8 @@ int amdgpu_ras_eeprom_init(struct amdgpu_ras_eeprom_control *control)__decode_table_header_from_buff (hdr, &buff[2 ]); -if (hdr->header ==EEPROM_TABLE_HDR_VAL ) { +if (amdgpu_ras_eeprom_reset !=1 && + hdr->header ==EEPROM_TABLE_HDR_VAL ) { control->num_recs = (hdr->tbl_size -EEPROM_TABLE_HEADER_SIZE ) /EEPROM_TABLE_RECORD_SIZE ; DRM_DEBUG_DRIVER("Found existing EEPROM table with %d records",
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1567782810-22378-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org
Hi Andrey, spotted a typo below, also typo in the title s/EERPOM/EEPROM/
Regards
Nils
Den fre 6 sep. 2019 17:13Andrey Grodzovsky <[email protected]> skrev:
Quoted 38 lines
The table grows quickly during debug/development effort when multiple RAS errors are injected. Allow to avoid this by setting table header back to empty if needed.
Signed-off-by Andrey Grodzovsky <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 ++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +1
-0@@ -169,6 +169,7 @@ extern int amdgpu_discovery;extern int amdgpu_mes;extern int amdgpu_noretry;extern int amdgpu_force_asic_type; +extern int amdgpu_ras_eeprom_reset;#ifdef CONFIG_DRM_AMDGPU_SI extern int amdgpu_si_support;drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1
-0@@ -145,6 +145,7 @@ int amdgpu_discovery = -1;int amdgpu_mes =0 ;int amdgpu_noretry =1 ;int amdgpu_force_asic_type =-1 ; +int amdgpu_ras_eeprom_reset =-1 ;struct amdgpu_mgpu_info mgpu_info = { .mutex =__MUTEX_INITIALIZER (mgpu_info.mutex),
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c MODULE_PARM_DESC(ras_mask, "Mask of RAS features to · line 540
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +4
-0@@ -530,6 +531,13 @@ MODULE_PARM_DESC(ras_mask, "Mask of RAS features to enable (default 0xffffffff), module_param_named(ras_mask, amdgpu_ras_mask, uint, 0444); /** + * DOC: ras_eeprom_reset (int) + * Reset EEPROM table to zerro entries. + */ +MODULE_PARM_DESC(ras_eeprom_reset, "Reset RAS EEPROM table to zerro entries (1 = reset, -1 = auto (default - don't reset)");
s/zerro/zero/ in two places
+module_param_named(ras_eeprom_reset, amdgpu_ras_eeprom_reset, int, 0444);
Quoted 28 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2
-0+ +/** * DOC: si_support (int) * Set SI support driver. This parameter works after set config
CONFIG_DRM_AMDGPU_SI. For SI asic, when radeon driver is enabled,
* set value 0 to use radeon driver, while set value 1 to use amdgpu
driver. The default is using radeon driver when it available,drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +2
-1@@ -140,7 +140,8 @@ int amdgpu_ras_eeprom_init(struct amdgpu_ras_eeprom_control *control) __decode_table_header_from_buff(hdr, &buff[2]); -if (hdr->header ==EEPROM_TABLE_HDR_VAL ) { +if (amdgpu_ras_eeprom_reset !=1 && + hdr->header ==EEPROM_TABLE_HDR_VAL ) { control->num_recs = (hdr->tbl_size -
EEPROM_TABLE_HEADER_SIZE) /
EEPROM_TABLE_RECORD_SIZE;
DRM_DEBUG_DRIVER("Found existing EEPROM table with %d
records",
--
2.7.4
Quoted 4 lines
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 5 lines · Andrey Grodzovsky
The table grows quickly during debug/development effort when multiple RAS errors are injected. Allow to avoid this by setting table header back to empty if needed.
Please make this a debugfs file rather than a module parameter so that it an be updated at runtime and more easily handled on a per card basis.
Alex
Quoted 62 lines
Signed-off-by Andrey Grodzovsky <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 ++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +1
-0@@ -169,6 +169,7 @@ extern int amdgpu_discovery;extern int amdgpu_mes;extern int amdgpu_noretry;extern int amdgpu_force_asic_type; +extern int amdgpu_ras_eeprom_reset;#ifdef CONFIG_DRM_AMDGPU_SI extern int amdgpu_si_support;drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +8
-0@@ -145,6 +145,7 @@ int amdgpu_discovery = -1;int amdgpu_mes =0 ;int amdgpu_noretry =1 ;int amdgpu_force_asic_type =-1 ; +int amdgpu_ras_eeprom_reset =-1 ;struct amdgpu_mgpu_info mgpu_info = { .mutex =__MUTEX_INITIALIZER (mgpu_info.mutex),@@ -530,6 +531,13 @@ MODULE_PARM_DESC(ras_mask, "Mask of RAS features to enable (default 0xffffffff),module_param_named (ras_mask, amdgpu_ras_mask, uint,0444 );/** +* DOC: ras_eeprom_reset (int) +* Reset EEPROM table to zerro entries. +*/ +MODULE_PARM_DESC (ras_eeprom_reset,"Reset RAS EEPROM table to zerro entries (1 = reset, -1 = auto (default - don't reset)" ); +module_param_named (ras_eeprom_reset, amdgpu_ras_eeprom_reset, int,0444 ); + +/** * DOC: si_support (int) * Set SI support driver. This parameter works after set config CONFIG_DRM_AMDGPU_SI. For SI asic, when radeon driver is enabled, * set value 0 to use radeon driver, while set value 1 to use amdgpu driver. The default is using radeon driver when it available, drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +2
-2@@ -140,7 +140,8 @@ int amdgpu_ras_eeprom_init(struct amdgpu_ras_eeprom_control *control)__decode_table_header_from_buff (hdr, &buff[2 ]); -if (hdr->header ==EEPROM_TABLE_HDR_VAL ) { +if (amdgpu_ras_eeprom_reset !=1 && + hdr->header ==EEPROM_TABLE_HDR_VAL ) { control->num_recs = (hdr->tbl_size -EEPROM_TABLE_HEADER_SIZE ) /EEPROM_TABLE_RECORD_SIZE ; DRM_DEBUG_DRIVER("Found existing EEPROM table with %d records", --2.7.4
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): CADnq5_Op_OnBdKrLpKD4_WZYd_+Jxd9NBcGfpmD8+4-qr6S8kw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
What about adding new value to existing ras_ctl debugfs file ?
Andrey
________________________________________
From: Alex Deucher <[email protected]>
Sent: 07 September 2019 09:42:47
To: Grodzovsky, Andrey
Cc: amd-gfx list; Zhou1, Tao; Chen, Guchun
Subject: Re: [PATCH] drm/amdgpu: Allow to reset to EERPOM table.
Quoted 5 lines · Andrey Grodzovsky
The table grows quickly during debug/development effort when multiple RAS errors are injected. Allow to avoid this by setting table header back to empty if needed.
Please make this a debugfs file rather than a module parameter so that it an be updated at runtime and more easily handled on a per card basis.
Alex
Quoted 62 lines
Signed-off-by Andrey Grodzovsky <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 ++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +1
-0@@ -169,6 +169,7 @@ extern int amdgpu_discovery;extern int amdgpu_mes;extern int amdgpu_noretry;extern int amdgpu_force_asic_type; +extern int amdgpu_ras_eeprom_reset;#ifdef CONFIG_DRM_AMDGPU_SI extern int amdgpu_si_support;drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +8
-0@@ -145,6 +145,7 @@ int amdgpu_discovery = -1;int amdgpu_mes =0 ;int amdgpu_noretry =1 ;int amdgpu_force_asic_type =-1 ; +int amdgpu_ras_eeprom_reset =-1 ;struct amdgpu_mgpu_info mgpu_info = { .mutex =__MUTEX_INITIALIZER (mgpu_info.mutex),@@ -530,6 +531,13 @@ MODULE_PARM_DESC(ras_mask, "Mask of RAS features to enable (default 0xffffffff),module_param_named (ras_mask, amdgpu_ras_mask, uint,0444 );/** +* DOC: ras_eeprom_reset (int) +* Reset EEPROM table to zerro entries. +*/ +MODULE_PARM_DESC (ras_eeprom_reset,"Reset RAS EEPROM table to zerro entries (1 = reset, -1 = auto (default - don't reset)" ); +module_param_named (ras_eeprom_reset, amdgpu_ras_eeprom_reset, int,0444 ); + +/** * DOC: si_support (int) * Set SI support driver. This parameter works after set config CONFIG_DRM_AMDGPU_SI. For SI asic, when radeon driver is enabled, * set value 0 to use radeon driver, while set value 1 to use amdgpu driver. The default is using radeon driver when it available, drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +2
-2@@ -140,7 +140,8 @@ int amdgpu_ras_eeprom_init(struct amdgpu_ras_eeprom_control *control)__decode_table_header_from_buff (hdr, &buff[2 ]); -if (hdr->header ==EEPROM_TABLE_HDR_VAL ) { +if (amdgpu_ras_eeprom_reset !=1 && + hdr->header ==EEPROM_TABLE_HDR_VAL ) { control->num_recs = (hdr->tbl_size -EEPROM_TABLE_HEADER_SIZE ) /EEPROM_TABLE_RECORD_SIZE ; DRM_DEBUG_DRIVER("Found existing EEPROM table with %d records", --2.7.4
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): CY4PR12MB14468755886544D354D77012EAB50-rpdhrqHFk070Y0OdeIqGUgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
We should actually try to get rid of the ras_ctl debugfs in the long term.
Overloading that with different functionality was a really bad idea in the first place.
Christian.
Am 07.09.19 um 19:50 schrieb Grodzovsky, Andrey:
Quoted 85 lines
What about adding new value to existing
ras_ctldebugfs file ?Andrey
________________________________________
From: Alex Deucher <[email protected]>
Sent: 07 September 2019 09:42:47
To: Grodzovsky, Andrey
Cc: amd-gfx list; Zhou1, Tao; Chen, Guchun
Subject: Re: [PATCH] drm/amdgpu: Allow to reset to EERPOM table.Quoted 4 lines · Andrey Grodzovsky
The table grows quickly during debug/development effort when multiple RAS errors are injected. Allow to avoid this by setting table header back to empty if needed.
Please make this a debugfs file rather than a module parameter so that it an be updated at runtime and more easily handled on a per card basis.
Alex
Quoted 62 lines
Signed-off-by Andrey Grodzovsky <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 ++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +1
-0@@ -169,6 +169,7 @@ extern int amdgpu_discovery;extern int amdgpu_mes;extern int amdgpu_noretry;extern int amdgpu_force_asic_type; +extern int amdgpu_ras_eeprom_reset;#ifdef CONFIG_DRM_AMDGPU_SI extern int amdgpu_si_support;drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +8
-0@@ -145,6 +145,7 @@ int amdgpu_discovery = -1;int amdgpu_mes =0 ;int amdgpu_noretry =1 ;int amdgpu_force_asic_type =-1 ; +int amdgpu_ras_eeprom_reset =-1 ;struct amdgpu_mgpu_info mgpu_info = { .mutex =__MUTEX_INITIALIZER (mgpu_info.mutex),@@ -530,6 +531,13 @@ MODULE_PARM_DESC(ras_mask, "Mask of RAS features to enable (default 0xffffffff),module_param_named (ras_mask, amdgpu_ras_mask, uint,0444 );/** +* DOC: ras_eeprom_reset (int) +* Reset EEPROM table to zerro entries. +*/ +MODULE_PARM_DESC (ras_eeprom_reset,"Reset RAS EEPROM table to zerro entries (1 = reset, -1 = auto (default - don't reset)" ); +module_param_named (ras_eeprom_reset, amdgpu_ras_eeprom_reset, int,0444 ); + +/** * DOC: si_support (int) * Set SI support driver. This parameter works after set config CONFIG_DRM_AMDGPU_SI. For SI asic, when radeon driver is enabled, * set value 0 to use radeon driver, while set value 1 to use amdgpu driver. The default is using radeon driver when it available, drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +2
-2@@ -140,7 +140,8 @@ int amdgpu_ras_eeprom_init(struct amdgpu_ras_eeprom_control *control)__decode_table_header_from_buff (hdr, &buff[2 ]); -if (hdr->header ==EEPROM_TABLE_HDR_VAL ) { +if (amdgpu_ras_eeprom_reset !=1 && + hdr->header ==EEPROM_TABLE_HDR_VAL ) { control->num_recs = (hdr->tbl_size -EEPROM_TABLE_HEADER_SIZE ) /EEPROM_TABLE_RECORD_SIZE ; DRM_DEBUG_DRIVER("Found existing EEPROM table with %d records", --2.7.4
Quoted 8 lines
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx