Skip to contentSkip to conversation

LSDMA 7.0 support

PATCH New Alex Deucher 1 participant 3 messages Feb 6, 2024

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

cover LSDMA 7.0 support

LSDMA (Light SDMA) is a general purpose SDMA engine on the GPU. The driver uses it for MMIO-controlled DMA access to GPU accessible memory. This adds support for ASICs containing LSDMA version 7.0.x.

The first patch adds the register headers and is very large, so I've omitted it.

Hawking Zhang (1):
drm/amdgpu: Add lsdma v7_0_0 ip headers (v3)

Likun Gao (2):
drm/amdgpu: Add lsdma v7_0 ip block support
drm/amdgpu/discovery: Add lsdma v7_0 ip block

 drivers/gpu/drm/amd/amdgpu/Makefile           |    2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c |    5 +
 drivers/gpu/drm/amd/amdgpu/lsdma_v7_0.c       |  121 ++
 drivers/gpu/drm/amd/amdgpu/lsdma_v7_0.h       |   31 +
 .../asic_reg/lsdma/lsdma_7_0_0_offset.h       |  388 +++++
 .../asic_reg/lsdma/lsdma_7_0_0_sh_mask.h      | 1411 +++++++++++++++++
 6 files changed, 1957 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/amd/amdgpu/lsdma_v7_0.c
 create mode 100644 drivers/gpu/drm/amd/amdgpu/lsdma_v7_0.h
 create mode 100644 drivers/gpu/drm/amd/include/asic_reg/lsdma/lsdma_7_0_0_offset.h
 create mode 100644 drivers/gpu/drm/amd/include/asic_reg/lsdma/lsdma_7_0_0_sh_mask.h
Signature · 1 line
2.42.0
author maintainer
#1 lore raw

PATCH 2/3 drm/amdgpu: Add lsdma v7_0 ip block support

From: Likun Gao <[email protected]>

Add lsdma v7_0 ip block support.

---
 drivers/gpu/drm/amd/amdgpu/Makefile     |   2 +-
 drivers/gpu/drm/amd/amdgpu/lsdma_v7_0.c | 121 ++++++++++++++++++++++++
 drivers/gpu/drm/amd/amdgpu/lsdma_v7_0.h |  31 ++++++
 3 files changed, 153 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/amd/amdgpu/lsdma_v7_0.c
 create mode 100644 drivers/gpu/drm/amd/amdgpu/lsdma_v7_0.h
drivers/gpu/drm/amd/amdgpu/Makefile +1 -1
index 1b04bae60fbf..3f7de16e0dc4 100644
@@ -98,7 +98,7 @@ amdgpu-y += \
 	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 \
-	nbio_v7_9.o aqua_vanjaram.o nbio_v7_11.o
+	nbio_v7_9.o aqua_vanjaram.o nbio_v7_11.o lsdma_v7_0.o
 
 # add DF block
 amdgpu-y += \
drivers/gpu/drm/amd/amdgpu/lsdma_v7_0.c new file +121 -0

121 lines not on this page · raw message

drivers/gpu/drm/amd/amdgpu/lsdma_v7_0.h new file +31 -0
new file mode 100644
index 000000000000..52b4485cdd98
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2023 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 __LSDMA_V7_0_H__
+#define __LSDMA_V7_0_H__
+
+#include "soc15_common.h"
+
+extern const struct amdgpu_lsdma_funcs lsdma_v7_0_funcs;
+
+#endif /* __LSDMA_V7_0_H__ */
Signature · 1 line
2.42.0
author maintainer
#2 lore raw

PATCH 3/3 drm/amdgpu/discovery: Add lsdma v7_0 ip block

In reply to Alex Deucher

From: Likun Gao <[email protected]>

Add lsdma v7_0 ip block.

v2: squash in updates (Alex)

---
 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 93c84a1c1d3e..e941aeb6f16a 100644
@@ -75,6 +75,7 @@
 #include "sdma_v5_2.h"
 #include "sdma_v6_0.h"
 #include "lsdma_v6_0.h"
+#include "lsdma_v7_0.h"
 #include "vcn_v2_0.h"
 #include "jpeg_v2_0.h"
 #include "vcn_v3_0.h"
@@ -2641,6 +2642,10 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
 	case IP_VERSION(6, 0, 3):
 		adev->lsdma.funcs = &lsdma_v6_0_funcs;
 		break;
+	case IP_VERSION(7, 0, 0):
+	case IP_VERSION(7, 0, 1):
+		adev->lsdma.funcs = &lsdma_v7_0_funcs;
+		break;
 	default:
 		break;
 	}
Signature · 1 line
2.42.0