Skip to contentSkip to conversation

NBIO 7.9 support

PATCH New Alex Deucher 1 participant 3 messages Mar 24, 2023

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

cover NBIO 7.9 support

Add support for NBIO 7.9. The first patch is
just register headers and is too big for the
mailing list.

Hawking Zhang (3):
drm/amdgpu: add nbio v7_9_0 ip headers
drm/amdgpu: add nbio v7_9 support
drm/amdgpu: init nbio v7_9 callbacks

 drivers/gpu/drm/amd/amdgpu/Makefile           |     3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c |     5 +
 drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c        |   369 +
 drivers/gpu/drm/amd/amdgpu/nbio_v7_9.h        |    32 +
 .../include/asic_reg/nbio/nbio_7_9_0_offset.h | 10002 ++++
 .../asic_reg/nbio/nbio_7_9_0_sh_mask.h        | 38900 ++++++++++++++++
 6 files changed, 49310 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c
 create mode 100644 drivers/gpu/drm/amd/amdgpu/nbio_v7_9.h
 create mode 100644 drivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_9_0_offset.h
 create mode 100644 drivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_9_0_sh_mask.h
Signature · 1 line
2.39.2
author maintainer
#1 lore raw

PATCH 2/3 drm/amdgpu: add nbio v7_9 support

From: Hawking Zhang <[email protected]>

v7_9 is a new nbio generation ip.

---
 drivers/gpu/drm/amd/amdgpu/Makefile    |   3 +-
 drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c | 369 +++++++++++++++++++++++++
 drivers/gpu/drm/amd/amdgpu/nbio_v7_9.h |  32 +++
 3 files changed, 403 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c
 create mode 100644 drivers/gpu/drm/amd/amdgpu/nbio_v7_9.h
drivers/gpu/drm/amd/amdgpu/Makefile +2 -1
index 5f9ac1bcb6bc..f2e4dfe8884f 100644
@@ -77,7 +77,8 @@ amdgpu-y += \
 	vi.o mxgpu_vi.o nbio_v6_1.o soc15.o emu_soc.o mxgpu_ai.o nbio_v7_0.o vega10_reg_init.o \
 	vega20_reg_init.o nbio_v7_4.o nbio_v2_3.o nv.o arct_reg_init.o mxgpu_nv.o \
 	nbio_v7_2.o hdp_v4_0.o hdp_v5_0.o aldebaran_reg_init.o aldebaran.o soc21.o \
-	sienna_cichlid.o smu_v13_0_10.o nbio_v4_3.o hdp_v6_0.o nbio_v7_7.o hdp_v5_2.o lsdma_v6_0.o
+	sienna_cichlid.o smu_v13_0_10.o nbio_v4_3.o hdp_v6_0.o nbio_v7_7.o hdp_v5_2.o lsdma_v6_0.o \
+	nbio_v7_9.o
 
 # add DF block
 amdgpu-y += \
drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c new file +369 -0

369 lines not on this page · raw message

drivers/gpu/drm/amd/amdgpu/nbio_v7_9.h new file +32 -0
new file mode 100644
index 000000000000..8e04eb484328
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2022 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 __NBIO_V7_9_H__
+#define __NBIO_V7_9_H__
+
+#include "soc15_common.h"
+
+extern const struct nbio_hdp_flush_reg nbio_v7_9_hdp_flush_reg;
+extern const struct amdgpu_nbio_funcs nbio_v7_9_funcs;
+
+#endif
Signature · 1 line
2.39.2
author maintainer
#2 lore raw

PATCH 3/3 drm/amdgpu: init nbio v7_9 callbacks

In reply to Alex Deucher

From: Hawking Zhang <[email protected]>

switch to the new nbio generation for NBIO 7.9.0.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +5 -0
index 6edaa43ab5a1..738ac5d902a5 100644
@@ -37,6 +37,7 @@
 #include "nbio_v6_1.h"
 #include "nbio_v7_0.h"
 #include "nbio_v7_4.h"
+#include "nbio_v7_9.h"
 #include "hdp_v4_0.h"
 #include "vega10_ih.h"
 #include "vega20_ih.h"
@@ -2264,6 +2265,10 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
 		adev->nbio.funcs = &nbio_v7_4_funcs;
 		adev->nbio.hdp_flush_reg = &nbio_v7_4_hdp_flush_reg;
 		break;
+	case IP_VERSION(7, 9, 0):
+		adev->nbio.funcs = &nbio_v7_9_funcs;
+		adev->nbio.hdp_flush_reg = &nbio_v7_9_hdp_flush_reg;
+		break;
 	case IP_VERSION(7, 2, 0):
 	case IP_VERSION(7, 2, 1):
 	case IP_VERSION(7, 3, 0):
Signature · 1 line
2.39.2