Skip to contentSkip to conversation

Add support for IH V6.0

PATCH New Alex Deucher 1 participant 4 messages Apr 27, 2022

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

cover Add support for IH V6.0

This patch set adds support for Interrrupt Hander version 6.0. This block handles interrupts on the GPU. The first patch is registers headers so is too large for the mailing list.

Hawking Zhang (2):
drm/amdgpu: add osssys v6_0_0 ip headers v4
drm/amdgpu: add ih v6_0 ip block v2

Likun Gao (1):
drm/amdgpu/discovery: add IH v6

Stanley Yang (1):
drm/amdgpu: add soc21 ih clientid definition

 drivers/gpu/drm/amd/amdgpu/Makefile           |   3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c |   4 +
 drivers/gpu/drm/amd/amdgpu/ih_v6_0.c          | 745 ++++++++++++++
 drivers/gpu/drm/amd/amdgpu/ih_v6_0.h          |  28 +
 drivers/gpu/drm/amd/include/amd_shared.h      |   1 +
 .../asic_reg/oss/osssys_6_0_0_offset.h        | 263 +++++
 .../asic_reg/oss/osssys_6_0_0_sh_mask.h       | 969 ++++++++++++++++++
 .../gpu/drm/amd/include/soc15_ih_clientid.h   |  27 +
 8 files changed, 2039 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
 create mode 100644 drivers/gpu/drm/amd/amdgpu/ih_v6_0.h
 create mode 100644 drivers/gpu/drm/amd/include/asic_reg/oss/osssys_6_0_0_offset.h
 create mode 100644 drivers/gpu/drm/amd/include/asic_reg/oss/osssys_6_0_0_sh_mask.h
Signature · 1 line
2.35.1
author maintainer
#1 lore raw

PATCH 2/4 drm/amdgpu: add soc21 ih clientid definition

From: Stanley Yang <[email protected]>

Define soc21 ih clientid

---
 .../gpu/drm/amd/include/soc15_ih_clientid.h   | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)
drivers/gpu/drm/amd/include/soc15_ih_clientid.h +27 -0
index 1ace2cff0883..21af181a802c 100644
@@ -79,6 +79,33 @@ enum soc15_ih_clientid {
 
 extern const char *soc15_ih_clientid_name[];
 
+/*
+ * soc21 IH clients
+ */
+enum soc21_ih_clientid {
+	SOC21_IH_CLIENTID_IH		= 0x00,
+	SOC21_IH_CLIENTID_ATHUB		= 0x02,
+	SOC21_IH_CLIENTID_BIF		= 0x03,
+	SOC21_IH_CLIENTID_DCN		= 0x04,
+	SOC21_IH_CLIENTID_ISP		= 0x05,
+	SOC21_IH_CLIENTID_MP3		= 0x06,
+	SOC21_IH_CLIENTID_RLC		= 0x07,
+	SOC21_IH_CLIENTID_GFX		= 0x0a,
+	SOC21_IH_CLIENTID_IMU		= 0x0b,
+	SOC21_IH_CLIENTID_VCN1		= 0x0e,
+	SOC21_IH_CLIENTID_THM		= 0x0f,
+	SOC21_IH_CLIENTID_VCN		= 0x10,
+	SOC21_IH_CLIENTID_VMC		= 0x12,
+	SOC21_IH_CLIENTID_GRBM_CP	= 0x14,
+	SOC21_IH_CLIENTID_ROM_SMUIO	= 0x16,
+	SOC21_IH_CLIENTID_DF		= 0x17,
+	SOC21_IH_CLIENTID_PWR		= 0x19,
+	SOC21_IH_CLIENTID_LSDMA		= 0x1a,
+	SOC21_IH_CLIENTID_MP0		= 0x1e,
+	SOC21_IH_CLIENTID_MP1		= 0x1f,
+	SOC21_IH_CLIENTID_MAX,
+};
+
 #endif
 
 
Signature · 1 line
2.35.1
author maintainer
#2 lore raw

PATCH 3/4 drm/amdgpu: add ih v6_0 ip block v2

In reply to Alex Deucher

From: Hawking Zhang <[email protected]>

This adds ih v6_0 ip block support. IH is the
interrupt handler.

---
 drivers/gpu/drm/amd/amdgpu/Makefile      |   3 +-
 drivers/gpu/drm/amd/amdgpu/ih_v6_0.c     | 745 +++++++++++++++++++++++
 drivers/gpu/drm/amd/amdgpu/ih_v6_0.h     |  28 +
 drivers/gpu/drm/amd/include/amd_shared.h |   1 +
 4 files changed, 776 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
 create mode 100644 drivers/gpu/drm/amd/amdgpu/ih_v6_0.h
drivers/gpu/drm/amd/amdgpu/Makefile +2 -1
index 313af306687b..244f53cc7c46 100644
@@ -103,7 +103,8 @@ amdgpu-y += \
 	cz_ih.o \
 	vega10_ih.o \
 	vega20_ih.o \
-	navi10_ih.o
+	navi10_ih.o \
+	ih_v6_0.o
 
 # add PSP block
 amdgpu-y += \
drivers/gpu/drm/amd/amdgpu/ih_v6_0.c new file +745 -0

745 lines not on this page · raw message

drivers/gpu/drm/amd/amdgpu/ih_v6_0.h new file +28 -0
new file mode 100644
index 000000000000..f27b55580716
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2021 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 __IH_V6_0_IH_H__
+#define __IH_V6_0_IH_H__
+
+extern const struct amdgpu_ip_block_version ih_v6_0_ip_block;
+
+#endif
drivers/gpu/drm/amd/include/amd_shared.h +1 -0
index 06f21e9008c6..9086df53660c 100644
@@ -167,6 +167,7 @@ enum amd_powergating_state {
 #define AMD_PG_SUPPORT_VCN_DPG			(1 << 15)
 #define AMD_PG_SUPPORT_ATHUB			(1 << 16)
 #define AMD_PG_SUPPORT_JPEG			(1 << 17)
+#define AMD_PG_SUPPORT_IH_SRAM_PG		(1 << 18)
 
 /**
  * enum PP_FEATURE_MASK - Used to mask power play features.
Signature · 1 line
2.35.1
author maintainer
#3 lore raw

PATCH 4/4 drm/amdgpu/discovery: add IH v6

In reply to Alex Deucher

From: Likun Gao <[email protected]>

Enable IH v6 on asics where it is present.

---
 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 f11c01982cd4..8c89e02ee1ce 100644
@@ -56,6 +56,7 @@
 #include "nv.h"
 #include "soc21.h"
 #include "navi10_ih.h"
+#include "ih_v6_0.h"
 #include "gfx_v10_0.h"
 #include "sdma_v5_0.h"
 #include "sdma_v5_2.h"
@@ -1542,6 +1543,9 @@ static int amdgpu_discovery_set_ih_ip_blocks(struct amdgpu_device *adev)
 	case IP_VERSION(5, 2, 1):
 		amdgpu_device_ip_block_add(adev, &navi10_ih_ip_block);
 		break;
+	case IP_VERSION(6, 0, 0):
+		amdgpu_device_ip_block_add(adev, &ih_v6_0_ip_block);
+		break;
 	default:
 		dev_err(adev->dev,
 			"Failed to add ih ip block(OSSSYS_HWIP:0x%x)\n",
Signature · 1 line
2.35.1