[PATCH umr] Introduction of Vega20.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Tom St Denis <tom.stdenis at amd.com>
---
 scripts/soc15_asic.sh       |   3 +-
 src/lib/asic/CMakeLists.txt |   1 +
 src/lib/asic/vega20.c       |  51 ++++++++++++
 src/lib/asic/vega20.i       | 189 ++++++++++++++++++++++++++++++++++++++++++++
 src/lib/discover_by_did.c   |   6 ++
 src/lib/discover_by_name.c  |   1 +
 src/umr.h                   |   1 +
 7 files changed, 251 insertions(+), 1 deletion(-)
 create mode 100644 src/lib/asic/vega20.c
 create mode 100644 src/lib/asic/vega20.i

diff --git a/scripts/soc15_asic.sh b/scripts/soc15_asic.sh
index 7b9e59dbc52a..3f41db8e3fc4 100644
--- a/scripts/soc15_asic.sh
+++ b/scripts/soc15_asic.sh
@@ -48,4 +48,5 @@ parse_offsets() {
 	)
 }
 
-parse_offsets ${pk}/soc15ip.h src/lib/asic/vega10.i
+parse_offsets ${pk}/vega10_ip_offset.h src/lib/asic/vega10.i
+parse_offsets ${pk}/vega20_ip_offset.h src/lib/asic/vega20.i
diff --git a/src/lib/asic/CMakeLists.txt b/src/lib/asic/CMakeLists.txt
index 38cf9468396f..eb3c9e54d535 100644
--- a/src/lib/asic/CMakeLists.txt
+++ b/src/lib/asic/CMakeLists.txt
@@ -22,6 +22,7 @@ add_library(asic OBJECT
   topaz.c
   vega10.c
   vega12.c
+  vega20.c
   vegam.c
   verde.c
 )
diff --git a/src/lib/asic/vega20.c b/src/lib/asic/vega20.c
new file mode 100644
index 000000000000..475c1ab1e54d
--- /dev/null
+++ b/src/lib/asic/vega20.c
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2018 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.
+ *
+ * Authors: Tom St Denis <tom.stdenis at amd.com>
+ *
+ */
+#include "umr.h"
+
+static struct umr_ip_offsets_soc15 vega20_offs[] = {
+#include "vega20.i"
+	{ NULL },
+};
+
+struct umr_asic *umr_create_vega20(struct umr_options *options)
+{
+	return
+		umr_create_asic_helper("vega20", FAMILY_AI,
+			umr_create_gfx90(vega20_offs, options),
+			umr_create_uvd70(vega20_offs, options),
+			umr_create_vce40(vega20_offs, options),
+			umr_create_dce120(vega20_offs, options),
+			umr_create_hdp40(vega20_offs, options),
+			umr_create_nbio61(vega20_offs, options),
+			umr_create_oss40(vega20_offs, options),
+			umr_create_sdma040(vega20_offs, options),
+			umr_create_sdma140(vega20_offs, options),
+			umr_create_thm90(vega20_offs, options),
+			umr_create_mmhub10(vega20_offs, options),
+			umr_create_mp90(vega20_offs, options),
+			umr_create_umc60(vega20_offs, options),
+			NULL);
+}
+
diff --git a/src/lib/asic/vega20.i b/src/lib/asic/vega20.i
new file mode 100644
index 000000000000..cc3f50180ae2
--- /dev/null
+++ b/src/lib/asic/vega20.i
@@ -0,0 +1,189 @@
+	{ "ATHUB",
+		{
+			{ 0x00000C20, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+		}
+	},
+	{ "CLK",
+		{
+			{ 0x00016C00, 0, 0, 0, 0,  },
+			{ 0x00016E00, 0, 0, 0, 0,  },
+			{ 0x00017000, 0, 0, 0, 0,  },
+			{ 0x00017200, 0, 0, 0, 0,  },
+			{ 0x0001B000, 0, 0, 0, 0,  },
+		}
+	},
+	{ "DCE",
+		{
+			{ 0x00000012, 0, 0, 0, 0,  },
+			{ 0x000000C0, 0, 0, 0, 0,  },
+			{ 0x000034C0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+		}
+	},
+	{ "DF",
+		{
+			{ 0x00007000, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+		}
+	},
+	{ "FUSE",
+		{
+			{ 0x00017400, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+		}
+	},
+	{ "GC",
+		{
+			{ 0x00002000, 0, 0, 0, 0,  },
+			{ 0x0000A000, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+		}
+	},
+	{ "HDP",
+		{
+			{ 0x00000F20, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+		}
+	},
+	{ "MMHUB",
+		{
+			{ 0x0001A000, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+		}
+	},
+	{ "MP0",
+		{
+			{ 0x00016000, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+		}
+	},
+	{ "MP1",
+		{
+			{ 0x00016000, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+		}
+	},
+	{ "NBIO",
+		{
+			{ 0x00000000, 0, 0, 0, 0,  },
+			{ 0x00000014, 0, 0, 0, 0,  },
+			{ 0x00000D20, 0, 0, 0, 0,  },
+			{ 0x00010400, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+		}
+	},
+	{ "OSSSYS",
+		{
+			{ 0x000010A0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+		}
+	},
+	{ "RSMU",
+		{
+			{ 0x00012000, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+		}
+	},
+	{ "SDMA0",
+		{
+			{ 0x00001260, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+		}
+	},
+	{ "SDMA1",
+		{
+			{ 0x00001860, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+		}
+	},
+	{ "SMUIO",
+		{
+			{ 0x00016800, 0, 0, 0, 0,  },
+			{ 0x00016A00, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+		}
+	},
+	{ "THM",
+		{
+			{ 0x00016600, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+		}
+	},
+	{ "UMC",
+		{
+			{ 0x00014000, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+		}
+	},
+	{ "UVD",
+		{
+			{ 0x00007800, 0, 0, 0, 0,  },
+			{ 0x00007E00, 0x00009000, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+		}
+	},
+	{ "VCE",
+		{
+			{ 0x00008800, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+		}
+	},
+	{ "XDMA",
+		{
+			{ 0x00003400, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+			{ 0, 0, 0, 0, 0,  },
+		}
+	},
diff --git a/src/lib/discover_by_did.c b/src/lib/discover_by_did.c
index b900bfaed160..2a4727977408 100644
--- a/src/lib/discover_by_did.c
+++ b/src/lib/discover_by_did.c
@@ -76,6 +76,12 @@ static const struct {
 	{ 0x6665, &umr_create_hainan },
 	{ 0x6667, &umr_create_hainan },
 	{ 0x666F, &umr_create_hainan },
+	{ 0x66A0, &umr_create_vega20 },
+	{ 0x66A1, &umr_create_vega20 },
+	{ 0x66A2, &umr_create_vega20 },
+	{ 0x66A3, &umr_create_vega20 },
+	{ 0x66A7, &umr_create_vega20 },
+	{ 0x66AF, &umr_create_vega20 },
 	{ 0x6780, &umr_create_tahiti },
 	{ 0x6784, &umr_create_tahiti },
 	{ 0x6788, &umr_create_tahiti },
diff --git a/src/lib/discover_by_name.c b/src/lib/discover_by_name.c
index deb95dff4fb6..59ac62d718c2 100644
--- a/src/lib/discover_by_name.c
+++ b/src/lib/discover_by_name.c
@@ -48,6 +48,7 @@ static const struct {
 	{ "stoney", &umr_create_stoney },
 	{ "vega10", &umr_create_vega10 },
 	{ "vega12", &umr_create_vega12 },
+	{ "vega20", &umr_create_vega20 },
 	{ "vegam", &umr_create_vegam },
 	{ "raven1", &umr_create_raven1 },
 };
diff --git a/src/umr.h b/src/umr.h
index 290824b271f1..4c9f95e1b87b 100644
--- a/src/umr.h
+++ b/src/umr.h
@@ -553,6 +553,7 @@ struct umr_asic *umr_create_tonga(struct umr_options *options);
 struct umr_asic *umr_create_topaz(struct umr_options *options);
 struct umr_asic *umr_create_vega10(struct umr_options *options);
 struct umr_asic *umr_create_vega12(struct umr_options *options);
+struct umr_asic *umr_create_vega20(struct umr_options *options);
 struct umr_asic *umr_create_vegam(struct umr_options *options);
 struct umr_asic *umr_create_verde(struct umr_options *options);
 
-- 
2.14.3



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux