drm/amdgpu/sdma4.0: adjust SDMA limits
Subsystems (2)
Alex Deucher
maintainerPATCH 1/5 drm/amdgpu/sdma4.0: adjust SDMA limits
SDMA 4.4.x has increased transfer limits.
v2: fix harder, use shifts to make it more obvious
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +16 -3
@@ -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
Signature · 1 line
2.51.0
Alex Deucher
maintainerPATCH 2/5 drm/amdgpu/sdma4.4: adjust SDMA limits
SDMA 4.4.x has increased transfer limits.
v2: fix harder, use shifts to make it more obvious
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c +2 -2
@@ -2298,11 +2298,11 @@ static void sdma_v4_4_2_emit_fill_buffer(struct amdgpu_ib *ib, }static const struct amdgpu_buffer_funcs sdma_v4_4_2_buffer_funcs = { - .copy_max_bytes =0x400000 , + .copy_max_bytes =1 <<30 , .copy_num_dw =7 , .emit_copy_buffer = sdma_v4_4_2_emit_copy_buffer, - .fill_max_bytes =0x400000 , + .fill_max_bytes =1 <<30 , .fill_num_dw =5 , .emit_fill_buffer = sdma_v4_4_2_emit_fill_buffer, };
Signature · 1 line
2.51.0
Alex Deucher
maintainerPATCH 3/5 drm/amdgpu/sdma5.2: adjust SDMA limits
In reply to Alex DeucherSDMA 5.2.x has increased transfer limits.
v2: fix harder, use shifts to make it more obvious
v3: align const fill with PAL limits
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +2 -2
@@ -2065,11 +2065,11 @@ static void sdma_v5_2_emit_fill_buffer(struct amdgpu_ib *ib, }static const struct amdgpu_buffer_funcs sdma_v5_2_buffer_funcs = { - .copy_max_bytes =0x400000 , + .copy_max_bytes =1 <<30 , .copy_num_dw =7 , .emit_copy_buffer = sdma_v5_2_emit_copy_buffer, - .fill_max_bytes =0x400000 , + .fill_max_bytes =1 <<22 ,/* HW supports 1 << 30, but align with PAL for consistency */ .fill_num_dw =5 , .emit_fill_buffer = sdma_v5_2_emit_fill_buffer, };
Signature · 1 line
2.51.0
Alex Deucher
maintainerPATCH 4/5 drm/amdgpu/sdma6.0: adjust SDMA limits
In reply to Alex DeucherSDMA 6.x has increased transfer limits.
v2: fix harder, use shifts to make it more obvious
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c +2 -2
@@ -1873,11 +1873,11 @@ static void sdma_v6_0_emit_fill_buffer(struct amdgpu_ib *ib, }static const struct amdgpu_buffer_funcs sdma_v6_0_buffer_funcs = { - .copy_max_bytes =0x400000 , + .copy_max_bytes =1 <<30 , .copy_num_dw =7 , .emit_copy_buffer = sdma_v6_0_emit_copy_buffer, - .fill_max_bytes =0x400000 , + .fill_max_bytes =1 <<30 , .fill_num_dw =5 , .emit_fill_buffer = sdma_v6_0_emit_fill_buffer, };
Signature · 1 line
2.51.0
Alex Deucher
maintainerPATCH 5/5 drm/amdgpu/sdma7.0: adjust SDMA limits
In reply to Alex DeucherSDMA 7.0 has increased transfer limits.
v2: fix harder, use shifts to make it more obvious
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c +2 -2
@@ -1816,10 +1816,10 @@ static void sdma_v7_0_emit_fill_buffer(struct amdgpu_ib *ib, }static const struct amdgpu_buffer_funcs sdma_v7_0_buffer_funcs = { - .copy_max_bytes =0x400000 , + .copy_max_bytes =1 <<30 , .copy_num_dw =8 , .emit_copy_buffer = sdma_v7_0_emit_copy_buffer, - .fill_max_bytes =0x400000 , + .fill_max_bytes =1 <<30 , .fill_num_dw =5 , .emit_fill_buffer = sdma_v7_0_emit_fill_buffer, };
Signature · 1 line
2.51.0