Skip to contentSkip to conversation

Add SMUIO v13.0.6 support

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

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

cover Add SMUIO v13.0.6 support

Add support for System Management Unit IO (SMUIO) version 13.0.6. This block handles VBIOS ROM access and other controls. The first patch adds register headers which are too large for the mailing list.

Hawking Zhang (3):
drm/amdgpu: add smuio v13_0_6 ip headers v4
drm/amdgpu: add smuio v13_0_6 support
drm/amdgpu: init smuio v13_0_6 callbacks

 drivers/gpu/drm/amd/amdgpu/Makefile           |    3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c |    4 +
 drivers/gpu/drm/amd/amdgpu/smuio_v13_0_6.c    |   41 +
 drivers/gpu/drm/amd/amdgpu/smuio_v13_0_6.h    |   30 +
 .../asic_reg/smuio/smuio_13_0_6_offset.h      |  517 ++++++++
 .../asic_reg/smuio/smuio_13_0_6_sh_mask.h     | 1178 +++++++++++++++++
 6 files changed, 1772 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/amd/amdgpu/smuio_v13_0_6.c
 create mode 100644 drivers/gpu/drm/amd/amdgpu/smuio_v13_0_6.h
 create mode 100644 drivers/gpu/drm/amd/include/asic_reg/smuio/smuio_13_0_6_offset.h
 create mode 100644 drivers/gpu/drm/amd/include/asic_reg/smuio/smuio_13_0_6_sh_mask.h
Signature · 1 line
2.35.1
author maintainer
#1 lore raw

PATCH 2/3 drm/amdgpu: add smuio v13_0_6 support

From: Hawking Zhang <[email protected]>

add smuio v13_0_6 callbacks to support read
rom image

---
 drivers/gpu/drm/amd/amdgpu/Makefile        |  3 +-
 drivers/gpu/drm/amd/amdgpu/smuio_v13_0_6.c | 41 ++++++++++++++++++++++
 drivers/gpu/drm/amd/amdgpu/smuio_v13_0_6.h | 30 ++++++++++++++++
 3 files changed, 73 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/amd/amdgpu/smuio_v13_0_6.c
 create mode 100644 drivers/gpu/drm/amd/amdgpu/smuio_v13_0_6.h
drivers/gpu/drm/amd/amdgpu/Makefile +2 -1
index b10ba2b36ca9..6097ad614937 100644
@@ -183,7 +183,8 @@ amdgpu-y += \
 	smuio_v9_0.o \
 	smuio_v11_0.o \
 	smuio_v11_0_6.o \
-	smuio_v13_0.o
+	smuio_v13_0.o \
+	smuio_v13_0_6.o
 
 # add reset block
 amdgpu-y += \
drivers/gpu/drm/amd/amdgpu/smuio_v13_0_6.c new file +41 -0

41 lines not on this page · raw message

drivers/gpu/drm/amd/amdgpu/smuio_v13_0_6.h new file +30 -0
new file mode 100644
index 000000000000..c75621de5ab5
@@ -0,0 +1,30 @@
+/*
+ * 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 __SMUIO_V13_0_6_H__
+#define __SMUIO_V13_0_6_H__
+
+#include "soc15_common.h"
+
+extern const struct amdgpu_smuio_funcs smuio_v13_0_6_funcs;
+
+#endif /* __SMUIO_V13_0_6_H__ */
Signature · 1 line
2.35.1
author maintainer
#2 lore raw

PATCH 3/3 drm/amdgpu: init smuio v13_0_6 callbacks

In reply to Alex Deucher

From: Hawking Zhang <[email protected]>

initialize smuio callback for soc21

---
 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 834354597cb1..34c22fdcd7c7 100644
@@ -70,6 +70,7 @@
 #include "smuio_v11_0.h"
 #include "smuio_v11_0_6.h"
 #include "smuio_v13_0.h"
+#include "smuio_v13_0_6.h"
 
 #define FIRMWARE_IP_DISCOVERY "amdgpu/ip_discovery.bin"
 MODULE_FIRMWARE(FIRMWARE_IP_DISCOVERY);
@@ -2229,6 +2230,9 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
 	case IP_VERSION(13, 0, 2):
 		adev->smuio.funcs = &smuio_v13_0_funcs;
 		break;
+	case IP_VERSION(13, 0, 6):
+		adev->smuio.funcs = &smuio_v13_0_6_funcs;
+		break;
 	default:
 		break;
 	}
Signature · 1 line
2.35.1