Skip to contentSkip to conversation

GMC 13.x Support

PATCH In review Alex Deucher 2 participants 5 messages Nov 6 – Nov 17

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

cover GMC 13.x Support

This patch set add support the GMC (Graphics Memory Controller) v13.x. This enables support for GPUVM and memory controller setup on chips with GMC v13. The first patch adds a large new register header which was too large for the list so it was omitted.

Hawking Zhang (4):
drm/amdgpu: Add gc v13_0_1 ip headers v6
drm/amdgpu: Add gfxhub v13_0 support
drm/amdgpu: Add gmc v13_0 support
drm/amdgpu/discovery: Add gmc v13_0 ip block

 drivers/gpu/drm/amd/amdgpu/Makefile           |     3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c |     4 +
 drivers/gpu/drm/amd/amdgpu/gfxhub_v13_0.c     |   529 +
 drivers/gpu/drm/amd/amdgpu/gfxhub_v13_0.h     |    29 +
 drivers/gpu/drm/amd/amdgpu/gmc_v13_0.c        |   999 +
 drivers/gpu/drm/amd/amdgpu/gmc_v13_0.h        |    30 +
 .../include/asic_reg/gc/gc_13_0_1_offset.h    | 16009 +++++
 .../include/asic_reg/gc/gc_13_0_1_sh_mask.h   | 54975 ++++++++++++++++
 8 files changed, 72577 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/amd/amdgpu/gfxhub_v13_0.c
 create mode 100644 drivers/gpu/drm/amd/amdgpu/gfxhub_v13_0.h
 create mode 100644 drivers/gpu/drm/amd/amdgpu/gmc_v13_0.c
 create mode 100644 drivers/gpu/drm/amd/amdgpu/gmc_v13_0.h
 create mode 100644 drivers/gpu/drm/amd/include/asic_reg/gc/gc_13_0_1_offset.h
 create mode 100644 drivers/gpu/drm/amd/include/asic_reg/gc/gc_13_0_1_sh_mask.h
Signature · 1 line
2.56.0
author maintainer
#1 lore raw

PATCH 2/4 drm/amdgpu: Add gfxhub v13_0 support

From: Hawking Zhang <[email protected]>

Add initial implementation for the new generation of gfxhub

---
 drivers/gpu/drm/amd/amdgpu/Makefile       |   2 +-
 drivers/gpu/drm/amd/amdgpu/gfxhub_v13_0.c | 529 ++++++++++++++++++++++
 drivers/gpu/drm/amd/amdgpu/gfxhub_v13_0.h |  29 ++
 3 files changed, 559 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/amd/amdgpu/gfxhub_v13_0.c
 create mode 100644 drivers/gpu/drm/amd/amdgpu/gfxhub_v13_0.h
drivers/gpu/drm/amd/amdgpu/Makefile +1 -1
index 8687afc00c24c..e930e4a000550 100644
@@ -111,7 +111,7 @@ amdgpu-y += \
 	mmhub_v1_7.o gfxhub_v3_0.o mmhub_v3_0.o mmhub_v3_0_2.o gmc_v11_0.o \
 	mmhub_v3_0_1.o gfxhub_v3_0_3.o gfxhub_v1_2.o mmhub_v1_8.o mmhub_v3_3.o \
 	gfxhub_v11_5_0.o mmhub_v4_1_0.o gfxhub_v12_0.o gmc_v12_0.o \
-	mmhub_v4_2_0.o gfxhub_v12_1.o gmc_v12_1.o mmhub_v5_0.o
+	mmhub_v4_2_0.o gfxhub_v12_1.o gmc_v12_1.o mmhub_v5_0.o gfxhub_v13_0.o
 
 # add UMC block
 amdgpu-y += \
drivers/gpu/drm/amd/amdgpu/gfxhub_v13_0.c new file +529 -0

529 lines not on this page · raw message

drivers/gpu/drm/amd/amdgpu/gfxhub_v13_0.h new file +29 -0
new file mode 100644
index 0000000000000..d5ee9f73d57ec
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2025 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef __GFXHUB_V13_0_H__
+#define __GFXHUB_V13_0_H__
+
+extern const struct amdgpu_gfxhub_funcs gfxhub_v13_0_funcs;
+
+#endif
Signature · 1 line
2.56.0
author maintainer
#2 lore raw

PATCH 3/4 drm/amdgpu: Add gmc v13_0 support

In reply to Alex Deucher

From: Hawking Zhang <[email protected]>

Add initial implementation for the new generation of gmc

v2: switch to soc_v2_0 ih clientid
v3: rebase
v4: squash in various fixes

---
 drivers/gpu/drm/amd/amdgpu/Makefile    |   3 +-
 drivers/gpu/drm/amd/amdgpu/gmc_v13_0.c | 999 +++++++++++++++++++++++++
 drivers/gpu/drm/amd/amdgpu/gmc_v13_0.h |  30 +
 3 files changed, 1031 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/amd/amdgpu/gmc_v13_0.c
 create mode 100644 drivers/gpu/drm/amd/amdgpu/gmc_v13_0.h
drivers/gpu/drm/amd/amdgpu/Makefile +2 -1
index e930e4a000550..aad4aa8fa1309 100644
@@ -111,7 +111,8 @@ amdgpu-y += \
 	mmhub_v1_7.o gfxhub_v3_0.o mmhub_v3_0.o mmhub_v3_0_2.o gmc_v11_0.o \
 	mmhub_v3_0_1.o gfxhub_v3_0_3.o gfxhub_v1_2.o mmhub_v1_8.o mmhub_v3_3.o \
 	gfxhub_v11_5_0.o mmhub_v4_1_0.o gfxhub_v12_0.o gmc_v12_0.o \
-	mmhub_v4_2_0.o gfxhub_v12_1.o gmc_v12_1.o mmhub_v5_0.o gfxhub_v13_0.o
+	mmhub_v4_2_0.o gfxhub_v12_1.o gmc_v12_1.o mmhub_v5_0.o gfxhub_v13_0.o \
+	gmc_v13_0.o
 
 # add UMC block
 amdgpu-y += \
drivers/gpu/drm/amd/amdgpu/gmc_v13_0.c new file +999 -0

999 lines not on this page · raw message

drivers/gpu/drm/amd/amdgpu/gmc_v13_0.h new file +30 -0
new file mode 100644
index 0000000000000..22f3c756d50af
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2025 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef __GMC_V13_0_H__
+#define __GMC_V13_0_H__
+
+extern const struct amd_ip_funcs gmc_v13_0_ip_funcs;
+extern const struct amdgpu_ip_block_version gmc_v13_0_ip_block;
+
+#endif
Signature · 1 line
2.56.0
author maintainer
#3 lore raw

PATCH 4/4 drm/amdgpu/discovery: Add gmc v13_0 ip block

In reply to Alex Deucher

From: Hawking Zhang <[email protected]>

Add gmc v13_0 ip block

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +4 -0
index 351a1e61f525e..cd5e447d78e15 100644
@@ -61,6 +61,7 @@
 #include "gmc_v10_0.h"
 #include "gmc_v11_0.h"
 #include "gmc_v12_0.h"
+#include "gmc_v13_0.h"
 #include "gfxhub_v2_0.h"
 #include "mmhub_v2_0.h"
 #include "nbio_v2_3.h"
@@ -2800,6 +2801,9 @@ static int amdgpu_discovery_set_gmc_ip_blocks(struct amdgpu_device *adev)
 	case IP_VERSION(12, 1, 0):
 		amdgpu_device_ip_block_add(adev, &gmc_v12_0_ip_block);
 		break;
+	case IP_VERSION(13, 0, 1):
+		amdgpu_device_ip_block_add(adev, &gmc_v13_0_ip_block);
+		break;
 	default:
 		dev_err(adev->dev, "Failed to add gmc ip block(GC_HWIP:0x%x)\n",
 			amdgpu_ip_version(adev, GC_HWIP, 0));
Signature · 1 line
2.56.0
Reviewed-by on the v1 series
#4 lore raw
In reply to Alex Deucher
Quoted 11 lines · Alex Deucher

This patch set add support the GMC (Graphics Memory Controller) v13.x. This enables support for GPUVM and memory controller setup on chips with GMC v13. The first patch adds a large new register header which was too large for the list so it was omitted.

Hawking Zhang (4):
drm/amdgpu: Add gc v13_0_1 ip headers v6
drm/amdgpu: Add gfxhub v13_0 support
drm/amdgpu: Add gmc v13_0 support
drm/amdgpu/discovery: Add gmc v13_0 ip block

Series is:

Quoted 20 lines
 drivers/gpu/drm/amd/amdgpu/Makefile           |     3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c |     4 +
 drivers/gpu/drm/amd/amdgpu/gfxhub_v13_0.c     |   529 +
 drivers/gpu/drm/amd/amdgpu/gfxhub_v13_0.h     |    29 +
 drivers/gpu/drm/amd/amdgpu/gmc_v13_0.c        |   999 +
 drivers/gpu/drm/amd/amdgpu/gmc_v13_0.h        |    30 +
 .../include/asic_reg/gc/gc_13_0_1_offset.h    | 16009 +++++
 .../include/asic_reg/gc/gc_13_0_1_sh_mask.h   | 54975 ++++++++++++++++
 8 files changed, 72577 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/amd/amdgpu/gfxhub_v13_0.c
 create mode 100644 drivers/gpu/drm/amd/amdgpu/gfxhub_v13_0.h
 create mode 100644 drivers/gpu/drm/amd/amdgpu/gmc_v13_0.c
 create mode 100644 drivers/gpu/drm/amd/amdgpu/gmc_v13_0.h
 create mode 100644 drivers/gpu/drm/amd/include/asic_reg/gc/gc_13_0_1_offset.h
 create mode 100644 drivers/gpu/drm/amd/include/asic_reg/gc/gc_13_0_1_sh_mask.h

--
2.56.0