Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

Cc: Vitaly Prosyak <vitaly.prosyak@amd.com>
Reviewed-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

+16 -3
+16 -3
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
··· 2604 2604 } 2605 2605 2606 2606 static const struct amdgpu_buffer_funcs sdma_v4_0_buffer_funcs = { 2607 - .copy_max_bytes = 0x400000, 2607 + .copy_max_bytes = 1 << 22, 2608 2608 .copy_num_dw = 7, 2609 2609 .emit_copy_buffer = sdma_v4_0_emit_copy_buffer, 2610 2610 2611 - .fill_max_bytes = 0x400000, 2611 + .fill_max_bytes = 1 << 22, 2612 + .fill_num_dw = 5, 2613 + .emit_fill_buffer = sdma_v4_0_emit_fill_buffer, 2614 + }; 2615 + 2616 + static const struct amdgpu_buffer_funcs sdma_v4_4_buffer_funcs = { 2617 + .copy_max_bytes = 1 << 30, 2618 + .copy_num_dw = 7, 2619 + .emit_copy_buffer = sdma_v4_0_emit_copy_buffer, 2620 + 2621 + .fill_max_bytes = 1 << 30, 2612 2622 .fill_num_dw = 5, 2613 2623 .emit_fill_buffer = sdma_v4_0_emit_fill_buffer, 2614 2624 }; 2615 2625 2616 2626 static void sdma_v4_0_set_buffer_funcs(struct amdgpu_device *adev) 2617 2627 { 2618 - adev->mman.buffer_funcs = &sdma_v4_0_buffer_funcs; 2628 + if (amdgpu_ip_version(adev, SDMA0_HWIP, 0) >= IP_VERSION(4, 4, 0)) 2629 + adev->mman.buffer_funcs = &sdma_v4_4_buffer_funcs; 2630 + else 2631 + adev->mman.buffer_funcs = &sdma_v4_0_buffer_funcs; 2619 2632 if (adev->sdma.has_page_queue) 2620 2633 adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].page; 2621 2634 else