AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] drm/amdkfd: Use a new capability bit for SRAM ECC
@ 2020-09-10 19:06 Felix Kuehling
  0 siblings, 0 replies; 3+ messages in thread
From: Felix Kuehling @ 2020-09-10 19:06 UTC (permalink / raw)
  To: amd-gfx; +Cc: Stanley.Yang, Hawking.Zhang

Existing, buggy user mode breaks when SRAM ECC is correctly reported as
"enabled". To avoid breaking existing user mode, deprecate that bit and
leave it as 0. Define a new bit to report the actual SRAM ECC mode that
new, correct user mode can use in the future.

Fixes: 7ec177bdcfc1 ("drm/amdkfd: fix set kfd node ras properties value")
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_topology.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.h b/drivers/gpu/drm/amd/amdkfd/kfd_topology.h
index 326d9b26b7aa..690cc561955c 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.h
@@ -47,13 +47,14 @@
 #define HSA_CAP_DOORBELL_TYPE_2_0		0x2
 #define HSA_CAP_AQL_QUEUE_DOUBLE_MAP		0x00004000
 
-#define HSA_CAP_SRAM_EDCSUPPORTED		0x00080000
+#define HSA_CAP_RESERVED_WAS_SRAM_EDCSUPPORTED	0x00080000 /* Old buggy user mode depends on this being O */
 #define HSA_CAP_MEM_EDCSUPPORTED		0x00100000
 #define HSA_CAP_RASEVENTNOTIFY			0x00200000
 #define HSA_CAP_ASIC_REVISION_MASK		0x03c00000
 #define HSA_CAP_ASIC_REVISION_SHIFT		22
+#define HSA_CAP_SRAM_EDCSUPPORTED		0x04000000
 
-#define HSA_CAP_RESERVED			0xfc078000
+#define HSA_CAP_RESERVED			0xf80f8000
 
 struct kfd_node_properties {
 	uint64_t hive_id;
-- 
2.17.1

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 1/1] drm/amdkfd: Use a new capability bit for SRAM ECC
@ 2021-02-26 22:45 Felix Kuehling
  2021-03-03 16:27 ` Russell, Kent
  0 siblings, 1 reply; 3+ messages in thread
From: Felix Kuehling @ 2021-02-26 22:45 UTC (permalink / raw)
  To: amd-gfx

Existing, buggy user mode breaks when SRAM ECC is correctly reported as
"enabled". To avoid breaking existing user mode, deprecate that bit and
leave it as 0. Define a new bit to report the actual SRAM ECC mode that
new, correct user mode can use in the future.

Fixes: 7ec177bdcfc1 ("drm/amdkfd: fix set kfd node ras properties value")
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_topology.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.h b/drivers/gpu/drm/amd/amdkfd/kfd_topology.h
index 416fd910e12e..b8b68087bd7a 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.h
@@ -47,13 +47,14 @@
 #define HSA_CAP_DOORBELL_TYPE_2_0		0x2
 #define HSA_CAP_AQL_QUEUE_DOUBLE_MAP		0x00004000
 
-#define HSA_CAP_SRAM_EDCSUPPORTED		0x00080000
+#define HSA_CAP_RESERVED_WAS_SRAM_EDCSUPPORTED	0x00080000 /* Old buggy user mode depends on this being 0 */
 #define HSA_CAP_MEM_EDCSUPPORTED		0x00100000
 #define HSA_CAP_RASEVENTNOTIFY			0x00200000
 #define HSA_CAP_ASIC_REVISION_MASK		0x03c00000
 #define HSA_CAP_ASIC_REVISION_SHIFT		22
+#define HSA_CAP_SRAM_EDCSUPPORTED		0x04000000
 
-#define HSA_CAP_RESERVED			0xfc078000
+#define HSA_CAP_RESERVED			0xf80f8000
 
 struct kfd_node_properties {
 	uint64_t hive_id;
-- 
2.30.0

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH 1/1] drm/amdkfd: Use a new capability bit for SRAM ECC
  2021-02-26 22:45 Felix Kuehling
@ 2021-03-03 16:27 ` Russell, Kent
  0 siblings, 0 replies; 3+ messages in thread
From: Russell, Kent @ 2021-03-03 16:27 UTC (permalink / raw)
  To: Kuehling, Felix, amd-gfx@lists.freedesktop.org

[AMD Public Use]

Reviewed-by: Kent Russell <kent.russell@amd.com>

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Felix Kuehling
> Sent: Friday, February 26, 2021 5:46 PM
> To: amd-gfx@lists.freedesktop.org
> Subject: [PATCH 1/1] drm/amdkfd: Use a new capability bit for SRAM ECC
> 
> Existing, buggy user mode breaks when SRAM ECC is correctly reported as
> "enabled". To avoid breaking existing user mode, deprecate that bit and
> leave it as 0. Define a new bit to report the actual SRAM ECC mode that
> new, correct user mode can use in the future.
> 
> Fixes: 7ec177bdcfc1 ("drm/amdkfd: fix set kfd node ras properties value")
> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_topology.h | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.h
> b/drivers/gpu/drm/amd/amdkfd/kfd_topology.h
> index 416fd910e12e..b8b68087bd7a 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.h
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.h
> @@ -47,13 +47,14 @@
>  #define HSA_CAP_DOORBELL_TYPE_2_0		0x2
>  #define HSA_CAP_AQL_QUEUE_DOUBLE_MAP		0x00004000
> 
> -#define HSA_CAP_SRAM_EDCSUPPORTED		0x00080000
> +#define HSA_CAP_RESERVED_WAS_SRAM_EDCSUPPORTED	0x00080000 /* Old buggy
> user mode depends on this being 0 */
>  #define HSA_CAP_MEM_EDCSUPPORTED		0x00100000
>  #define HSA_CAP_RASEVENTNOTIFY			0x00200000
>  #define HSA_CAP_ASIC_REVISION_MASK		0x03c00000
>  #define HSA_CAP_ASIC_REVISION_SHIFT		22
> +#define HSA_CAP_SRAM_EDCSUPPORTED		0x04000000
> 
> -#define HSA_CAP_RESERVED			0xfc078000
> +#define HSA_CAP_RESERVED			0xf80f8000
> 
>  struct kfd_node_properties {
>  	uint64_t hive_id;
> --
> 2.30.0
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.or
> g%2Fmailman%2Flistinfo%2Famd-
> gfx&amp;data=04%7C01%7Ckent.russell%40amd.com%7Cb8d46efc3f554cef4f7308d8daa85
> 3bb%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637499763789222071%7CUnk
> nown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXV
> CI6Mn0%3D%7C1000&amp;sdata=ZhBBLDSK21I9o%2F1wsoFpWUlPtiezJ2rHHmIvJ51lsT4%3
> D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-03 16:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-10 19:06 [PATCH 1/1] drm/amdkfd: Use a new capability bit for SRAM ECC Felix Kuehling
  -- strict thread matches above, loose matches on Subject: below --
2021-02-26 22:45 Felix Kuehling
2021-03-03 16:27 ` Russell, Kent

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox