All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] drm/amdgpu/sdma4.0: adjust SDMA limits
@ 2025-09-11 17:24 Alex Deucher
  2025-09-11 17:24 ` [PATCH 2/5] drm/amdgpu/sdma4.4: " Alex Deucher
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Alex Deucher @ 2025-09-11 17:24 UTC (permalink / raw)
  To: amd-gfx; +Cc: christian.koenig, Alex Deucher

SDMA 4.4.x has increased transfer limits.

v2: fix harder, use shifts to make it more obvious

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
index f38004e6064e5..627c4bef443b3 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
@@ -2597,18 +2597,31 @@ static void sdma_v4_0_emit_fill_buffer(struct amdgpu_ib *ib,
 }
 
 static const struct amdgpu_buffer_funcs sdma_v4_0_buffer_funcs = {
-	.copy_max_bytes = 0x400000,
+	.copy_max_bytes = 1 << 22,
 	.copy_num_dw = 7,
 	.emit_copy_buffer = sdma_v4_0_emit_copy_buffer,
 
-	.fill_max_bytes = 0x400000,
+	.fill_max_bytes = 1 << 22,
+	.fill_num_dw = 5,
+	.emit_fill_buffer = sdma_v4_0_emit_fill_buffer,
+};
+
+static const struct amdgpu_buffer_funcs sdma_v4_4_buffer_funcs = {
+	.copy_max_bytes = 1 << 30,
+	.copy_num_dw = 7,
+	.emit_copy_buffer = sdma_v4_0_emit_copy_buffer,
+
+	.fill_max_bytes = 1 << 30,
 	.fill_num_dw = 5,
 	.emit_fill_buffer = sdma_v4_0_emit_fill_buffer,
 };
 
 static void sdma_v4_0_set_buffer_funcs(struct amdgpu_device *adev)
 {
-	adev->mman.buffer_funcs = &sdma_v4_0_buffer_funcs;
+	if (amdgpu_ip_version(adev, SDMA0_HWIP, 0) >= IP_VERSION(4, 4, 0))
+		adev->mman.buffer_funcs = &sdma_v4_4_buffer_funcs;
+	else
+		adev->mman.buffer_funcs = &sdma_v4_0_buffer_funcs;
 	if (adev->sdma.has_page_queue)
 		adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].page;
 	else
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread
* [PATCH 1/5] drm/amdgpu/sdma4.0: adjust SDMA limits
@ 2025-09-15 13:31 Alex Deucher
  2025-09-15 13:31 ` [PATCH 3/5] drm/amdgpu/sdma5.2: " Alex Deucher
  0 siblings, 1 reply; 14+ messages in thread
From: Alex Deucher @ 2025-09-15 13:31 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher

SDMA 4.4.x has increased transfer limits.

v2: fix harder, use shifts to make it more obvious

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
index f38004e6064e5..627c4bef443b3 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
@@ -2597,18 +2597,31 @@ static void sdma_v4_0_emit_fill_buffer(struct amdgpu_ib *ib,
 }
 
 static const struct amdgpu_buffer_funcs sdma_v4_0_buffer_funcs = {
-	.copy_max_bytes = 0x400000,
+	.copy_max_bytes = 1 << 22,
 	.copy_num_dw = 7,
 	.emit_copy_buffer = sdma_v4_0_emit_copy_buffer,
 
-	.fill_max_bytes = 0x400000,
+	.fill_max_bytes = 1 << 22,
+	.fill_num_dw = 5,
+	.emit_fill_buffer = sdma_v4_0_emit_fill_buffer,
+};
+
+static const struct amdgpu_buffer_funcs sdma_v4_4_buffer_funcs = {
+	.copy_max_bytes = 1 << 30,
+	.copy_num_dw = 7,
+	.emit_copy_buffer = sdma_v4_0_emit_copy_buffer,
+
+	.fill_max_bytes = 1 << 30,
 	.fill_num_dw = 5,
 	.emit_fill_buffer = sdma_v4_0_emit_fill_buffer,
 };
 
 static void sdma_v4_0_set_buffer_funcs(struct amdgpu_device *adev)
 {
-	adev->mman.buffer_funcs = &sdma_v4_0_buffer_funcs;
+	if (amdgpu_ip_version(adev, SDMA0_HWIP, 0) >= IP_VERSION(4, 4, 0))
+		adev->mman.buffer_funcs = &sdma_v4_4_buffer_funcs;
+	else
+		adev->mman.buffer_funcs = &sdma_v4_0_buffer_funcs;
 	if (adev->sdma.has_page_queue)
 		adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].page;
 	else
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread
* [PATCH 1/5] drm/amdgpu/sdma4.0: adjust SDMA limits
@ 2025-09-11 14:46 Alex Deucher
  2025-09-11 14:46 ` [PATCH 3/5] drm/amdgpu/sdma5.2: " Alex Deucher
  0 siblings, 1 reply; 14+ messages in thread
From: Alex Deucher @ 2025-09-11 14:46 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher

SDMA 4.4.x has increased transfer limits.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
index f38004e6064e5..cb6e6257c8fbf 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
@@ -2606,9 +2606,22 @@ static const struct amdgpu_buffer_funcs sdma_v4_0_buffer_funcs = {
 	.emit_fill_buffer = sdma_v4_0_emit_fill_buffer,
 };
 
+static const struct amdgpu_buffer_funcs sdma_v4_4_buffer_funcs = {
+	.copy_max_bytes = 0x4000000,
+	.copy_num_dw = 7,
+	.emit_copy_buffer = sdma_v4_0_emit_copy_buffer,
+
+	.fill_max_bytes = 0x4000000,
+	.fill_num_dw = 5,
+	.emit_fill_buffer = sdma_v4_0_emit_fill_buffer,
+};
+
 static void sdma_v4_0_set_buffer_funcs(struct amdgpu_device *adev)
 {
-	adev->mman.buffer_funcs = &sdma_v4_0_buffer_funcs;
+	if (amdgpu_ip_version(adev, SDMA0_HWIP, 0) >= IP_VERSION(4, 4, 0))
+		adev->mman.buffer_funcs = &sdma_v4_4_buffer_funcs;
+	else
+		adev->mman.buffer_funcs = &sdma_v4_0_buffer_funcs;
 	if (adev->sdma.has_page_queue)
 		adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].page;
 	else
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-09-15 13:32 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-11 17:24 [PATCH 1/5] drm/amdgpu/sdma4.0: adjust SDMA limits Alex Deucher
2025-09-11 17:24 ` [PATCH 2/5] drm/amdgpu/sdma4.4: " Alex Deucher
2025-09-11 17:24 ` [PATCH 3/5] drm/amdgpu/sdma5.2: " Alex Deucher
2025-09-11 18:18   ` Alex Deucher
2025-09-12 19:38     ` Alex Deucher
2025-09-13  5:27       ` timur.kristof
2025-09-15 13:07         ` Alex Deucher
2025-09-15 13:23           ` timur.kristof
2025-09-15 13:25             ` Alex Deucher
2025-09-15 13:26               ` timur.kristof
2025-09-11 17:24 ` [PATCH 4/5] drm/amdgpu/sdma6.0: " Alex Deucher
2025-09-11 17:24 ` [PATCH 5/5] drm/amdgpu/sdma7.0: " Alex Deucher
  -- strict thread matches above, loose matches on Subject: below --
2025-09-15 13:31 [PATCH 1/5] drm/amdgpu/sdma4.0: " Alex Deucher
2025-09-15 13:31 ` [PATCH 3/5] drm/amdgpu/sdma5.2: " Alex Deucher
2025-09-11 14:46 [PATCH 1/5] drm/amdgpu/sdma4.0: " Alex Deucher
2025-09-11 14:46 ` [PATCH 3/5] drm/amdgpu/sdma5.2: " Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.