Skip to contentSkip to conversation

Add support for SDMA 4.4.2

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

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

cover Add support for SDMA 4.4.2

This add support for SDMA 4.4.2. The first patch is register header updates and was too large for the mailing list.

Hawking Zhang (1):
drm/amdgpu: add sdma v4_4_2 ip headers

Le Ma (2):
drm/amdgpu: add sdma v4_4_2 support (v4)
drm/amdgpu: set sdma v4_4_2 ip block

 drivers/gpu/drm/amd/amdgpu/Makefile           |    1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c |    4 +
 drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c      | 1967 ++++++++++
 drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.h      |   30 +
 .../include/asic_reg/sdma/sdma_4_4_2_offset.h | 1109 ++++++
 .../asic_reg/sdma/sdma_4_4_2_sh_mask.h        | 3276 +++++++++++++++++
 6 files changed, 6387 insertions(+)
 create mode 100644 drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c
 create mode 100644 drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.h
 create mode 100644 drivers/gpu/drm/amd/include/asic_reg/sdma/sdma_4_4_2_offset.h
 create mode 100644 drivers/gpu/drm/amd/include/asic_reg/sdma/sdma_4_4_2_sh_mask.h
Signature · 1 line
2.39.2
author maintainer
#1 lore raw

PATCH 2/3 drm/amdgpu: add sdma v4_4_2 support (v4)

From: Le Ma <[email protected]>

Add support for SDMA 4.4.2.

v1: Create sdma_v4_4_2.[c|h] for initial support (Le)
v2: update amdgpu_ring_init call with atomic score (Hawking)
v3: Squash in sdma_start fixes (Alex)
v4: Comment out currently unused RAS code (Alex)

---
 drivers/gpu/drm/amd/amdgpu/Makefile      |    1 +
 drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 1967 ++++++++++++++++++++++
 drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.h |   30 +
 3 files changed, 1998 insertions(+)
 create mode 100644 drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c
 create mode 100644 drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.h
drivers/gpu/drm/amd/amdgpu/Makefile +1 -0
index 1d72cbc85348..d4dfd48451ce 100644
@@ -148,6 +148,7 @@ amdgpu-y += \
 	sdma_v3_0.o \
 	sdma_v4_0.o \
 	sdma_v4_4.o \
+	sdma_v4_4_2.o \
 	sdma_v5_0.o \
 	sdma_v5_2.o \
 	sdma_v6_0.o
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c new file +1967 -0

1,967 lines not on this page · raw message

drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.h new file +30 -0
new file mode 100644
index 000000000000..4814e8a074d6
@@ -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 __SDMA_V4_4_2_H__
+#define __SDMA_V4_4_2_H__
+
+extern const struct amd_ip_funcs sdma_v4_4_2_ip_funcs;
+extern const struct amdgpu_ip_block_version sdma_v4_4_2_ip_block;
+
+#endif
Signature · 1 line
2.39.2
author maintainer
#2 lore raw

PATCH 3/3 drm/amdgpu: set sdma v4_4_2 ip block

In reply to Alex Deucher

From: Le Ma <[email protected]>

Use sdma 4.4.2 IP block for chips with sdma 4.4.2 hardware.

---
 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 8b3ebb7d482b..c8507731ce7f 100644
@@ -41,6 +41,7 @@
 #include "vega10_ih.h"
 #include "vega20_ih.h"
 #include "sdma_v4_0.h"
+#include "sdma_v4_4_2.h"
 #include "uvd_v7_0.h"
 #include "vce_v4_0.h"
 #include "vcn_v1_0.h"
@@ -1835,6 +1836,9 @@ static int amdgpu_discovery_set_sdma_ip_blocks(struct amdgpu_device *adev)
 	case IP_VERSION(4, 4, 0):
 		amdgpu_device_ip_block_add(adev, &sdma_v4_0_ip_block);
 		break;
+	case IP_VERSION(4, 4, 2):
+		amdgpu_device_ip_block_add(adev, &sdma_v4_4_2_ip_block);
+		break;
 	case IP_VERSION(5, 0, 0):
 	case IP_VERSION(5, 0, 1):
 	case IP_VERSION(5, 0, 2):
Signature · 1 line
2.39.2